-
public final class OpenApiDocumentationOpenApiDocumentation contains OpenAPI documentation for a Handler.
This class should be modified by the available functions and passed into io.javalin.plugin.openapi.dsl.documented which will include it in the generated documentation.
-
-
Field Summary
Fields Modifier and Type Field Description private BooleanisIgnoredprivate final List<OpenApiUpdater<Operation>>operationUpdaterListprivate final List<OpenApiUpdater<RequestBody>>requestBodyListprivate final Map<String, List<OpenApiUpdater<Parameter>>>parameterUpdaterListMappingprivate final Map<String, List<OpenApiUpdater<ApiResponse>>>responseUpdaterListMappingprivate final List<OpenApiUpdater<Components>>componentsUpdaterListprivate final List<DocumentedFormParameter>formParameterListprivate final List<DocumentedFileUpload>fileUploadList
-
Constructor Summary
Constructors Constructor Description OpenApiDocumentation()
-
Method Summary
Modifier and Type Method Description final BooleangetIsIgnored()final UnitsetIsIgnored(Boolean isIgnored)final List<OpenApiUpdater<Operation>>getOperationUpdaterList()final List<OpenApiUpdater<RequestBody>>getRequestBodyList()final Map<String, List<OpenApiUpdater<Parameter>>>getParameterUpdaterListMapping()final Map<String, List<OpenApiUpdater<ApiResponse>>>getResponseUpdaterListMapping()final List<OpenApiUpdater<Components>>getComponentsUpdaterList()final List<DocumentedFormParameter>getFormParameterList()final List<DocumentedFileUpload>getFileUploadList()final BooleanhasRequestBodies()final BooleanhasResponses()final BooleanhasFormParameter()final BooleanhasFileUploads()final OpenApiDocumentationignore(Boolean isIgnored)Hide the endpoint in the documentation final OpenApiDocumentationignore()Hide the endpoint in the documentation final OpenApiDocumentationoperation(Function1<Operation, Unit> applyUpdates)Documents the handler using the Operation provided by the input applyUpdates. final OpenApiDocumentationoperation(OpenApiUpdater<Operation> openApiUpdater)Documents the handler using the Operation provided by the input openApiUpdater. final OpenApiDocumentationpathParam(String name, Class<?> clazz, OpenApiUpdater<Parameter> openApiUpdater)Documents that the handler can receive a path parameter. final OpenApiDocumentationpathParam(String name, Class<?> clazz)Documents that the handler can receive a path parameter. final OpenApiDocumentationqueryParam(String name, Class<?> clazz, Boolean isRepeatable, OpenApiUpdater<Parameter> openApiUpdater)Documents that the handler can receive a query parameter. final OpenApiDocumentationqueryParam(String name, Class<?> clazz, Boolean isRepeatable)Documents that the handler can receive a query parameter. final OpenApiDocumentationqueryParam(String name, Class<?> clazz)Documents that the handler can receive a query parameter. final OpenApiDocumentationheader(String name, Class<?> clazz, OpenApiUpdater<Parameter> openApiUpdater)Documents that the handler has a header. final OpenApiDocumentationheader(String name, Class<?> clazz)Documents that the handler has a header. final OpenApiDocumentationcookie(String name, Class<?> clazz, OpenApiUpdater<Parameter> openApiUpdater)Documents that the handler can receive a cookie. final OpenApiDocumentationcookie(String name, Class<?> clazz)Documents that the handler can receive a cookie. final OpenApiDocumentationparam(DocumentedParameter documentedParameter, Boolean isRepeatable, Function1<Parameter, Unit> applyUpdates)Documents that the handler can receive a parameter detailed by the input DocumentedParameter. final OpenApiDocumentationparam(DocumentedParameter documentedParameter, Boolean isRepeatable, OpenApiUpdater<Parameter> openApiUpdater)Documents that the handler can receive a parameter detailed by the input DocumentedParameter. final OpenApiDocumentationparam(DocumentedParameter documentedParameter, Boolean isRepeatable)Documents that the handler can receive a parameter detailed by the input DocumentedParameter. final OpenApiDocumentationparam(DocumentedParameter documentedParameter)Documents that the handler can receive a parameter detailed by the input DocumentedParameter. final OpenApiDocumentationformParam(String name, Class<?> clazz, Boolean required)Documents that the handler can receive a form parameter. final OpenApiDocumentationformParam(DocumentedFormParameter formParameter)Documents that the handler can receive a form parameter detailed by the input DocumentedFormParameter. final OpenApiDocumentationformParamBody(Class<?> clazz, OpenApiUpdater<RequestBody> openApiUpdater)Documents that the handler can receive a request body with a content type of application/x-www-form-urlencodedin the form of clazz.final OpenApiDocumentationformParamBody(Class<?> clazz)Documents that the handler can receive a request body with a content type of application/x-www-form-urlencodedin the form of clazz.final OpenApiDocumentationformParamBody(Class<?> clazz, String contentType, OpenApiUpdater<RequestBody> openApiUpdater)Documents that the handler can receive a request body with the input contentType in the form of clazz. final OpenApiDocumentationuploadedFile(String name, Function1<RequestBody, Unit> applyUpdates)Documents that the handler can receive a file with the input name. final OpenApiDocumentationuploadedFile(String name, OpenApiUpdater<RequestBody> openApiUpdater)Documents that the handler can receive a file with the input name. final OpenApiDocumentationuploadedFile(String name)Documents that the handler can receive a file with the input name. final OpenApiDocumentationuploadedFiles(String name, Function1<RequestBody, Unit> applyUpdates)Documents that the handler can receive files with the input name. final OpenApiDocumentationuploadedFiles(String name, OpenApiUpdater<RequestBody> openApiUpdater)Documents that the handler can receive files with the input name. final OpenApiDocumentationuploadedFiles(String name)Documents that the handler can receive files with the input name. final OpenApiDocumentationbody(Class<?> returnType, String contentType, Function1<RequestBody, Unit> applyUpdates)Documents that the handler can receive a request body in the form of returnType. final OpenApiDocumentationbody(Class<?> returnType, OpenApiUpdater<RequestBody> openApiUpdater)Documents that the handler can receive a request body in the form of returnType. final OpenApiDocumentationbody(Composition composition, String contentType, OpenApiUpdater<RequestBody> openApiUpdater)Documents that the handler can receive a request body in the form of the input composition. final OpenApiDocumentationbody(Composition composition, String contentType)Documents that the handler can receive a request body in the form of the input composition. final OpenApiDocumentationbody(Composition composition)Documents that the handler can receive a request body in the form of the input composition. final OpenApiDocumentationbody(Class<?> returnType, String contentType, OpenApiUpdater<RequestBody> openApiUpdater)Documents that the handler can receive a request body in the form of returnType. final OpenApiDocumentationbody(Class<?> returnType, String contentType)Documents that the handler can receive a request body in the form of returnType. final OpenApiDocumentationbody(Class<?> returnType)Documents that the handler can receive a request body in the form of returnType. final OpenApiDocumentationbody(Schema<?> schema, String contentType, OpenApiUpdater<RequestBody> openApiUpdater)Documents that the handler can receive a request body in the form of the input Schema. final OpenApiDocumentationbody(Schema<?> schema, String contentType)Documents that the handler can receive a request body in the form of the input Schema. final OpenApiDocumentationbody(List<DocumentedContent> content, OpenApiUpdater<RequestBody> openApiUpdater, String contentType, ComposedType composedType)Documents that the handler can receive a request body in the form of the input DocumentedRequestBody. final OpenApiDocumentationbody(List<DocumentedContent> content, OpenApiUpdater<RequestBody> openApiUpdater, String contentType)Documents that the handler can receive a request body in the form of the input DocumentedRequestBody. final OpenApiDocumentationbody(List<DocumentedContent> content, OpenApiUpdater<RequestBody> openApiUpdater)Documents that the handler can receive a request body in the form of the input DocumentedRequestBody. final OpenApiDocumentationbody(List<DocumentedContent> content)Documents that the handler can receive a request body in the form of the input DocumentedRequestBody. final OpenApiDocumentationbody(DocumentedRequestBody documentedBody, OpenApiUpdater<RequestBody> openApiUpdater)Documents that the handler can receive a request body in the form of the input DocumentedRequestBody. final OpenApiDocumentationbody(DocumentedRequestBody documentedBody)Documents that the handler can receive a request body in the form of the input DocumentedRequestBody. final OpenApiDocumentationbodyAsBytes(String contentType, Function1<RequestBody, Unit> applyUpdates)Documents that the handler can receive a request body with the input contentType in the form of bytes. final OpenApiDocumentationbodyAsBytes(Function1<RequestBody, Unit> applyUpdates)Documents that the handler can receive a request body with the input contentType in the form of bytes. final OpenApiDocumentationbodyAsBytes(String contentType, OpenApiUpdater<RequestBody> openApiUpdater)Documents that the handler can receive a request body with the input contentType in the form of bytes. final OpenApiDocumentationbodyAsBytes(String contentType)Documents that the handler can receive a request body with the input contentType in the form of bytes. final OpenApiDocumentationbodyAsBytes()Documents that the handler can receive a request body with the input contentType in the form of bytes. final OpenApiDocumentationjsonArray(String status, Class<?> returnType, OpenApiUpdater<ApiResponse> openApiUpdater)Documents that the handler can return the input status code where the response body will contain application/jsonrepresenting an array of returnType.final OpenApiDocumentationjsonArray(String status, Class<?> returnType)Documents that the handler can return the input status code where the response body will contain application/jsonrepresenting an array of returnType.final OpenApiDocumentationjson(String status, Class<?> returnType, OpenApiUpdater<ApiResponse> openApiUpdater)Documents that the handler can return the input status code where the response body will contain application/jsonin the form of returnType.final OpenApiDocumentationjson(String status, Class<?> returnType)Documents that the handler can return the input status code where the response body will contain application/jsonin the form of returnType.final OpenApiDocumentationhtml(String status, Function1<ApiResponse, Unit> applyUpdates)Documents that the handler can return the input status code where the response body will contain text/htmlhtml can be called multiple times with different status codes, all will be added to the generated documentation.final OpenApiDocumentationhtml(String status, OpenApiUpdater<ApiResponse> openApiUpdater)Documents that the handler can return the input status code where the response body will contain text/htmlhtml can be called multiple times with different status codes, all will be added to the generated documentation.final OpenApiDocumentationhtml(String status)Documents that the handler can return the input status code where the response body will contain text/htmlhtml can be called multiple times with different status codes, all will be added to the generated documentation.final OpenApiDocumentationresult(String status, Class<?> returnType, OpenApiUpdater<ApiResponse> openApiUpdater)Documents that the handler can return the input status code where the response body will contain returnType. final OpenApiDocumentationresult(String status, Class<?> returnType)Documents that the handler can return the input status code where the response body will contain returnType. final OpenApiDocumentationresult(String status)Documents that the handler can return the input status code where the response body will contain returnType. final OpenApiDocumentationresult(String status, Class<?> returnType, String contentType, OpenApiUpdater<ApiResponse> openApiUpdater)Documents that the handler can return the input status code where the response body will contain contentType in the form of returnType. final OpenApiDocumentationresult(String status, Class<?> returnType, String contentType)Documents that the handler can return the input status code where the response body will contain contentType in the form of returnType. final OpenApiDocumentationresult(String status, Composition.OneOf composition, Function1<ApiResponse, Unit> applyUpdates)Documents that the handler can return the input status code where the response body could contain different classes represented by Composition.OneOf. final OpenApiDocumentationresult(String status, Composition.OneOf composition)Documents that the handler can return the input status code where the response body could contain different classes represented by Composition.OneOf. final OpenApiDocumentationresult(DocumentedResponse documentedResponse, Function1<ApiResponse, Unit> applyUpdates)Documents that the handler can return the input DocumentedResponse. final OpenApiDocumentationresult(String status, DocumentedContent content, OpenApiUpdater<ApiResponse> updater)Documents that the handler can return the input status code where the response body will contain the input DocumentedContent. final OpenApiDocumentationresult(String status, List<DocumentedContent> content, OpenApiUpdater<ApiResponse> updater)Documents that the handler can return the input status code where the response body could contain the input DocumentedContents. final OpenApiDocumentationresult(DocumentedResponse documentedResponse, OpenApiUpdater<ApiResponse> openApiUpdater)Documents that the handler can return the input DocumentedResponse. final OpenApiDocumentationresult(DocumentedResponse documentedResponse)Documents that the handler can return the input DocumentedResponse. final Unitapply(OpenApiDocumentation other)Merge the values of another documentation into this documentation -
-
Method Detail
-
getIsIgnored
final Boolean getIsIgnored()
-
setIsIgnored
final Unit setIsIgnored(Boolean isIgnored)
-
getOperationUpdaterList
final List<OpenApiUpdater<Operation>> getOperationUpdaterList()
-
getRequestBodyList
final List<OpenApiUpdater<RequestBody>> getRequestBodyList()
-
getParameterUpdaterListMapping
final Map<String, List<OpenApiUpdater<Parameter>>> getParameterUpdaterListMapping()
-
getResponseUpdaterListMapping
final Map<String, List<OpenApiUpdater<ApiResponse>>> getResponseUpdaterListMapping()
-
getComponentsUpdaterList
final List<OpenApiUpdater<Components>> getComponentsUpdaterList()
-
getFormParameterList
final List<DocumentedFormParameter> getFormParameterList()
-
getFileUploadList
final List<DocumentedFileUpload> getFileUploadList()
-
hasRequestBodies
final Boolean hasRequestBodies()
-
hasResponses
final Boolean hasResponses()
-
hasFormParameter
final Boolean hasFormParameter()
-
hasFileUploads
final Boolean hasFileUploads()
-
ignore
@JvmOverloads() final OpenApiDocumentation ignore(Boolean isIgnored)
Hide the endpoint in the documentation
-
ignore
@JvmOverloads() final OpenApiDocumentation ignore()
Hide the endpoint in the documentation
-
operation
final OpenApiDocumentation operation(Function1<Operation, Unit> applyUpdates)
Documents the handler using the Operation provided by the input applyUpdates.
- Parameters:
applyUpdates- A function that returns a Swagger Operation.
-
operation
final OpenApiDocumentation operation(OpenApiUpdater<Operation> openApiUpdater)
Documents the handler using the Operation provided by the input openApiUpdater.
- Parameters:
openApiUpdater- A function that returns a Swagger Operation.
-
pathParam
@JvmOverloads() final OpenApiDocumentation pathParam(String name, Class<?> clazz, OpenApiUpdater<Parameter> openApiUpdater)
Documents that the handler can receive a path parameter.
- Parameters:
name- The name of the parameter.clazz- The class of the parameter.openApiUpdater- A function that allows the underlying Swagger Parameter to modified directly.
-
pathParam
@JvmOverloads() final OpenApiDocumentation pathParam(String name, Class<?> clazz)
Documents that the handler can receive a path parameter.
- Parameters:
name- The name of the parameter.clazz- The class of the parameter.
-
queryParam
@JvmOverloads() final OpenApiDocumentation queryParam(String name, Class<?> clazz, Boolean isRepeatable, OpenApiUpdater<Parameter> openApiUpdater)
Documents that the handler can receive a query parameter.
queryParam can be called multiple times with different names that represent different parameters, all will be added to the generated documentation.
- Parameters:
name- The name of the parameter.clazz- The class of the parameter.isRepeatable- Whether the parameter is repeatable.openApiUpdater- A function that allows the underlying Swagger Parameter to modified directly.
-
queryParam
@JvmOverloads() final OpenApiDocumentation queryParam(String name, Class<?> clazz, Boolean isRepeatable)
Documents that the handler can receive a query parameter.
queryParam can be called multiple times with different names that represent different parameters, all will be added to the generated documentation.
- Parameters:
name- The name of the parameter.clazz- The class of the parameter.isRepeatable- Whether the parameter is repeatable.
-
queryParam
@JvmOverloads() final OpenApiDocumentation queryParam(String name, Class<?> clazz)
Documents that the handler can receive a query parameter.
queryParam can be called multiple times with different names that represent different parameters, all will be added to the generated documentation.
- Parameters:
name- The name of the parameter.clazz- The class of the parameter.
-
header
@JvmOverloads() final OpenApiDocumentation header(String name, Class<?> clazz, OpenApiUpdater<Parameter> openApiUpdater)
Documents that the handler has a header.
header can be called multiple times with different names that represent different headers, all will be added to the generated documentation.
- Parameters:
name- The name of the header.clazz- The class that represents the header.openApiUpdater- A function that allows the underlying Swagger Parameter to modified directly.
-
header
@JvmOverloads() final OpenApiDocumentation header(String name, Class<?> clazz)
Documents that the handler has a header.
header can be called multiple times with different names that represent different headers, all will be added to the generated documentation.
- Parameters:
name- The name of the header.clazz- The class that represents the header.
-
cookie
@JvmOverloads() final OpenApiDocumentation cookie(String name, Class<?> clazz, OpenApiUpdater<Parameter> openApiUpdater)
Documents that the handler can receive a cookie.
cookie can be called multiple times with different names that represent different cookies, all will be added to the generated documentation.
- Parameters:
name- The name of the cookie.clazz- The class that represents the cookie.openApiUpdater- A function that allows the underlying Swagger Parameter to modified directly.
-
cookie
@JvmOverloads() final OpenApiDocumentation cookie(String name, Class<?> clazz)
Documents that the handler can receive a cookie.
cookie can be called multiple times with different names that represent different cookies, all will be added to the generated documentation.
- Parameters:
name- The name of the cookie.clazz- The class that represents the cookie.
-
param
final OpenApiDocumentation param(DocumentedParameter documentedParameter, Boolean isRepeatable, Function1<Parameter, Unit> applyUpdates)
Documents that the handler can receive a parameter detailed by the input DocumentedParameter.
param can be called multiple times with different DocumentedParameters that represent different parameters, all will be added to the generated documentation.
- Parameters:
documentedParameter- The DocumentedParameter the handler can receive.isRepeatable- Whether the parameter is repeatable.applyUpdates- A function that allows the underlying Swagger Parameter to modified directly.
-
param
@JvmOverloads() final OpenApiDocumentation param(DocumentedParameter documentedParameter, Boolean isRepeatable, OpenApiUpdater<Parameter> openApiUpdater)
Documents that the handler can receive a parameter detailed by the input DocumentedParameter.
param can be called multiple times with different DocumentedParameters that represent different parameters, all will be added to the generated documentation.
- Parameters:
documentedParameter- The DocumentedParameter the handler can receive.isRepeatable- Whether the parameter is repeatable.openApiUpdater- A function that allows the underlying Swagger Parameter to modified directly.
-
param
@JvmOverloads() final OpenApiDocumentation param(DocumentedParameter documentedParameter, Boolean isRepeatable)
Documents that the handler can receive a parameter detailed by the input DocumentedParameter.
param can be called multiple times with different DocumentedParameters that represent different parameters, all will be added to the generated documentation.
- Parameters:
documentedParameter- The DocumentedParameter the handler can receive.isRepeatable- Whether the parameter is repeatable.
-
param
@JvmOverloads() final OpenApiDocumentation param(DocumentedParameter documentedParameter)
Documents that the handler can receive a parameter detailed by the input DocumentedParameter.
param can be called multiple times with different DocumentedParameters that represent different parameters, all will be added to the generated documentation.
- Parameters:
documentedParameter- The DocumentedParameter the handler can receive.
-
formParam
final OpenApiDocumentation formParam(String name, Class<?> clazz, Boolean required)
Documents that the handler can receive a form parameter.
formParam can be called multiple times with different names that represent different form parameters, all will be added to the generated documentation.
- Parameters:
name- The name of the parameter.clazz- The class of the parameter.required- Whether the parameter is required.
-
formParam
final OpenApiDocumentation formParam(DocumentedFormParameter formParameter)
Documents that the handler can receive a form parameter detailed by the input DocumentedFormParameter.
formParam can be called multiple times with different DocumentedFormParameters that represent different form parameters, all will be added to the generated documentation.
- Parameters:
formParameter- The DocumentedFormParameter the handler can receive.
-
formParamBody
@JvmOverloads() final OpenApiDocumentation formParamBody(Class<?> clazz, OpenApiUpdater<RequestBody> openApiUpdater)
Documents that the handler can receive a request body with a content type of
application/x-www-form-urlencodedin the form of clazz.- Parameters:
clazz- The class that the handler can receive in its request body.openApiUpdater- A function that allows the underlying Swagger RequestBody to modified directly.
-
formParamBody
@JvmOverloads() final OpenApiDocumentation formParamBody(Class<?> clazz)
Documents that the handler can receive a request body with a content type of
application/x-www-form-urlencodedin the form of clazz.- Parameters:
clazz- The class that the handler can receive in its request body.
-
formParamBody
final OpenApiDocumentation formParamBody(Class<?> clazz, String contentType, OpenApiUpdater<RequestBody> openApiUpdater)
Documents that the handler can receive a request body with the input contentType in the form of clazz.
If no contentType is provided then a content type of
application/x-www-form-urlencodedis used.- Parameters:
clazz- The class that the handler can receive in its request body.contentType- The content type of the request body.openApiUpdater- A function that allows the underlying Swagger RequestBody to modified directly.
-
uploadedFile
final OpenApiDocumentation uploadedFile(String name, Function1<RequestBody, Unit> applyUpdates)
Documents that the handler can receive a file with the input name.
uploadedFile can be called multiple times with different names that represent different files, all will be added to the generated documentation.
- Parameters:
name- The name of the uploaded files.applyUpdates- A function that allows the underlying Swagger RequestBody to modified directly.
-
uploadedFile
@JvmOverloads() final OpenApiDocumentation uploadedFile(String name, OpenApiUpdater<RequestBody> openApiUpdater)
Documents that the handler can receive a file with the input name.
uploadedFile can be called multiple times with different names that represent different files, all will be added to the generated documentation.
- Parameters:
name- The name of the uploaded files.openApiUpdater- A function that allows the underlying Swagger RequestBody to modified directly.
-
uploadedFile
@JvmOverloads() final OpenApiDocumentation uploadedFile(String name)
Documents that the handler can receive a file with the input name.
uploadedFile can be called multiple times with different names that represent different files, all will be added to the generated documentation.
- Parameters:
name- The name of the uploaded files.
-
uploadedFiles
final OpenApiDocumentation uploadedFiles(String name, Function1<RequestBody, Unit> applyUpdates)
Documents that the handler can receive files with the input name.
uploadedFiles can be called multiple times with different names that represent different files, all will be added to the generated documentation.
- Parameters:
name- The name of the uploaded files.applyUpdates- A function that allows the underlying Swagger RequestBody to modified directly.
-
uploadedFiles
@JvmOverloads() final OpenApiDocumentation uploadedFiles(String name, OpenApiUpdater<RequestBody> openApiUpdater)
Documents that the handler can receive files with the input name.
uploadedFiles can be called multiple times with different names that represent different files, all will be added to the generated documentation.
- Parameters:
name- The name of the uploaded files.openApiUpdater- A function that allows the underlying Swagger RequestBody to modified directly.
-
uploadedFiles
@JvmOverloads() final OpenApiDocumentation uploadedFiles(String name)
Documents that the handler can receive files with the input name.
uploadedFiles can be called multiple times with different names that represent different files, all will be added to the generated documentation.
- Parameters:
name- The name of the uploaded files.
-
body
final OpenApiDocumentation body(Class<?> returnType, String contentType, Function1<RequestBody, Unit> applyUpdates)
Documents that the handler can receive a request body in the form of returnType.
body can be called multiple times that represent different request bodies, all will be added to the generated documentation.
- Parameters:
returnType- The class that the handler can receive in its request body.contentType- The content type of the request body.applyUpdates- A function that allows the underlying Swagger RequestBody to modified directly.
-
body
final OpenApiDocumentation body(Class<?> returnType, OpenApiUpdater<RequestBody> openApiUpdater)
Documents that the handler can receive a request body in the form of returnType.
body can be called multiple times that represent different request bodies, all will be added to the generated documentation.
- Parameters:
returnType- The class that the handler can receive in its request body.openApiUpdater- A function that allows the underlying Swagger RequestBody to modified directly.
-
body
@JvmOverloads() final OpenApiDocumentation body(Composition composition, String contentType, OpenApiUpdater<RequestBody> openApiUpdater)
Documents that the handler can receive a request body in the form of the input composition.
body can be called multiple times that represent different request bodies, all will be added to the generated documentation.
- Parameters:
composition- The Composition that the handler can receive in its request body.contentType- The content type of the request body.openApiUpdater- A function that allows the underlying Swagger RequestBody to modified directly.
-
body
@JvmOverloads() final OpenApiDocumentation body(Composition composition, String contentType)
Documents that the handler can receive a request body in the form of the input composition.
body can be called multiple times that represent different request bodies, all will be added to the generated documentation.
- Parameters:
composition- The Composition that the handler can receive in its request body.contentType- The content type of the request body.
-
body
@JvmOverloads() final OpenApiDocumentation body(Composition composition)
Documents that the handler can receive a request body in the form of the input composition.
body can be called multiple times that represent different request bodies, all will be added to the generated documentation.
- Parameters:
composition- The Composition that the handler can receive in its request body.
-
body
@JvmOverloads() final OpenApiDocumentation body(Class<?> returnType, String contentType, OpenApiUpdater<RequestBody> openApiUpdater)
Documents that the handler can receive a request body in the form of returnType.
body can be called multiple times that represent different request bodies, all will be added to the generated documentation.
- Parameters:
returnType- The class that the handler can receive in its request body.contentType- The content type of the request body.openApiUpdater- A function that allows the underlying Swagger RequestBody to modified directly.
-
body
@JvmOverloads() final OpenApiDocumentation body(Class<?> returnType, String contentType)
Documents that the handler can receive a request body in the form of returnType.
body can be called multiple times that represent different request bodies, all will be added to the generated documentation.
- Parameters:
returnType- The class that the handler can receive in its request body.contentType- The content type of the request body.
-
body
@JvmOverloads() final OpenApiDocumentation body(Class<?> returnType)
Documents that the handler can receive a request body in the form of returnType.
body can be called multiple times that represent different request bodies, all will be added to the generated documentation.
- Parameters:
returnType- The class that the handler can receive in its request body.
-
body
@JvmOverloads() final OpenApiDocumentation body(Schema<?> schema, String contentType, OpenApiUpdater<RequestBody> openApiUpdater)
Documents that the handler can receive a request body in the form of the input Schema.
body can be called multiple times that represent different request bodies, all will be added to the generated documentation.
- Parameters:
schema- The Schema that the handler can receive in its request body.contentType- The content type of the request body.openApiUpdater- A function that allows the underlying Swagger RequestBody to modified directly.
-
body
@JvmOverloads() final OpenApiDocumentation body(Schema<?> schema, String contentType)
Documents that the handler can receive a request body in the form of the input Schema.
body can be called multiple times that represent different request bodies, all will be added to the generated documentation.
- Parameters:
schema- The Schema that the handler can receive in its request body.contentType- The content type of the request body.
-
body
@JvmOverloads() final OpenApiDocumentation body(List<DocumentedContent> content, OpenApiUpdater<RequestBody> openApiUpdater, String contentType, ComposedType composedType)
Documents that the handler can receive a request body in the form of the input DocumentedRequestBody.
body can be called multiple times that represent different request bodies, all will be added to the generated documentation.
- Parameters:
content- The DocumentedContents that the handler can receive in its request body.openApiUpdater- A function that allows the underlying Swagger RequestBody to modified directly.contentType- The content type of the request body.composedType- The ComposedType of the request body's content.
-
body
@JvmOverloads() final OpenApiDocumentation body(List<DocumentedContent> content, OpenApiUpdater<RequestBody> openApiUpdater, String contentType)
Documents that the handler can receive a request body in the form of the input DocumentedRequestBody.
body can be called multiple times that represent different request bodies, all will be added to the generated documentation.
- Parameters:
content- The DocumentedContents that the handler can receive in its request body.openApiUpdater- A function that allows the underlying Swagger RequestBody to modified directly.contentType- The content type of the request body.
-
body
@JvmOverloads() final OpenApiDocumentation body(List<DocumentedContent> content, OpenApiUpdater<RequestBody> openApiUpdater)
Documents that the handler can receive a request body in the form of the input DocumentedRequestBody.
body can be called multiple times that represent different request bodies, all will be added to the generated documentation.
- Parameters:
content- The DocumentedContents that the handler can receive in its request body.openApiUpdater- A function that allows the underlying Swagger RequestBody to modified directly.
-
body
@JvmOverloads() final OpenApiDocumentation body(List<DocumentedContent> content)
Documents that the handler can receive a request body in the form of the input DocumentedRequestBody.
body can be called multiple times that represent different request bodies, all will be added to the generated documentation.
- Parameters:
content- The DocumentedContents that the handler can receive in its request body.
-
body
@JvmOverloads() final OpenApiDocumentation body(DocumentedRequestBody documentedBody, OpenApiUpdater<RequestBody> openApiUpdater)
Documents that the handler can receive a request body in the form of the input DocumentedRequestBody.
body can be called multiple times that represent different request bodies, all will be added to the generated documentation.
- Parameters:
documentedBody- The DocumentedRequestBody that the handler can receive.openApiUpdater- A function that allows the underlying Swagger RequestBody to modified directly.
-
body
@JvmOverloads() final OpenApiDocumentation body(DocumentedRequestBody documentedBody)
Documents that the handler can receive a request body in the form of the input DocumentedRequestBody.
body can be called multiple times that represent different request bodies, all will be added to the generated documentation.
- Parameters:
documentedBody- The DocumentedRequestBody that the handler can receive.
-
bodyAsBytes
@JvmOverloads() final OpenApiDocumentation bodyAsBytes(String contentType, Function1<RequestBody, Unit> applyUpdates)
Documents that the handler can receive a request body with the input contentType in the form of bytes.
bodyAsBytes can be called multiple times that represent different request bodies, all will be added to the generated documentation.
- Parameters:
contentType- The content type of the request body.applyUpdates- A function that allows the underlying Swagger RequestBody to modified directly.
-
bodyAsBytes
@JvmOverloads() final OpenApiDocumentation bodyAsBytes(Function1<RequestBody, Unit> applyUpdates)
Documents that the handler can receive a request body with the input contentType in the form of bytes.
bodyAsBytes can be called multiple times that represent different request bodies, all will be added to the generated documentation.
- Parameters:
applyUpdates- A function that allows the underlying Swagger RequestBody to modified directly.
-
bodyAsBytes
@JvmOverloads() final OpenApiDocumentation bodyAsBytes(String contentType, OpenApiUpdater<RequestBody> openApiUpdater)
Documents that the handler can receive a request body with the input contentType in the form of bytes.
bodyAsBytes can be called multiple times that represent different request bodies, all will be added to the generated documentation.
- Parameters:
contentType- The content type of the request body.openApiUpdater- A function that allows the underlying Swagger RequestBody to modified directly.
-
bodyAsBytes
@JvmOverloads() final OpenApiDocumentation bodyAsBytes(String contentType)
Documents that the handler can receive a request body with the input contentType in the form of bytes.
bodyAsBytes can be called multiple times that represent different request bodies, all will be added to the generated documentation.
- Parameters:
contentType- The content type of the request body.
-
bodyAsBytes
@JvmOverloads() final OpenApiDocumentation bodyAsBytes()
Documents that the handler can receive a request body with the input contentType in the form of bytes.
bodyAsBytes can be called multiple times that represent different request bodies, all will be added to the generated documentation.
-
jsonArray
@JvmOverloads() final OpenApiDocumentation jsonArray(String status, Class<?> returnType, OpenApiUpdater<ApiResponse> openApiUpdater)
Documents that the handler can return the input status code where the response body will contain
application/jsonrepresenting an array of returnType.A schema will be added to represent class T in the documentation.
jsonArray can be called multiple times with different status codes, all will be added to the generated documentation.
- Parameters:
status- The status code to document.returnType- The class that the documented response body contains.openApiUpdater- A function that allows the underlying Swagger ApiResponse to modified directly.
-
jsonArray
@JvmOverloads() final OpenApiDocumentation jsonArray(String status, Class<?> returnType)
Documents that the handler can return the input status code where the response body will contain
application/jsonrepresenting an array of returnType.A schema will be added to represent class T in the documentation.
jsonArray can be called multiple times with different status codes, all will be added to the generated documentation.
- Parameters:
status- The status code to document.returnType- The class that the documented response body contains.
-
json
@JvmOverloads() final OpenApiDocumentation json(String status, Class<?> returnType, OpenApiUpdater<ApiResponse> openApiUpdater)
Documents that the handler can return the input status code where the response body will contain
application/jsonin the form of returnType.A schema will be added to represent class returnType in the documentation.
json can be called multiple times with different status codes, all will be added to the generated documentation.
- Parameters:
status- The status code to document.returnType- The class that the documented response body contains.openApiUpdater- A function that allows the underlying Swagger ApiResponse to modified directly.
-
json
@JvmOverloads() final OpenApiDocumentation json(String status, Class<?> returnType)
Documents that the handler can return the input status code where the response body will contain
application/jsonin the form of returnType.A schema will be added to represent class returnType in the documentation.
json can be called multiple times with different status codes, all will be added to the generated documentation.
- Parameters:
status- The status code to document.returnType- The class that the documented response body contains.
-
html
final OpenApiDocumentation html(String status, Function1<ApiResponse, Unit> applyUpdates)
Documents that the handler can return the input status code where the response body will contain
text/htmlhtml can be called multiple times with different status codes, all will be added to the generated documentation.
- Parameters:
status- The status code to document.applyUpdates- A function that allows the underlying Swagger ApiResponse to modified directly.
-
html
@JvmOverloads() final OpenApiDocumentation html(String status, OpenApiUpdater<ApiResponse> openApiUpdater)
Documents that the handler can return the input status code where the response body will contain
text/htmlhtml can be called multiple times with different status codes, all will be added to the generated documentation.
- Parameters:
status- The status code to document.openApiUpdater- A function that allows the underlying Swagger ApiResponse to modified directly.
-
html
@JvmOverloads() final OpenApiDocumentation html(String status)
Documents that the handler can return the input status code where the response body will contain
text/htmlhtml can be called multiple times with different status codes, all will be added to the generated documentation.
- Parameters:
status- The status code to document.
-
result
@JvmOverloads() final OpenApiDocumentation result(String status, Class<?> returnType, OpenApiUpdater<ApiResponse> openApiUpdater)
Documents that the handler can return the input status code where the response body will contain returnType.
result can be called multiple times with different status codes, all will be added to the generated documentation.
- Parameters:
status- The status code to document.returnType- The class that the documented response body contains.openApiUpdater- A function that allows the underlying Swagger ApiResponse to modified directly.
-
result
@JvmOverloads() final OpenApiDocumentation result(String status, Class<?> returnType)
Documents that the handler can return the input status code where the response body will contain returnType.
result can be called multiple times with different status codes, all will be added to the generated documentation.
- Parameters:
status- The status code to document.returnType- The class that the documented response body contains.
-
result
@JvmOverloads() final OpenApiDocumentation result(String status)
Documents that the handler can return the input status code where the response body will contain returnType.
result can be called multiple times with different status codes, all will be added to the generated documentation.
- Parameters:
status- The status code to document.
-
result
@JvmOverloads() final OpenApiDocumentation result(String status, Class<?> returnType, String contentType, OpenApiUpdater<ApiResponse> openApiUpdater)
Documents that the handler can return the input status code where the response body will contain contentType in the form of returnType.
result can be called multiple times with different status codes, all will be added to the generated documentation.
- Parameters:
status- The status code to document.returnType- The class that the documented response body contains.openApiUpdater- A function that allows the underlying Swagger ApiResponse to modified directly.
-
result
@JvmOverloads() final OpenApiDocumentation result(String status, Class<?> returnType, String contentType)
Documents that the handler can return the input status code where the response body will contain contentType in the form of returnType.
result can be called multiple times with different status codes, all will be added to the generated documentation.
- Parameters:
status- The status code to document.returnType- The class that the documented response body contains.
-
result
@JvmOverloads() final OpenApiDocumentation result(String status, Composition.OneOf composition, Function1<ApiResponse, Unit> applyUpdates)
Documents that the handler can return the input status code where the response body could contain different classes represented by Composition.OneOf.
result can be called multiple times with different status codes, all will be added to the generated documentation.
- Parameters:
status- The status code to document.composition- The classes that could be contained in the documented response body.applyUpdates- A function that allows the underlying Swagger ApiResponse to modified directly.
-
result
@JvmOverloads() final OpenApiDocumentation result(String status, Composition.OneOf composition)
Documents that the handler can return the input status code where the response body could contain different classes represented by Composition.OneOf.
result can be called multiple times with different status codes, all will be added to the generated documentation.
- Parameters:
status- The status code to document.composition- The classes that could be contained in the documented response body.
-
result
final OpenApiDocumentation result(DocumentedResponse documentedResponse, Function1<ApiResponse, Unit> applyUpdates)
Documents that the handler can return the input DocumentedResponse.
result can be called multiple times with different DocumentedResponses that represent different status codes, all will be added to the generated documentation.
- Parameters:
documentedResponse- The DocumentedResponse to use.applyUpdates- A function that allows the underlying Swagger ApiResponse to modified directly.
-
result
final OpenApiDocumentation result(String status, DocumentedContent content, OpenApiUpdater<ApiResponse> updater)
Documents that the handler can return the input status code where the response body will contain the input DocumentedContent.
result can be called multiple times with different DocumentedResponses that represent different status codes, all will be added to the generated documentation.
- Parameters:
status- The status code to document.content- The DocumentedContent that the documented response body contains.updater- A function that allows the underlying Swagger ApiResponse to modified directly.
-
result
final OpenApiDocumentation result(String status, List<DocumentedContent> content, OpenApiUpdater<ApiResponse> updater)
Documents that the handler can return the input status code where the response body could contain the input DocumentedContents.
result can be called multiple times with different DocumentedResponses that represent different status codes, all will be added to the generated documentation.
- Parameters:
status- The status code to document.content- The DocumentedContents that the documented response body could contain.updater- A function that allows the underlying Swagger ApiResponse to modified directly.
-
result
@JvmOverloads() final OpenApiDocumentation result(DocumentedResponse documentedResponse, OpenApiUpdater<ApiResponse> openApiUpdater)
Documents that the handler can return the input DocumentedResponse.
result can be called multiple times with different DocumentedResponses that represent different status codes, all will be added to the generated documentation.
- Parameters:
documentedResponse- The DocumentedResponse to use.openApiUpdater- A function that allows the underlying Swagger ApiResponse to modified directly.
-
result
@JvmOverloads() final OpenApiDocumentation result(DocumentedResponse documentedResponse)
Documents that the handler can return the input DocumentedResponse.
result can be called multiple times with different DocumentedResponses that represent different status codes, all will be added to the generated documentation.
- Parameters:
documentedResponse- The DocumentedResponse to use.
-
apply
final Unit apply(OpenApiDocumentation other)
Merge the values of another documentation into this documentation
-
-
-
-