Package org.apache.tapestry5.internal.services.rest

# Class DefaultOpenApiDescriptionGenerator

java.lang.Object
org.apache.tapestry5.internal.services.rest.DefaultOpenApiDescriptionGenerator

All Implemented Interfaces:
  `OpenApiDescriptionGenerator`

public class DefaultOpenApiDescriptionGenerator extends Object implements OpenApiDescriptionGenerator
OpenApiDescriptionGenerator that generates lots, if not most, of the application's OpenAPI 3.0 documentation.

Since:
  5.8.0

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `DefaultOpenApiDescriptionGenerator(OpenApiTypeDescriber typeDescriber, MappedEntityManager mappedEntityManager, BaseURLSource baseUrlSource, SymbolSource symbolSource, ComponentMessagesSource componentMessagesSource, ThreadLocale threadLocale, PageSource pageSource, ComponentClassResolver componentClassResolver, PageRenderLinkSource pageRenderLinkSource, Request request)`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `Method`
  `findMethod(Class<?> pageClass, String name, List<Class> parameterTypes)`
  `JSONObject`
  `generate(JSONObject documentation)`
  Generates or customizes the OpenAPI 3.0 documentation for this webapp's REST endpoints.
  `Optional<String>`
  `getValue(Method method, String suffix, boolean skipClassNameLookup)`
  `Optional<String>`
  `getValue(Method method, String path, String httpMethod, int statusCode)`
  `Optional<String>`
  `getValue(Method method, String path, String httpMethod, Parameter parameter, String property)`
  `Optional<String>`
  `getValue(Method method, String path, String httpMethod, String middle, String propertyName)`

  ### Methods inherited from class java.lang.Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## Constructor Details

  - ### DefaultOpenApiDescriptionGenerator

    public DefaultOpenApiDescriptionGenerator(OpenApiTypeDescriber typeDescriber, MappedEntityManager mappedEntityManager, BaseURLSource baseUrlSource, SymbolSource symbolSource, ComponentMessagesSource componentMessagesSource, ThreadLocale threadLocale, PageSource pageSource, ComponentClassResolver componentClassResolver, PageRenderLinkSource pageRenderLinkSource, Request request)

- ## Method Details

  - ### generate

    public JSONObject generate(JSONObject documentation)
    Description copied from interface: `OpenApiDescriptionGenerator`
    Generates or customizes the OpenAPI 3.0 documentation for this webapp's REST endpoints.
    Specified by:
      `generate` in interface `OpenApiDescriptionGenerator`
    Parameters:
      `documentation` - a `JSONObject` object.
    Returns:
      the generated or customized OpenAPI 3.0 documentation as a JSON object.

  - ### getValue

    public Optional<String> getValue(Method method, String path, String httpMethod, Parameter parameter, String property)

  - ### getValue

    public Optional<String> getValue(Method method, String path, String httpMethod, int statusCode)

  - ### getValue

    public Optional<String> getValue(Method method, String path, String httpMethod, String middle, String propertyName)

  - ### getValue

    public Optional<String> getValue(Method method, String suffix, boolean skipClassNameLookup)

  - ### findMethod

    public Method findMethod(Class<?> pageClass, String name, List<Class> parameterTypes) throws NoSuchMethodException
    Throws:
      `NoSuchMethodException`