| Name | Type | Default Value | Flags | Description |
|---|---|---|---|---|
| initialSpec |
T
|
Build the spec object.
Add a custom (extension) property to the spec object.
| Name | Type | Default Value | Flags | Description |
|---|---|---|---|---|
| key |
string
|
The property name starting with "x-". |
||
| value |
any
|
The property value. |
A builder for creating OpenApiSpec documents.
Define a new OperationObject at the given path and verb (method).
| Name | Type | Default Value | Flags | Description |
|---|---|---|---|---|
| verb |
string
|
The HTTP verb. |
||
| path |
string
|
The path relative to basePath. |
||
| spec |
OperationObject | OperationSpecBuilder
|
Additional specification of the operation. |
Define a new operation that returns a string response.
A builder for creating OperationObject specifications.
Define the operation name (controller method name).
| Name | Type | Default Value | Flags | Description |
|---|---|---|---|---|
| name |
string
|
The name of the controller method implementing this operation. |
Describe a parameter accepted by the operation.
Note that parameters are positional in OpenAPI Spec, therefore
the first call of withParameter defines the first parameter,
the second call defines the second parameter, etc.
| Name | Type | Default Value | Flags | Description |
|---|---|---|---|---|
| parameterSpec |
ParameterObject
|
|
| Name | Type | Default Value | Flags | Description |
|---|---|---|---|---|
| requestBodySpec |
RequestBodyObject
|
A builder for creating OperationObject specifications. |
Describe a response for a given HTTP status code.
| Name | Type | Default Value | Flags | Description |
|---|---|---|---|---|
| status |
number |
|
HTTP status code or string "default" |
||
| responseSpec |
ResponseObject
|
Specification of the response |
| Name | Type | Default Value | Flags | Description |
|---|---|---|---|---|
| status |
number |
|
200 |
A builder for creating OperationObject specifications. |
Describe tags associated with the operation
| Name | Type | Default Value | Flags | Description |
|---|---|---|---|---|
| tags |
string | string[]
|
|
Create a new instance of OpenApiSpecBuilder.
Create a new instance of OperationSpecBuilder.