OpenAPI

zio.http.endpoint.openapi.OpenAPI
See theOpenAPI companion object
final case class OpenAPI(openapi: String, info: Info, servers: List[Server], paths: ListMap[Path, PathItem], components: Option[Components], security: List[SecurityRequirement], tags: List[Tag], externalDocs: Option[ExternalDoc])

This is the root document object of the OpenAPI document.

Value parameters

components

An element to hold various schemas for the specification.

externalDocs

Additional external documentation.

info

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

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.

paths

The available paths and operations for the API.

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.

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

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.

Attributes

Companion
object
Graph
Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all

Members list

Value members

Concrete methods

def ++(other: OpenAPI): OpenAPI
def path(path: Path, pathItem: PathItem): OpenAPI
def title(title: String): OpenAPI
def toJson: String
def toJsonPretty: String
def version(version: String): OpenAPI

Inherited methods

def productElementNames: Iterator[String]

Attributes

Inherited from:
Product
def productIterator: Iterator[Any]

Attributes

Inherited from:
Product