RootBuilder

class RootBuilder(context: OpenApiDslContext, infoBuilder: InfoBuilder = InfoBuilder(), paths: PathsBuilder = PathsBuilder(context), securitySchemes: MutableMap<String, SecuritySchemeBuilder> = mutableMapOf()) : RootDsl, InfoDsl, PathsDsl, Builder<OpenAPI> , Buildable<OpenAPI>

Builder for the RootDsl.

Constructors

Link copied to clipboard
constructor(context: OpenApiDslContext, infoBuilder: InfoBuilder = InfoBuilder(), paths: PathsBuilder = PathsBuilder(context), securitySchemes: MutableMap<String, SecuritySchemeBuilder> = mutableMapOf())

Functions

Link copied to clipboard
open override fun build(): OpenAPI

Build the object.

Link copied to clipboard
open infix override fun String.delete(path: OperationDsl.() -> Unit)

Adds a path with the given string and creates a "DELETE" operation on it.

Link copied to clipboard
open infix override fun String.get(path: OperationDsl.() -> Unit)

Adds a path with the given string and creates a "GET" operation on it.

Link copied to clipboard
open infix override fun String.head(path: OperationDsl.() -> Unit)

Adds a path with the given string and creates a "HEAD" operation on it.

Link copied to clipboard
open operator override fun String.invoke(path: PathDsl.() -> Unit)

Adds a path with the given string and registers any operations defined in the block.

Link copied to clipboard
open infix override fun String.options(path: OperationDsl.() -> Unit)

Adds a path with the given string and creates a "OPTIONS" operation on it.

Link copied to clipboard
open infix override fun String.patch(path: OperationDsl.() -> Unit)

Adds a path with the given string and creates a "PATCH" operation on it.

Link copied to clipboard
open infix override fun String.post(path: OperationDsl.() -> Unit)

Adds a path with the given string and creates a "POST" operation on it.

Link copied to clipboard
open infix override fun String.put(path: OperationDsl.() -> Unit)

Adds a path with the given string and creates a "PUT" operation on it.

Link copied to clipboard
open infix override fun String.securityScheme(scheme: SecuritySchemeDsl.() -> Unit)

Adds a security scheme to this OpenAPI document with the given string as the name, using the lambda to configure further options.

Link copied to clipboard
open infix override fun String.server(server: ServerDsl.() -> Unit)

Adds a server to this OpenAPI document with the given string as the URL, using the lambda to configure further options.

Link copied to clipboard
open infix override fun String.tag(tagBuilder: TagDsl.() -> Unit)

Add a tag with the given string with a lambda to further configure the tag.

Properties

Link copied to clipboard
open override var contactEmail: String?

The email address of the contact person/organization for the exposed API. THis must be in the form of an email address.

Link copied to clipboard
open override var contactName: String?

The identifying name of the contact person/organization for the exposed API.

Link copied to clipboard
open override var contactUrl: String?

The URL pointing to the contact information for the exposed API. This must be in the form of a URL.

Link copied to clipboard
open override var description: String?

A short summary of the API.

Link copied to clipboard
open override var externalDocsDescription: String?

Description for additional external documentation for this API.

Link copied to clipboard
open override var externalDocsUrl: String?

URL for additional external documentation for this API.

Link copied to clipboard
open override var licenseIdentifier: String?

An SPDX license identifier for the API.

Link copied to clipboard
open override var licenseName: String?

The license name used for the API.

Link copied to clipboard
open override var licenseUrl: String?

A URL to the license used for the API. This must be in the form of a URL.

Link copied to clipboard
open override var summary: String?

A short summary of the API.

Link copied to clipboard
open override var termsOfService: String?

A URL to the Terms of Service for the API. This must be in the form of a URL.

Link copied to clipboard
open override var title: String?

The title of the API.

Link copied to clipboard
open override var version: String?

The version of the OpenAPI document. This is not the same as the version of the OpenAPI specification this document follows.