Class Component

All Implemented Interfaces:
Direct Known Subclasses:
CallbackObject, ComponentsObject, EncodingObject, ExampleObject, ExternalDocumentation, InfoObject, LinkObject, MediaTypeObject, OpenApi, OperationObject, ParameterObject, PathItem, RequestBodyObject, ResponseObject, SecurityScheme, ServerObject, TagObject, XmlObject

public abstract class Component extends Object implements ToNode
Abstract class used for most OpenAPI model components.

This class provides the ability to add arbitrary key-value pairs to just about everything in the model. You'll need to ensure that "x-" is added to each key to ensure compliance. "x-" can be omitted if adding something that's built-in to the OpenAPI spec but not directly supported in this package (for example, "discriminator", "examples", etc).

  • Constructor Details

  • Method Details

    • getExtension

      public final Optional<Node> getExtension(String name)
    • getExtensions

      public final Map<String,Node> getExtensions()
    • toNode

      public final Node toNode()
      Description copied from interface: ToNode
      Converts a value to a Node.
      Specified by:
      toNode in interface ToNode
      Returns the creates Node.
    • createNodeBuilder

      protected abstract ObjectNode.Builder createNodeBuilder()
    • equals

      public final boolean equals(Object o)
      equals in class Object
    • hashCode

      public final int hashCode()
      hashCode in class Object