Packages

object OpenAPI

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

Type Members

  1. final case class Callback(expressions: Map[String, PathItem]) extends CallbackOrReference with 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. sealed trait CallbackOrReference extends OpenAPIBase
  3. final case class Components(schemas: Map[Key, SchemaOrReference], responses: Map[Key, ResponseOrReference], parameters: Map[Key, ParameterOrReference], examples: Map[Key, ExampleOrReference], requestBodies: Map[Key, RequestBodyOrReference], headers: Map[Key, HeaderOrReference], securitySchemes: Map[Key, SecuritySchemeOrReference], links: Map[Key, LinkOrReference], callbacks: Map[Key, CallbackOrReference]) extends OpenAPIBase with 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.

  4. final case class Contact(name: Option[String], url: Option[URI], email: String) extends OpenAPIBase with 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.

  5. final case class Discriminator(propertyName: String, mapping: Map[String, String]) extends OpenAPIBase with 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.

  6. final case class Encoding(contentType: String, headers: Map[String, HeaderOrReference], style: String = "form", explode: Boolean, allowReserved: Boolean = false) extends OpenAPIBase with 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.

  7. final case class Example(summary: String = "", description: Doc, externalValue: URI) extends ExampleOrReference with 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.

  8. sealed trait ExampleOrReference extends OpenAPIBase
  9. final case class ExternalDoc(description: Option[Doc], url: URI) extends OpenAPIBase with 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.

  10. final case class Header(description: Doc, required: Boolean, deprecate: Boolean = false, allowEmptyValue: Boolean = false, content: (String, MediaType)) extends HeaderOrReference with Product with Serializable
  11. sealed trait HeaderOrReference extends OpenAPIBase
  12. final case class Info(title: String, description: Doc, termsOfService: URI, contact: Option[Contact], license: Option[License], version: String) extends OpenAPIBase with 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).

  13. sealed abstract case class Key extends OpenAPIBase with Product with Serializable
  14. final case class License(name: String, url: Option[URI]) extends OpenAPIBase with 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.

  15. final case class Link(operationRef: URI, parameters: Map[String, LiteralOrExpression], requestBody: LiteralOrExpression, description: Doc, server: Option[Server]) extends LinkOrReference with 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.

  16. sealed trait LinkOrReference extends OpenAPIBase
  17. sealed trait LiteralOrExpression extends AnyRef
  18. final case class MediaType(schema: SchemaOrReference, examples: Map[String, ExampleOrReference], encoding: Map[String, Encoding]) extends OpenAPIBase with 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.

  19. sealed trait OAuthFlow extends OpenAPIBase
  20. final case class OAuthFlows(implicit: Option[Implicit], password: Option[Password], clientCredentials: Option[ClientCredentials], authorizationCode: Option[AuthorizationCode]) extends OpenAPIBase with Product with Serializable

    Allows configuration of the supported OAuth Flows.

    Allows configuration of the supported OAuth Flows.

    password

    Configuration for the OAuth Resource Owner Password flow

    clientCredentials

    Configuration for the OAuth Client Credentials flow. Previously called application in OpenAPI 2.0.

    authorizationCode

    Configuration for the OAuth Authorization Code flow. Previously called accessCode in OpenAPI 2.0.

  21. final case class OpenAPI(openapi: String, info: Info, servers: List[Server], paths: Paths, components: Option[Components], security: List[SecurityRequirement], tags: List[Tag], externalDocs: Option[ExternalDoc]) extends OpenAPIBase with Product with Serializable

    This is the root document object of the OpenAPI document.

    This is the root document object of the OpenAPI document.

    openapi

    This string MUST be the semantic version number of the OpenAPI Specification version that the OpenAPI document uses. The openapi field SHOULD be used by tooling specifications and clients to interpret the OpenAPI document. This is not related to the API info.version string.

    info

    Provides metadata about the API. The metadata MAY be used by tooling as required.

    servers

    A List of Server Objects, which provide connectivity information to a target server. If the servers property is empty, the default value would be a Server Object with a url value of /.

    paths

    The available paths and operations for the API.

    components

    An element to hold various schemas for the specification.

    security

    A declaration of which security mechanisms can be used across the API. 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. Individual operations can override this definition. To make security optional, an empty security requirement ({}) can be included in the List.

    tags

    A list of tags used by the specification with additional metadata. The order of the tags can be used to reflect on their order by the parsing tools. Not all tags that are used by the Operation Object must be declared. The tags that are not declared MAY be organized randomly or based on the tools’ logic. Each tag name in the list MUST be unique.

    externalDocs

    Additional external documentation.

  22. final case class Operation(tags: List[String], summary: String = "", description: Doc, externalDocs: Option[ExternalDoc], operationId: Option[String], parameters: Set[ParameterOrReference], requestBody: Option[RequestBodyOrReference], responses: Responses, callbacks: Map[String, CallbackOrReference], deprecated: Boolean = false, security: List[SecurityRequirement], servers: List[Server]) extends OpenAPIBase with 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.

  23. sealed trait Parameter extends ParameterOrReference

    Describes a single operation parameter.

  24. sealed trait ParameterOrReference extends OpenAPIBase
  25. sealed abstract case class Path extends OpenAPIBase with 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.

  26. final case class PathItem(ref: String, summary: String = "", description: 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], parameters: Set[ParameterOrReference]) extends OpenAPIBase with 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.

  27. 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.

  28. final case class Reference(ref: String) extends SchemaOrReference with ResponseOrReference with ParameterOrReference with ExampleOrReference with RequestBodyOrReference with HeaderOrReference with SecuritySchemeOrReference with LinkOrReference with CallbackOrReference with Product with Serializable

    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.

    ref

    The reference string.

  29. final case class RequestBody(description: Doc, content: Map[String, MediaType], required: Boolean = false) extends ResponseOrReference with 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.

  30. sealed trait RequestBodyOrReference extends OpenAPIBase
  31. final case class Response(description: Doc, headers: Map[String, HeaderOrReference], content: Map[String, MediaType], links: Map[String, LinkOrReference]) extends ResponseOrReference with 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.

  32. sealed trait ResponseOrReference extends OpenAPIBase
  33. type Responses = Map[Status, ResponseOrReference]

    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.

  34. sealed trait Schema extends OpenAPIBase with SchemaOrReference
  35. sealed trait SchemaOrReference extends OpenAPIBase
  36. final case class SecurityRequirement(securitySchemes: Map[String, List[String]]) extends OpenAPIBase with Product with Serializable

    Lists the required security schemes to execute this operation.

    Lists the required security schemes to execute this operation. The name used for each property MUST correspond to a security scheme declared in the Security Schemes under the Components Object.

    Security Requirement Objects that contain multiple schemes require that all schemes MUST be satisfied for a request to be authorized. This enables support for scenarios where multiple query parameters or HTTP headers are required to convey security information.

    When a list of Security Requirement Objects is defined on the OpenAPI Object or Operation Object, only one of the Security Requirement Objects in the list needs to be satisfied to authorize the request.

    securitySchemes

    If the security scheme is of type "oauth2" or "openIdConnect", then the value is a list of scope names required for the execution, and the list MAY be empty if authorization does not require a specified scope. For other security scheme types, the List MUST be empty.

  37. sealed trait SecurityScheme extends SecuritySchemeOrReference
  38. sealed trait SecuritySchemeOrReference extends OpenAPIBase
  39. final case class Server(url: URI, description: Doc, variables: Map[String, ServerVariable]) extends OpenAPIBase with 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.

  40. final case class ServerVariable(enum: NonEmptyChunk[String], default: String, description: Doc) extends OpenAPIBase with 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.

  41. final case class Tag(name: String, description: Doc, externalDocs: URI) extends OpenAPIBase with 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.

  42. final case class XML(name: String, namespace: URI, prefix: String, attribute: Boolean = false, wrapped: Boolean) extends OpenAPIBase with 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() @HotSpotIntrinsicCandidate()
  6. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  7. def equals(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef → Any
  8. final def getClass(): Class[_ <: AnyRef]
    Definition Classes
    AnyRef → Any
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  9. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  10. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  11. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  12. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  13. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  14. final def synchronized[T0](arg0: => T0): T0
    Definition Classes
    AnyRef
  15. def toString(): String
    Definition Classes
    AnyRef → Any
  16. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  17. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException]) @native()
  18. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  19. object Key extends Serializable
  20. object LiteralOrExpression
  21. object OAuthFlow
  22. object Parameter
  23. object Path extends Serializable
  24. object Schema
  25. object SecurityScheme

Deprecated Value Members

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

Inherited from AnyRef

Inherited from Any

Ungrouped