HttpComponent

A reusable OpenAPI component (parameter, header, request body or response) that route contracts reference by key. A contract only holds the reference: nothing is built until the document is rendered. Create one with parameter, header, requestBody or response.

The renderer builds each component once, with the builder given here, and registers it under key; every reference in the document is then a $ref to key (or the component itself when the context inlines schemas).

Keys are unique within a document: two components are equal when their kinds and keys are equal. When two component instances of the same kind share a key, the renderer builds both and, once the schemas are generated, fails the render unless the two built components are equal (including the schemas they reference).

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard
val key: String

Functions

Link copied to clipboard
open operator override fun equals(other: Any?): Boolean
Link copied to clipboard
open override fun hashCode(): Int
Link copied to clipboard
open override fun toString(): String