OpenApiSpec

data class OpenApiSpec(    val openapi: String = "3.1.0",     val jsonSchemaDialect: String = "https://json-schema.org/draft/2020-12/schema",     val info: Info,     val servers: MutableList<Server> = mutableListOf(),     val paths: MutableMap<String, Path> = mutableMapOf(),     val webhooks: MutableMap<String, Path> = mutableMapOf(),     val components: Components = Components(),     val security: MutableList<Map<String, List<String>>> = mutableListOf(),     val tags: MutableList<Tag> = mutableListOf(),     val externalDocs: ExternalDocumentation? = null)

This is the root object of the OpenAPI document.

https://spec.openapis.org/oas/v3.1.0#openapi-object

Parameters

openapi

This string MUST be the version number of the OpenAPI Specification that the OpenAPI document uses. Kompendium only supports OpenAPI 3.1

jsonSchemaDialect

The default value for the $schema keyword within Schema Objects contained within this OAS document. Kompendium only supports the 2020 draft

info

Provides metadata about the API.

servers

An array of Server Objects, which provide connectivity information to a target server. If the property is not provided, or is an empty array, the default value would be a Server Object with a url value of /.

paths

The available paths and operations for the API.

webhooks

The incoming webhooks that MAY be received as part of this API and that the API consumer MAY choose to implement.

components

An element to hold various schemas for the document.

security

A declaration of which security mechanisms can be used across the API.

tags

A list of tags used by the document with additional metadata.

externalDocs

Additional external documentation.

Constructors

Link copied to clipboard
fun OpenApiSpec(    openapi: String = "3.1.0",     jsonSchemaDialect: String = "https://json-schema.org/draft/2020-12/schema",     info: Info,     servers: MutableList<Server> = mutableListOf(),     paths: MutableMap<String, Path> = mutableMapOf(),     webhooks: MutableMap<String, Path> = mutableMapOf(),     components: Components = Components(),     security: MutableList<Map<String, List<String>>> = mutableListOf(),     tags: MutableList<Tag> = mutableListOf(),     externalDocs: ExternalDocumentation? = null)

Properties

Link copied to clipboard
val components: Components
Link copied to clipboard
val externalDocs: ExternalDocumentation? = null
Link copied to clipboard
val info: Info
Link copied to clipboard
val jsonSchemaDialect: String
Link copied to clipboard
val openapi: String
Link copied to clipboard
val paths: MutableMap<String, Path>
Link copied to clipboard
val security: MutableList<Map<String, List<String>>>
Link copied to clipboard
val servers: MutableList<Server>
Link copied to clipboard
val tags: MutableList<Tag>
Link copied to clipboard
val webhooks: MutableMap<String, Path>