Interface RestApiResponseAdapter

All Known Implementing Classes:
DefaultRestApiResponseAdapter

public interface RestApiResponseAdapter
Adapter for rendering API response
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    copyResult(org.apache.camel.Exchange exchange)
    Copy content from this adapter into the given Exchange.
    io.swagger.v3.oas.models.OpenAPI
    Gets the generated OpenAPI model
    void
    There is no Rest DSL and therefore no OpenAPI spec
    void
    setHeader(String name, String value)
    Adds a header
    void
    setOpenApi(io.swagger.v3.oas.models.OpenAPI openApi)
    Sets the generated OpenAPI model
    void
    writeBytes(byte[] bytes)
    The content of the OpenAPI spec as byte array
  • Method Details

    • setOpenApi

      void setOpenApi(io.swagger.v3.oas.models.OpenAPI openApi)
      Sets the generated OpenAPI model
    • getOpenApi

      io.swagger.v3.oas.models.OpenAPI getOpenApi()
      Gets the generated OpenAPI model
    • setHeader

      void setHeader(String name, String value)
      Adds a header
    • writeBytes

      void writeBytes(byte[] bytes) throws IOException
      The content of the OpenAPI spec as byte array
      Throws:
      IOException
    • noContent

      void noContent()
      There is no Rest DSL and therefore no OpenAPI spec
    • copyResult

      void copyResult(org.apache.camel.Exchange exchange)
      Copy content from this adapter into the given Exchange.