Parameter

zio.blocks.openapi.Parameter
See theParameter companion object
final case class Parameter(name: String, in: ParameterLocation, description: Option[Doc] = ..., required: Boolean = ..., deprecated: Boolean = ..., allowEmptyValue: Boolean = ..., style: Option[String] = ..., explode: Option[Boolean] = ..., allowReserved: Option[Boolean] = ..., schema: Option[ReferenceOr[SchemaObject]] = ..., example: Option[Json] = ..., examples: ChunkMap[String, ReferenceOr[Example]] = ..., content: ChunkMap[String, MediaType] = ..., extensions: ChunkMap[String, Json] = ...)

Describes a single operation parameter.

A unique parameter is defined by a combination of a name and location.

Note: If the parameter location is "path", the required field MUST be true. This is not enforced in the constructor; callers are responsible for ensuring path parameters have required=true.

Value parameters

allowEmptyValue

Sets the ability to pass empty-valued parameters. This is valid only for query parameters and allows sending a parameter with an empty value. Default value is false.

allowReserved

Determines whether the parameter value SHOULD allow reserved characters, as defined by RFC3986, to be included without percent-encoding.

content

A map containing the representations for the parameter. The key is the media type and the value describes it.

deprecated

Specifies that a parameter is deprecated and SHOULD be transitioned out of usage. Default value is false.

description

A brief description of the parameter. This could contain examples of use. CommonMark syntax MAY be used for rich text representation.

example

Example of the parameter's potential value. The example SHOULD match the specified schema and encoding properties if present.

examples

Examples of the parameter's potential value. Each example SHOULD contain a value in the correct format as specified in the parameter encoding.

explode

When this is true, parameter values of type array or object generate separate parameters for each value of the array or key-value pair of the map.

extensions

Specification extensions (x-* fields). These allow adding additional properties beyond the standard OpenAPI fields.

in

REQUIRED. The location of the parameter.

name

REQUIRED. The name of the parameter. Parameter names are case sensitive.

required

Determines whether this parameter is mandatory. If the parameter location is "path", this property is REQUIRED and its value MUST be true. Otherwise, the property MAY be included and its default value is false.

schema

The schema defining the type used for the parameter.

style

Describes how the parameter value will be serialized depending on the type of the parameter value.

Attributes

Companion
object
Source
OpenAPI.scala
Graph
Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all

Members list

Value members

Inherited methods

def productElementNames: Iterator[String]

An iterator over the names of all the elements of this product.

An iterator over the names of all the elements of this product.

Attributes

Inherited from:
Product
Source
Product.scala
def productIterator: Iterator[Any]

An iterator over all the elements of this product.

An iterator over all the elements of this product.

Attributes

Returns

in the default implementation, an Iterator[Any]

Inherited from:
Product
Source
Product.scala