Packages

object OpenAPI extends Serializable

Linear Supertypes
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. OpenAPI
  2. Serializable
  3. AnyRef
  4. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. Protected

Type Members

  1. final case class Callback(expressions: Map[String, PathItem] = Map.empty) extends Product with Serializable

    A map of possible out-of band callbacks related to the parent operation.

    A map of possible out-of band callbacks related to the parent operation. Each value in the map is a Path Item Object that describes a set of requests that may be initiated by the API provider and the expected responses. The key value used to identify the path item object is an expression, evaluated at runtime, that identifies a URL to use for the callback operation.

    expressions

    A Path Item Object used to define a callback request and expected responses.

  2. final case class Components(schemas: Map[Key, ReferenceOr[JsonSchema]] = Map.empty, responses: Map[Key, ReferenceOr[Response]] = Map.empty, parameters: Map[Key, ReferenceOr[Parameter]] = Map.empty, examples: Map[Key, ReferenceOr[Example]] = Map.empty, requestBodies: Map[Key, ReferenceOr[RequestBody]] = Map.empty, headers: Map[Key, ReferenceOr[Header]] = Map.empty, securitySchemes: Map[Key, ReferenceOr[SecurityScheme]] = Map.empty, links: Map[Key, ReferenceOr[Link]] = Map.empty, callbacks: Map[Key, ReferenceOr[Callback]] = Map.empty) extends Product with Serializable

    Holds a set of reusable objects for different aspects of the OAS.

    Holds a set of reusable objects for different aspects of the OAS. All objects defined within the components object will have no effect on the API unless they are explicitly referenced from properties outside the components object.

    schemas

    An object to hold reusable Schema Objects.

    responses

    An object to hold reusable Response Objects.

    parameters

    An object to hold reusable Parameter Objects.

    examples

    An object to hold reusable Example Objects.

    requestBodies

    An object to hold reusable Request Body Objects.

    headers

    An object to hold reusable Header Objects.

    securitySchemes

    An object to hold reusable Security Scheme Objects.

    links

    An object to hold reusable Link Objects.

    callbacks

    An object to hold reusable Callback Objects.

  3. final case class Contact(name: Option[String], url: Option[URI], email: Option[String]) extends Product with Serializable

    Contact information for the exposed API.

    Contact information for the exposed API.

    name

    The identifying name of the contact person/organization.

    url

    The URL pointing to the contact information.

    email

    The email address of the contact person/organization. MUST be in the format of an email address.

  4. final case class Discriminator(propertyName: String, mapping: Map[String, String] = Map.empty) extends Product with Serializable

    When request bodies or response payloads may be one of a number of different schemas, a discriminator object can be used to aid in serialization, deserialization, and validation.

    When request bodies or response payloads may be one of a number of different schemas, a discriminator object can be used to aid in serialization, deserialization, and validation. The discriminator is a specific object in a schema which is used to inform the consumer of the specification of an alternative schema based on the value associated with it.

    When using the discriminator, inline schemas will not be considered.

    propertyName

    The name of the property in the payload that will hold the discriminator value.

    mapping

    An object to hold mappings between payload values and schema names or references.

  5. final case class Encoding(contentType: String, headers: Map[String, ReferenceOr[Header]] = Map.empty, style: String = "form", explode: Boolean, allowReserved: Boolean = false) extends Product with Serializable

    A single encoding definition applied to a single schema property.

    A single encoding definition applied to a single schema property.

    TODO: default values (https://spec.openapis.org/oas/v3.0.3#encoding-object)

    contentType

    The Content-Type for encoding a specific property.

    headers

    A map allowing additional information to be provided as headers, for example Content-Disposition. Content-Type is described separately and SHALL be ignored in this section. This property SHALL be ignored if the request body media type is not a multipart.

    style

    Describes how a specific property value will be serialized depending on its type. This property SHALL be ignored if the request body media type is not application/x-www-form-urlencoded.

    explode

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

    allowReserved

    Determines whether the parameter value SHOULD allow reserved characters, as defined by [RFC3986] to be included without percent-encoding. This property SHALL be ignored if the request body media type is not application/x-www-form-urlencoded.

  6. final case class Example(value: Json, summary: Option[String] = None, description: Option[Doc] = None, externalValue: Option[URI] = None) extends Product with Serializable

    In all cases, the example value is expected to be compatible with the type schema of its associated value.

    In all cases, the example value is expected to be compatible with the type schema of its associated value. Tooling implementations MAY choose to validate compatibility automatically, and reject the example value(s) if incompatible.

    summary

    Short description for the example.

    description

    Long description for the example.

    externalValue

    A URL that points to the literal example. This provides the capability to reference examples that cannot easily be included in JSON or YAML documents.

  7. final case class ExternalDoc(description: Option[Doc], url: URI) extends Product with Serializable

    Allows referencing an external resource for extended documentation.

    Allows referencing an external resource for extended documentation.

    description

    A short description of the target documentation. CommonMark syntax MAY be used for rich text representation.

    url

    The URL for the target documentation.

  8. final case class Header(description: Option[Doc], required: Boolean = false, deprecated: Boolean = false, allowEmptyValue: Boolean = false, schema: Option[JsonSchema]) extends Product with Serializable
  9. final case class Info(title: String, description: Option[Doc], termsOfService: Option[URI], contact: Option[Contact], license: Option[License], version: String) extends Product with Serializable

    The object provides metadata about the API.

    The object provides metadata about the API. The metadata MAY be used by the clients if needed, and MAY be presented in editing or documentation generation tools for convenience.

    title

    The title of the API.

    description

    A short description of the API.

    termsOfService

    A URL to the Terms of Service for the API.

    contact

    The contact information for the exposed API.

    license

    The license information for the exposed API.

    version

    The version of the OpenAPI document (which is distinct from the OpenAPI Specification version or the API implementation version).

  10. sealed abstract case class Key extends Product with Serializable
  11. final case class License(name: String, url: Option[URI]) extends Product with Serializable

    License information for the exposed API.

    License information for the exposed API.

    name

    The license name used for the API.

    url

    A URL to the license used for the API.

  12. final case class Link(operationRef: URI, parameters: Map[String, LiteralOrExpression] = Map.empty, requestBody: LiteralOrExpression, description: Option[Doc], server: Option[Server]) extends Product with Serializable

    The Link object represents a possible design-time link for a response.

    The Link object represents a possible design-time link for a response. The presence of a link does not guarantee the caller’s ability to successfully invoke it, rather it provides a known relationship and traversal mechanism between responses and other operations.

    Unlike dynamic links (i.e. links provided in the response payload), the OAS linking mechanism does not require link information in the runtime response.

    For computing links, and providing instructions to execute them, a runtime expression is used for accessing values in an operation and using them as parameters while invoking the linked operation.

    operationRef

    A relative or absolute URI reference to an OAS operation. This field MUST point to an Operation Object. Relative operationRef values MAY be used to locate an existing Operation Object in the OpenAPI definition.

    parameters

    A map representing parameters to pass to an operation as identified via operationRef. The key is the parameter name to be used, whereas the value can be a constant or an expression to be evaluated and passed to the linked operation. The parameter name can be qualified using the parameter location [{in}.]{name} for operations that use the same parameter name in different locations (e.g. path.id).

    requestBody

    A literal value or {expression} to use as a request body when calling the target operation.

    description

    A description of the link.

    server

    A server object to be used by the target operation.

  13. sealed trait LiteralOrExpression extends AnyRef
  14. final case class MediaType(schema: ReferenceOr[JsonSchema], examples: Map[String, ReferenceOr[Example]] = Map.empty, encoding: Map[String, Encoding] = Map.empty) extends Product with Serializable

    Each Media Type Object provides schema and examples for the media type identified by its key.

    Each Media Type Object provides schema and examples for the media type identified by its key.

    schema

    The schema defining the content of the request, response, or parameter.

    examples

    Examples of the media type. Each example object SHOULD match the media type and specified schema if present. If referencing a schema which contains an example, the examples value SHALL override the example provided by the schema.

    encoding

    A map between a property name and its encoding information. The key, being the property name, MUST exist in the schema as a property. The encoding object SHALL only apply to requestBody objects when the media type is multipart or application/x-www-form-urlencoded.

  15. final case class Operation(tags: List[String] = List.empty, summary: Option[String], description: Option[Doc], externalDocs: Option[ExternalDoc], operationId: Option[String], parameters: Set[ReferenceOr[Parameter]] = Set.empty, requestBody: Option[ReferenceOr[RequestBody]], responses: Map[StatusOrDefault, ReferenceOr[Response]] = Map.empty, callbacks: Map[String, ReferenceOr[Callback]] = Map.empty, deprecated: Boolean = false, security: List[SecurityRequirement] = List.empty, servers: List[Server] = List.empty) extends Product with Serializable

    Describes a single API operation on a path.

    Describes a single API operation on a path.

    tags

    A list of tags for API documentation control. Tags can be used for logical grouping of operations by resources or any other qualifier.

    summary

    A short summary of what the operation does.

    description

    A verbose explanation of the operation behavior.

    externalDocs

    Additional external documentation for this operation.

    operationId

    Unique string used to identify the operation. The id MUST be unique among all operations described in the API. The operationId value is case-sensitive. Tools and libraries MAY use the operationId to uniquely identify an operation, therefore, it is RECOMMENDED to follow common programming naming conventions.

    parameters

    A List of parameters that are applicable for this operation. If a parameter is already defined at the Path Item, the new definition will override it but can never remove it. The list MUST NOT include duplicated parameters. A unique parameter is defined by a combination of a name and location. The list can use the Reference Object to link to parameters that are defined at the OpenAPI Object’s components/parameters.

    requestBody

    The request body applicable for this operation. The requestBody is only supported in HTTP methods where the HTTP 1.1 specification [RFC7231] has explicitly defined semantics for request bodies. In other cases where the HTTP spec is vague, requestBody SHALL be ignored by consumers.

    responses

    The List of possible responses as they are returned from executing this operation.

    callbacks

    A map of possible out-of band callbacks related to the parent operation. The key is a unique identifier for the Callback Object. Each value in the map is a Callback Object that describes a request that may be initiated by the API provider and the expected responses.

    deprecated

    Declares this operation to be deprecated. Consumers SHOULD refrain from usage of the declared operation.

    security

    A declaration of which security mechanisms can be used for this operation. The List of values includes alternative security requirement objects that can be used. Only one of the security requirement objects need to be satisfied to authorize a request. To make security optional, an empty security requirement ({}) can be included in the array. This definition overrides any declared top-level security. To remove a top-level security declaration, an empty List can be used.

    servers

    An alternative server List to service this operation. If an alternative server object is specified at the Path Item Object or Root level, it will be overridden by this value.

  16. final case class Parameter(name: String, in: String, description: Option[Doc], required: Boolean = false, deprecated: Boolean = false, schema: Option[ReferenceOr[JsonSchema]], explode: Boolean = false, examples: Map[String, ReferenceOr[Example]] = Map.empty, allowReserved: Option[Boolean], style: Option[String], content: Option[(String, MediaType)]) extends Product with Serializable

    Describes a single operation parameter.

  17. case class Path extends Product with Serializable

    The path is appended (no relative URL resolution) to the expanded URL from the Server Object's url field in order to construct the full URL.

    The path is appended (no relative URL resolution) to the expanded URL from the Server Object's url field in order to construct the full URL. Path templating is allowed. When matching URLs, concrete (non-templated) paths would be matched before their templated counterparts. Templated paths with the same hierarchy but different templated names MUST NOT exist as they are identical. In case of ambiguous matching, it’s up to the tooling to decide which one to use.

  18. final case class PathItem(ref: Option[String], summary: Option[String], description: Option[Doc], get: Option[Operation], put: Option[Operation], post: Option[Operation], delete: Option[Operation], options: Option[Operation], head: Option[Operation], patch: Option[Operation], trace: Option[Operation], servers: List[Server] = List.empty, parameters: Set[ReferenceOr[Parameter]] = Set.empty) extends Product with Serializable

    Describes the operations available on a single path.

    Describes the operations available on a single path. A Path Item MAY be empty, due to ACL constraints. The path itself is still exposed to the documentation viewer but they will not know which operations and parameters are available.

    ref

    Allows for an external definition of this path item. The referenced structure MUST be in the format of a Path Item Object. In case a Path Item Object field appears both in the defined object and the referenced object, the behavior is undefined.

    summary

    An optional, string summary, intended to apply to all operations in this path.

    description

    A description, intended to apply to all operations in this path.

    get

    A definition of a GET operation on this path.

    put

    A definition of a PUT operation on this path.

    post

    A definition of a POST operation on this path.

    delete

    A definition of a DELETE operation on this path.

    options

    A definition of a OPTIONS operation on this path.

    head

    A definition of a HEAD operation on this path.

    patch

    A definition of a PATCH operation on this path.

    trace

    A definition of a TRACE operation on this path.

    servers

    An alternative server List to service all operations in this path.

    parameters

    A Set of parameters that are applicable for all the operations described under this path. These parameters can be overridden at the operation level, but cannot be removed there. The Set can use the Reference Object to link to parameters that are defined at the OpenAPI Object’s components/parameters.

  19. type Paths = Map[Path, PathItem]

    Holds the relative paths to the individual endpoints and their operations.

    Holds the relative paths to the individual endpoints and their operations. The path is appended to the URL from the Server Object in order to construct the full URL. The Paths MAY be empty, due to ACL constraints.

  20. sealed trait ReferenceOr[+T] extends AnyRef

    A simple object to allow referencing other components in the specification, internally and externally.

    A simple object to allow referencing other components in the specification, internally and externally.

    Annotations
    @noDiscriminator()
  21. final case class RequestBody(description: Option[Doc] = None, content: Map[String, MediaType] = Map.empty, required: Boolean = false) extends Product with Serializable

    Describes a single request body.

    Describes a single request body.

    description

    A brief description of the request body. This could contain examples of use.

    content

    The content of the request body. The key is a media type or [media type range]appendix-D) and the value describes it. For requests that match multiple keys, only the most specific key is applicable.

    required

    Determines if the request body is required in the request.

  22. final case class Response(description: Doc = Doc.Empty, headers: Map[String, ReferenceOr[Header]] = Map.empty, content: Map[String, MediaType] = Map.empty, links: Map[String, ReferenceOr[Link]] = Map.empty) extends Product with Serializable

    Describes a single response from an API Operation, including design-time, static links to operations based on the response.

    Describes a single response from an API Operation, including design-time, static links to operations based on the response.

    description

    A short description of the response.

    headers

    Maps a header name to its definition. [RFC7230] states header names are case insensitive. If a response header is defined with the name "Content-Type", it SHALL be ignored.

    content

    A map containing descriptions of potential response payloads. The key is a media type or [media type range]appendix-D) and the value describes it. For responses that match multiple keys, only the most specific key is applicable.

    links

    A map of operations links that can be followed from the response. The key of the map is a short name for the link, following the naming constraints of the names for Component Objects.

  23. type Responses = Map[StatusOrDefault, ReferenceOr[Response]]

    A container for the expected responses of an operation.

    A container for the expected responses of an operation. The container maps a HTTP response code to the expected response. The Responses Object MUST contain at least one response code, and it SHOULD be the response for a successful operation call.

  24. sealed trait SecurityScheme extends AnyRef
  25. final case class Server(url: URI, description: Option[Doc], variables: Map[String, ServerVariable] = Map.empty) extends Product with Serializable

    An object representing a Server.

    An object representing a Server.

    url

    A URL to the target host. This URL supports Server Variables and MAY be relative, to indicate that the host location is relative to the location where the OpenAPI document is being served. Variable substitutions will be made when a variable is named in {brackets}.

    description

    Describing the host designated by the URL.

    variables

    A map between a variable name and its value. The value is used for substitution in the server’s URL template.

  26. final case class ServerVariable(enum: Chunk[String], default: String, description: Doc) extends Product with Serializable

    An object representing a Server Variable for server URL template substitution.

    An object representing a Server Variable for server URL template substitution.

    enum

    An enumeration of string values to be used if the substitution options are from a limited set.

    default

    The default value to use for substitution, which SHALL be sent if an alternate value is not supplied. Note this behavior is different than the Schema Object’s treatment of default values, because in those cases parameter values are optional. If the enum is defined, the value SHOULD exist in the enum’s values.

    description

    A description for the server variable.

  27. sealed trait StatusOrDefault extends Product with Serializable
  28. final case class Tag(name: String, description: Option[Doc], externalDocs: Option[ExternalDoc]) extends Product with Serializable

    Adds metadata to a single tag that is used by the Operation Object.

    Adds metadata to a single tag that is used by the Operation Object. It is not mandatory to have a Tag Object per tag defined in the Operation Object instances.

    name

    The name of the tag.

    description

    A short description for the tag.

    externalDocs

    Additional external documentation for this tag.

  29. final case class XML(name: String, namespace: URI, prefix: String, attribute: Boolean = false, wrapped: Boolean) extends Product with Serializable

    A metadata object that allows for more fine-tuned XML model definitions.

    A metadata object that allows for more fine-tuned XML model definitions.

    When using arrays, XML element names are not inferred (for singular/plural forms) and the name property SHOULD be used to add that information.

    name

    Replaces the name of the element/attribute used for the described schema property. When defined within items, it will affect the name of the individual XML elements within the list. When defined alongside type being array (outside the items), it will affect the wrapping element and only if wrapped is true. If wrapped is false, it will be ignored.

    namespace

    The URI of the namespace definition.

    prefix

    The prefix to be used for the name.

    attribute

    Declares whether the property definition translates to an attribute instead of an element.

    wrapped

    MAY be used only for an array definition. Signifies whether the array is wrapped (for example, <books><book/><book/></books>) or unwrapped (<book/><book/>). The definition takes effect only when defined alongside type being array (outside the items).

