package openapi
- Alphabetic
- Public
- All
Type Members
- sealed trait AdditionalProperties extends AnyRef
-
final
case class
Callback(byExpression: Map[String, PathItem]) extends Product with Serializable
Representation of Callback Object
Representation of Callback Object
- Annotations
- @transparent()
-
final
case class
Components(schemas: Map[String, RefOr[Schema]] = Map.empty, responses: Map[String, RefOr[Response]] = Map.empty, parameters: Map[String, RefOr[Parameter]] = Map.empty, examples: Map[String, RefOr[Example]] = Map.empty, requestBodies: Map[String, RefOr[RequestBody]] = Map.empty, headers: Map[String, RefOr[Header]] = Map.empty, securitySchemes: Map[String, RefOr[SecurityScheme]] = Map.empty, links: Map[String, RefOr[Link]] = Map.empty, callbacks: Map[String, RefOr[Callback]] = Map.empty) extends Product with Serializable
Representation of Components Object
-
final
case class
Contact(name: com.avsystem.commons.OptArg[String] = OptArg.Empty, url: com.avsystem.commons.OptArg[String] = OptArg.Empty, email: com.avsystem.commons.OptArg[String] = OptArg.Empty) extends Product with Serializable
Representation of Contact Object
- final class DataType extends AbstractValueEnum
-
final
case class
Discriminator(propertyName: String, mapping: Map[String, String] = Map.empty) extends Product with Serializable
Representation of Discriminator Object
-
final
case class
Encoding(contentType: com.avsystem.commons.OptArg[String] = OptArg.Empty, headers: Map[String, RefOr[Header]] = Map.empty, style: com.avsystem.commons.OptArg[Style] = OptArg.Empty, explode: com.avsystem.commons.OptArg[Boolean] = OptArg.Empty, allowReserved: Boolean = false) extends Product with Serializable
Representation of Encoding Object
- final case class Entry[K, V](key: K, value: V) extends Product with Serializable
-
final
case class
Example(summary: com.avsystem.commons.OptArg[String] = OptArg.Empty, description: com.avsystem.commons.OptArg[String] = OptArg.Empty, value: com.avsystem.commons.OptArg[JsonValue] = OptArg.Empty, externalValue: com.avsystem.commons.OptArg[String] = OptArg.Empty) extends Product with Serializable
Representation of Example Object
-
final
case class
ExternalDocumentation(url: String, description: com.avsystem.commons.OptArg[String] = OptArg.Empty) extends Product with Serializable
Representation of External Documentation Object
-
final
case class
Header(description: com.avsystem.commons.OptArg[String] = OptArg.Empty, required: Boolean = false, deprecated: Boolean = false, allowEmptyValue: Boolean = false, style: com.avsystem.commons.OptArg[Style] = OptArg.Empty, explode: com.avsystem.commons.OptArg[Boolean] = OptArg.Empty, allowReserved: Boolean = false, schema: com.avsystem.commons.OptArg[RefOr[Schema]] = OptArg.Empty, example: com.avsystem.commons.OptArg[JsonValue] = OptArg.Empty, examples: Map[String, RefOr[Example]] = Map.empty, content: com.avsystem.commons.OptArg[Entry[String, MediaType]] = OptArg.Empty) extends Product with Serializable
Representation of Header Object
-
final
case class
Info(title: String, version: String, license: com.avsystem.commons.OptArg[License] = OptArg.Empty, description: com.avsystem.commons.OptArg[String] = OptArg.Empty, termsOfService: com.avsystem.commons.OptArg[String] = OptArg.Empty, contact: com.avsystem.commons.OptArg[Contact] = OptArg.Empty) extends Product with Serializable
Representation of Info Object
- final class InliningResolver extends SchemaResolver
-
final
case class
License(name: String, url: com.avsystem.commons.OptArg[String] = OptArg.Empty) extends Product with Serializable
Representation of License Object
-
final
case class
Link(operationRef: com.avsystem.commons.OptArg[String] = OptArg.Empty, operationId: com.avsystem.commons.OptArg[String] = OptArg.Empty, parameters: Map[String, JsonValue] = Map.empty, requestBody: com.avsystem.commons.OptArg[JsonValue] = OptArg.Empty, description: com.avsystem.commons.OptArg[String] = OptArg.Empty, server: com.avsystem.commons.OptArg[Server] = OptArg.Empty) extends Product with Serializable
Representation of Link Object
- final class Location extends AbstractValueEnum
-
final
case class
MediaType(schema: com.avsystem.commons.OptArg[RefOr[Schema]] = OptArg.Empty, example: com.avsystem.commons.OptArg[JsonValue] = OptArg.Empty, examples: Map[String, RefOr[Example]] = Map.empty, encoding: Map[String, Encoding] = Map.empty) extends Product with Serializable
Representation of Media Type Object
-
final
case class
OAuthFlow(scopes: Map[String, String], authorizationUrl: com.avsystem.commons.OptArg[String] = OptArg.Empty, tokenUrl: com.avsystem.commons.OptArg[String] = OptArg.Empty, refreshUrl: com.avsystem.commons.OptArg[String] = OptArg.Empty) extends Product with Serializable
Representation of OAuth Flow Object
-
final
case class
OAuthFlows(implicit: com.avsystem.commons.OptArg[OAuthFlow] = OptArg.Empty, password: com.avsystem.commons.OptArg[OAuthFlow] = OptArg.Empty, clientCredentials: com.avsystem.commons.OptArg[OAuthFlow] = OptArg.Empty, authorizationCode: com.avsystem.commons.OptArg[OAuthFlow] = OptArg.Empty) extends Product with Serializable
Representation of OAuth Flows Object
-
final
case class
OpenApi(openapi: String = OpenApi.Version, info: Info, paths: Paths, servers: List[Server] = Nil, components: com.avsystem.commons.OptArg[Components] = OptArg.Empty, security: List[SecurityRequirement] = Nil, tags: List[Tag] = Nil, externalDocs: com.avsystem.commons.OptArg[ExternalDocumentation] = OptArg.Empty) extends Product with Serializable
Representation of OpenAPI Object from OpenAPI 3.0 specification.
Representation of OpenAPI Object from OpenAPI 3.0 specification. It may be serialized to OpenAPI 3.0 compliant JSON using
JsonStringOutput
. This JSON can then be consumed by tools that support OpenAPI 3.0, e.g. Swagger UI. - final case class OpenApiBody[T](restRequestBody: RestRequestBody[T], schemaAdjusters: List[SchemaAdjuster]) extends TypedMetadata[T] with Product with Serializable
- final case class OpenApiBodyField[T](info: OpenApiParamInfo[T], schemaAdjusters: List[SchemaAdjuster]) extends TypedMetadata[T] with Product with Serializable
- final case class OpenApiBodyOperation[T](name: String, methodTag: HttpMethodTag, operationAdjusters: List[OperationAdjuster], pathAdjusters: List[PathItemAdjuster], parameters: List[OpenApiParameter[_]], bodyFields: List[OpenApiBodyField[_]], bodyTypeTag: BodyTypeTag, resultType: RestResultType[T]) extends OpenApiOperation[T] with Product with Serializable
- final case class OpenApiCustomBodyOperation[T](name: String, methodTag: HttpMethodTag, operationAdjusters: List[OperationAdjuster], pathAdjusters: List[PathItemAdjuster], parameters: List[OpenApiParameter[_]], singleBody: OpenApiBody[_], resultType: RestResultType[T]) extends OpenApiOperation[T] with Product with Serializable
- final case class OpenApiGetOperation[T](name: String, methodTag: HttpMethodTag, operationAdjusters: List[OperationAdjuster], pathAdjusters: List[PathItemAdjuster], parameters: List[OpenApiParameter[_]], resultType: RestResultType[T]) extends OpenApiOperation[T] with Product with Serializable
-
final
case class
OpenApiMetadata[T](prefixes: List[OpenApiPrefix[_]], gets: List[OpenApiGetOperation[_]], customBodyMethods: List[OpenApiCustomBodyOperation[_]], bodyMethods: List[OpenApiBodyOperation[_]]) extends Product with Serializable
- Annotations
- @implicitNotFound( ... ) @methodTag( ... ) @methodTag( ... )
- sealed trait OpenApiMethod[T] extends TypedMetadata[T]
- sealed trait OpenApiOperation[T] extends OpenApiMethod[T]
- final case class OpenApiParamInfo[T](name: String, whenAbsentInfo: com.avsystem.commons.Opt[WhenAbsentInfo[T]], flags: ParamFlags, restSchema: RestSchema[T]) extends TypedMetadata[T] with Product with Serializable
- final case class OpenApiParameter[T](paramTag: NonBodyTag, info: OpenApiParamInfo[T], adjusters: List[ParameterAdjuster]) extends TypedMetadata[T] with Product with Serializable
- final case class OpenApiPrefix[T](name: String, methodTag: Prefix, parameters: List[OpenApiParameter[_]], operationAdjusters: List[OperationAdjuster], pathAdjusters: List[PathItemAdjuster], operationIdPrefix: com.avsystem.commons.Opt[operationIdPrefix], result: OpenApiMetadata.Lazy[T]) extends OpenApiMethod[T] with Product with Serializable
- abstract class OpenApiServlet extends HttpServlet
-
final
case class
Operation(tags: List[String] = Nil, summary: com.avsystem.commons.OptArg[String] = OptArg.Empty, description: com.avsystem.commons.OptArg[String] = OptArg.Empty, externalDocs: com.avsystem.commons.OptArg[ExternalDocumentation] = OptArg.Empty, operationId: com.avsystem.commons.OptArg[String] = OptArg.Empty, parameters: List[RefOr[Parameter]] = Nil, requestBody: com.avsystem.commons.OptArg[RefOr[RequestBody]] = OptArg.Empty, responses: Responses, callbacks: Map[String, RefOr[Callback]] = Map.empty, deprecated: Boolean = false, security: List[SecurityRequirement] = Nil, servers: List[Server] = Nil) extends Product with Serializable
Representation of Operation Object
-
final
case class
Parameter(name: String, in: Location, description: com.avsystem.commons.OptArg[String] = OptArg.Empty, required: Boolean = false, deprecated: Boolean = false, allowEmptyValue: Boolean = false, style: com.avsystem.commons.OptArg[Style] = OptArg.Empty, explode: com.avsystem.commons.OptArg[Boolean] = OptArg.Empty, allowReserved: Boolean = false, schema: com.avsystem.commons.OptArg[RefOr[Schema]] = OptArg.Empty, example: com.avsystem.commons.OptArg[JsonValue] = OptArg.Empty, examples: Map[String, RefOr[Example]] = Map.empty, content: com.avsystem.commons.OptArg[Entry[String, MediaType]] = OptArg.Empty) extends Product with Serializable
Representation of Parameter Object
-
final
case class
PathItem(summary: com.avsystem.commons.OptArg[String] = OptArg.Empty, description: com.avsystem.commons.OptArg[String] = OptArg.Empty, get: com.avsystem.commons.OptArg[Operation] = OptArg.Empty, put: com.avsystem.commons.OptArg[Operation] = OptArg.Empty, post: com.avsystem.commons.OptArg[Operation] = OptArg.Empty, delete: com.avsystem.commons.OptArg[Operation] = OptArg.Empty, options: com.avsystem.commons.OptArg[Operation] = OptArg.Empty, head: com.avsystem.commons.OptArg[Operation] = OptArg.Empty, patch: com.avsystem.commons.OptArg[Operation] = OptArg.Empty, trace: com.avsystem.commons.OptArg[Operation] = OptArg.Empty, servers: List[Server] = Nil, parameters: List[RefOr[Parameter]] = Nil) extends Product with Serializable
Representation of Path Item Object
- final case class PathOperation(path: String, method: HttpMethod, operation: Operation, pathAdjusters: List[PathItemAdjuster]) extends Product with Serializable
-
final
case class
Paths(paths: Map[String, RefOr[PathItem]]) extends Product with Serializable
Representation of Paths Object
Representation of Paths Object
- Annotations
- @transparent()
-
sealed
trait
RefOr[+A] extends AnyRef
Represents a value which is either some directly available, inlined value (usually one of the OpenAPI objects, e.g.
Represents a value which is either some directly available, inlined value (usually one of the OpenAPI objects, e.g. Schema, Parameter, Operation, etc.) or a Reference Object.
-
final
case class
RequestBody(description: com.avsystem.commons.OptArg[String] = OptArg.Empty, content: Map[String, MediaType], required: Boolean = false) extends Product with Serializable
Representation of Request Body Object
-
final
case class
Response(description: String, headers: Map[String, RefOr[Header]] = Map.empty, content: Map[String, MediaType] = Map.empty, links: Map[String, RefOr[Link]] = Map.empty) extends Product with Serializable
Representation of Response Object
-
final
case class
Responses(byStatusCode: Map[Int, RefOr[Response]] = Map.empty, default: com.avsystem.commons.OptArg[RefOr[Response]] = OptArg.Empty) extends Product with Serializable
Representation of Responses Object
-
trait
RestMediaTypes[T] extends AnyRef
Intermediate typeclass which serves as basis for RestResponses and RestRequestBody.
Intermediate typeclass which serves as basis for RestResponses and RestRequestBody. RestMediaTypes is derived by default from RestSchema. It should be defined manually for every type which has custom serialization to HttpBody defined so that generated OpenAPI properly reflects that custom serialization format.
- Annotations
- @implicitNotFound( ... )
-
trait
RestRequestBody[T] extends AnyRef
Typeclass which defines how OpenAPI RequestBody Object will look like for a Given type when that type is used as a type of Body parameter of a CustomBody method.
Typeclass which defines how OpenAPI RequestBody Object will look like for a Given type when that type is used as a type of Body parameter of a CustomBody method. By default, RestRequestBody is derived from RestMediaTypes which by itself is derived by default from RestSchema.
- Annotations
- @implicitNotFound( ... )
-
trait
RestResponses[T] extends AnyRef
Typeclass which defines how an OpenAPI Responses Object will look like for a given type.
Typeclass which defines how an OpenAPI Responses Object will look like for a given type. By default, RestResponses is derived based on RestMediaTypes for that type which is itself derived by default from RestSchema for that type. It should be defined manually for every type which has custom serialization to RestResponse defined so that generated OpenAPI properly reflects that custom serialization format.
- Annotations
- @implicitNotFound( ... )
-
final
case class
RestResultType[T](responses: (SchemaResolver) ⇒ Responses) extends Product with Serializable
Just like RestResponses, RestResultType is a typeclass that defines how an OpenAPI Responses Object will look like for an HTTP method which returns given type.
Just like RestResponses, RestResultType is a typeclass that defines how an OpenAPI Responses Object will look like for an HTTP method which returns given type. The difference between RestResultType and RestResponses is that RestResultType is defined for full result type which usually is some kind of asynchronous wrapper over actual result type (e.g.
Future
). In such situation, RestResponses must be provided forT
while RestResultType is provided forFuture[T]
(or whatever async wrapper is used), based on the RestResponses instance ofT
. You can see an example of this in FutureRestImplicits.RestResultType for OpenApiMetadata is analogous to HttpResponseType for RestMetadata.
-
trait
RestSchema[T] extends AnyRef
- Annotations
- @implicitNotFound( "RestSchema for ${T} not found" )
- sealed trait RestStructure[T] extends TypedMetadata[T]
-
final
case class
Schema(type: com.avsystem.commons.OptArg[DataType] = OptArg.Empty, format: com.avsystem.commons.OptArg[String] = OptArg.Empty, title: com.avsystem.commons.OptArg[String] = OptArg.Empty, description: com.avsystem.commons.OptArg[String] = OptArg.Empty, nullable: Boolean = false, readOnly: Boolean = false, writeOnly: Boolean = false, xml: com.avsystem.commons.OptArg[Xml] = OptArg.Empty, externalDocs: com.avsystem.commons.OptArg[ExternalDocumentation] = OptArg.Empty, deprecated: Boolean = false, multipleOf: com.avsystem.commons.OptArg[BigDecimal] = OptArg.Empty, maximum: com.avsystem.commons.OptArg[BigDecimal] = OptArg.Empty, exclusiveMaximum: Boolean = false, minimum: com.avsystem.commons.OptArg[BigDecimal] = OptArg.Empty, exclusiveMinimum: Boolean = false, maxLength: com.avsystem.commons.OptArg[Int] = OptArg.Empty, minLength: com.avsystem.commons.OptArg[Int] = OptArg.Empty, pattern: com.avsystem.commons.OptArg[String] = OptArg.Empty, items: com.avsystem.commons.OptArg[RefOr[Schema]] = OptArg.Empty, maxItems: com.avsystem.commons.OptArg[Int] = OptArg.Empty, minItems: com.avsystem.commons.OptArg[Int] = OptArg.Empty, uniqueItems: Boolean = false, properties: Map[String, RefOr[Schema]] = Map.empty, additionalProperties: AdditionalProperties = AdditionalProperties.Flag(true), maxProperties: com.avsystem.commons.OptArg[Int] = OptArg.Empty, minProperties: com.avsystem.commons.OptArg[Int] = OptArg.Empty, required: List[String] = Nil, allOf: List[RefOr[Schema]] = Nil, oneOf: List[RefOr[Schema]] = Nil, anyOf: List[RefOr[Schema]] = Nil, not: com.avsystem.commons.OptArg[RefOr[Schema]] = OptArg.Empty, discriminator: com.avsystem.commons.OptArg[Discriminator] = OptArg.Empty, enum: List[JsonValue] = Nil, default: com.avsystem.commons.OptArg[JsonValue] = OptArg.Empty, example: com.avsystem.commons.OptArg[JsonValue] = OptArg.Empty) extends Product with Serializable
Representation of Schema Object
-
final
class
SchemaRegistry extends SchemaResolver
An implementation of SchemaResolver which registers named RestSchemas and replaces them with a Reference Object.
An implementation of SchemaResolver which registers named RestSchemas and replaces them with a Reference Object. All the registered schemas can then be extracted and listed in the Components object.
- trait SchemaResolver extends AnyRef
-
final
case class
SecurityRequirement(schemes: Map[String, List[String]]) extends Product with Serializable
Representation of Security Requirement Object
Representation of Security Requirement Object
- Annotations
- @transparent()
-
sealed
trait
SecurityScheme extends AnyRef
Representation of Security Scheme Object
Representation of Security Scheme Object
- Annotations
- @flatten( "type" )
-
final
case class
Server(url: String, description: com.avsystem.commons.OptArg[String] = OptArg.Empty, serverVariables: Map[String, ServerVariable] = Map.empty) extends Product with Serializable
Representation of Server Object
-
final
case class
ServerVariable(default: String, enum: List[String] = Nil, description: com.avsystem.commons.OptArg[String] = OptArg.Empty) extends Product with Serializable
Representation of Server Variable Object
-
final
class
Style extends AbstractValueEnum
Representation of parameter style
-
final
case class
Tag(name: String, description: com.avsystem.commons.OptArg[String] = OptArg.Empty, externalDocs: com.avsystem.commons.OptArg[ExternalDocumentation] = OptArg.Empty) extends Product with Serializable
Representation of Tag Object
- final case class WhenAbsentInfo[T](annot: whenAbsent[T], asJson: AsRaw[JsonValue, T]) extends TypedMetadata[T] with Product with Serializable
-
final
case class
Xml(name: com.avsystem.commons.OptArg[String] = OptArg.Empty, namespace: com.avsystem.commons.OptArg[String] = OptArg.Empty, prefix: com.avsystem.commons.OptArg[String] = OptArg.Empty, attribute: Boolean = false, wrapped: Boolean = false) extends Product with Serializable
Representation of Xml Object
Value Members
- object AdditionalProperties
- object Callback extends HasGenObjectCodec[Callback] with Serializable
- object Components extends HasGenObjectCodec[Components] with Serializable
- object Contact extends HasGenObjectCodec[Contact] with Serializable
- object DataType extends AbstractValueEnumCompanion[DataType] with Serializable
- object Discriminator extends HasGenObjectCodec[Discriminator] with Serializable
- object Encoding extends HasGenObjectCodec[Encoding] with Serializable
- object Entry extends Serializable
- object Example extends HasGenObjectCodec[Example] with Serializable
- object ExternalDocumentation extends HasGenObjectCodec[ExternalDocumentation] with Serializable
- object Format
- object Header extends HasGenObjectCodec[Header] with Serializable
- object Info extends HasGenObjectCodec[Info] with Serializable
- object InliningResolver
- object License extends HasGenObjectCodec[License] with Serializable
- object Link extends HasGenObjectCodec[Link] with Serializable
- object Location extends AbstractValueEnumCompanion[Location] with Serializable
- object MediaType extends HasGenObjectCodec[MediaType] with Serializable
- object OAuthFlow extends HasGenObjectCodec[OAuthFlow] with Serializable
- object OAuthFlows extends HasGenObjectCodec[OAuthFlows] with Serializable
- object OpenApi extends HasGenObjectCodec[OpenApi] with Serializable
- object OpenApiMetadata extends RpcMetadataCompanion[OpenApiMetadata] with Serializable
- object OpenApiServlet extends Serializable
- object Operation extends HasGenObjectCodec[Operation] with Serializable
- object Parameter extends HasGenObjectCodec[Parameter] with Serializable
- object PathItem extends HasGenObjectCodec[PathItem] with Serializable
- object Paths extends HasGenObjectCodec[Paths] with Serializable
- object RefOr
- object RequestBody extends HasGenObjectCodec[RequestBody] with Serializable
- object Response extends HasGenObjectCodec[Response] with Serializable
- object Responses extends Serializable
- object RestMediaTypes
- object RestRequestBody
- object RestResponses
- object RestResultType extends Serializable
- object RestSchema
- object RestStructure extends AdtMetadataCompanion[RestStructure]
- object Schema extends HasGenObjectCodec[Schema] with Serializable
- object SecurityRequirement extends HasGenObjectCodec[SecurityRequirement] with Serializable
- object SecurityScheme
- object Server extends HasGenObjectCodec[Server] with Serializable
- object ServerVariable extends HasGenObjectCodec[ServerVariable] with Serializable
- object Style extends AbstractValueEnumCompanion[Style] with Serializable
- object Tag extends HasGenObjectCodec[Tag] with Serializable
- object Xml extends HasGenObjectCodec[Xml] with Serializable