| Name | Type | Description |
|---|---|---|
| initialSpec |
T
|
Build the spec object.
Add a custom (extension) property to the spec object.
| Name | Type | Description |
|---|---|---|
| key |
string
|
The property name starting with "x-". |
| value |
ExtensionValue
|
The property value. |
A builder for creating OpenApiSpec documents.
Define a new OperationObject at the given path and verb (method).
| Name | Type | Description |
|---|---|---|
| verb |
string
|
The HTTP verb. |
| path |
string
|
The path relative to basePath. |
| spec |
|
Additional specification of the operation. |
Define a new operation that returns a string response.
| Name | Type | Description |
|---|---|---|
| verb |
string
|
The HTTP verb. |
| path |
string
|
The path relative to basePath. |
| operationName |
|
The name of the controller method implementing
this operation ( |
A builder for creating OperationObject specifications.
Define the operation name (controller method name).
| Name | Type | 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 | Description |
|---|---|---|
| parameterSpec |
ParameterObject
|
|
| Name | Type | Description |
|---|---|---|
| requestBodySpec |
RequestBodyObject
|
A builder for creating OperationObject specifications. |
Describe a response for a given HTTP status code.
| Name | Type | Description |
|---|---|---|
| status |
|
HTTP status code or string "default" |
| responseSpec |
ResponseObject
|
Specification of the response |
| Name | Type | Description |
|---|---|---|
| status |
|
A builder for creating OperationObject specifications. |
Describe tags associated with the operation
| Name | Type | Description |
|---|---|---|
| tags |
|
|
Create a new instance of OpenApiSpecBuilder.
Create a new instance of OperationSpecBuilder.