Value Members

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  2. final def ##: Int
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  4. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  5. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.CloneNotSupportedException]) @native() @IntrinsicCandidate()
  6. def empty: OpenAPI
  7. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  8. def equals(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef → Any
  9. final def getClass(): Class[_ <: AnyRef]
    Definition Classes
    AnyRef → Any
    Annotations
    @native() @IntrinsicCandidate()
  10. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @native() @IntrinsicCandidate()
  11. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  12. implicit def keyMapSchema[T](implicit schema: Schema[T]): Schema[Map[Key, T]]
  13. implicit def mediaTypeTupleSchema: Schema[(String, MediaType)]
  14. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  15. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @IntrinsicCandidate()
  16. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @IntrinsicCandidate()
  17. implicit def pathMapSchema: Schema[Map[Path, PathItem]]
  18. implicit val schema: Schema[OpenAPI]
  19. implicit def statusMapSchema[T](implicit schema: Schema[T]): Schema[Map[StatusOrDefault, T]]
  20. implicit def statusSchema: Schema[Status]
  21. final def synchronized[T0](arg0: => T0): T0
    Definition Classes
    AnyRef
  22. def toString(): String
    Definition Classes
    AnyRef → Any
  23. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  24. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException]) @native()
  25. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  26. object Callback extends Serializable
  27. object Discriminator extends Serializable
  28. object Encoding extends Serializable
  29. object Example extends Serializable
  30. object Header extends Serializable
  31. object Key extends Serializable
  32. object Link extends Serializable
  33. object LiteralOrExpression
  34. object MediaType extends Serializable
  35. object Parameter extends Serializable
  36. object Path extends Serializable
  37. object PathItem extends Serializable
  38. object ReferenceOr
  39. object RequestBody extends Serializable
  40. object Response extends Serializable
  41. object SecurityScheme
  42. object ServerVariable extends Serializable
  43. object StatusOrDefault extends Serializable

Deprecated Value Members

  1. def finalize(): Unit
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.Throwable]) @Deprecated
    Deprecated

Inherited from Serializable

Inherited from AnyRef

Inherited from Any

Ungrouped