Package org.apache.camel.openapi
Class DefaultRestApiResponseAdapter
java.lang.Object
org.apache.camel.openapi.DefaultRestApiResponseAdapter
- All Implemented Interfaces:
RestApiResponseAdapter
A
RestApiResponseAdapter that caches the response.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidcopyResult(org.apache.camel.Exchange exchange) Copy content from this adapter into the givenExchange.io.swagger.v3.oas.models.OpenAPIGets the generated OpenAPI modelvoidThere is no Rest DSL and therefore no OpenAPI specvoidAdds a headervoidsetOpenApi(io.swagger.v3.oas.models.OpenAPI openApi) Sets the generated OpenAPI modelvoidwriteBytes(byte[] bytes) The content of the OpenAPI spec as byte array
-
Constructor Details
-
DefaultRestApiResponseAdapter
public DefaultRestApiResponseAdapter()
-
-
Method Details
-
getOpenApi
public io.swagger.v3.oas.models.OpenAPI getOpenApi()Description copied from interface:RestApiResponseAdapterGets the generated OpenAPI model- Specified by:
getOpenApiin interfaceRestApiResponseAdapter
-
setOpenApi
public void setOpenApi(io.swagger.v3.oas.models.OpenAPI openApi) Description copied from interface:RestApiResponseAdapterSets the generated OpenAPI model- Specified by:
setOpenApiin interfaceRestApiResponseAdapter
-
setHeader
Description copied from interface:RestApiResponseAdapterAdds a header- Specified by:
setHeaderin interfaceRestApiResponseAdapter
-
writeBytes
Description copied from interface:RestApiResponseAdapterThe content of the OpenAPI spec as byte array- Specified by:
writeBytesin interfaceRestApiResponseAdapter- Throws:
IOException
-
noContent
public void noContent()Description copied from interface:RestApiResponseAdapterThere is no Rest DSL and therefore no OpenAPI spec- Specified by:
noContentin interfaceRestApiResponseAdapter
-
copyResult
public void copyResult(org.apache.camel.Exchange exchange) Description copied from interface:RestApiResponseAdapterCopy content from this adapter into the givenExchange.- Specified by:
copyResultin interfaceRestApiResponseAdapter
-