Class OpenApiEndpointCollector

java.lang.Object
com.arc_e_tect.gradle.shadow.openapi.OpenApiEndpointCollector

public class OpenApiEndpointCollector extends Object
Loads a root OpenAPI document - resolving every $ref to other documents relative to it - and collects every HTTP verb + path template pair it describes.
  • Constructor Details

    • OpenApiEndpointCollector

      public OpenApiEndpointCollector()
      Creates a new OpenApiEndpointCollector.
  • Method Details

    • collect

      public List<DescribedEndpoint> collect(File rootDocument)
      Parses rootDocument and every document it links to (relative $refs are resolved automatically), and returns the verb + path template pair described by every operation found.
      Parameters:
      rootDocument - the root OpenAPI document (JSON or YAML)
      Returns:
      possibly-empty list of described endpoints, never null
      Throws:
      IllegalStateException - if the document cannot be parsed