Class ComponentsObjectBuilder


  • public class ComponentsObjectBuilder
    extends java.lang.Object
    Holds a set of reusable objects for different aspects of the OAS. All objects defined within the components object will have no effect on the API unless they are explicitly referenced from properties outside the components object.
    • Constructor Detail

      • ComponentsObjectBuilder

        public ComponentsObjectBuilder()
    • Method Detail

      • withSchemas

        public ComponentsObjectBuilder withSchemas​(java.util.Map<java.lang.String,​SchemaObject> schemas)
        Parameters:
        schemas - An object to hold reusable Schema Objects.
        Returns:
        The current builder
      • withResponses

        public ComponentsObjectBuilder withResponses​(java.util.Map<java.lang.String,​ResponseObject> responses)
        Parameters:
        responses - An object to hold reusable Response Objects.
        Returns:
        The current builder
      • withParameters

        public ComponentsObjectBuilder withParameters​(java.util.Map<java.lang.String,​ParameterObject> parameters)
        Parameters:
        parameters - An object to hold reusable Parameter Objects.
        Returns:
        The current builder
      • withExamples

        public ComponentsObjectBuilder withExamples​(java.util.Map<java.lang.String,​ExampleObject> examples)
        Parameters:
        examples - An object to hold reusable Example Objects.
        Returns:
        The current builder
      • withRequestBodies

        public ComponentsObjectBuilder withRequestBodies​(java.util.Map<java.lang.String,​RequestBodyObject> requestBodies)
        Parameters:
        requestBodies - An object to hold reusable Request Body Objects.
        Returns:
        The current builder
      • withHeaders

        public ComponentsObjectBuilder withHeaders​(java.util.Map<java.lang.String,​HeaderObject> headers)
        Parameters:
        headers - An object to hold reusable Header Objects.
        Returns:
        The current builder
      • withSecuritySchemes

        public ComponentsObjectBuilder withSecuritySchemes​(java.util.Map<java.lang.String,​SecuritySchemeObject> securitySchemes)
        Parameters:
        securitySchemes - An object to hold reusable Security Scheme Objects.
        Returns:
        The current builder
      • withLinks

        public ComponentsObjectBuilder withLinks​(java.util.Map<java.lang.String,​LinkObject> links)
        Parameters:
        links - An object to hold reusable Link Objects.
        Returns:
        The current builder
      • withCallbacks

        public ComponentsObjectBuilder withCallbacks​(java.util.Map<java.lang.String,​CallbackObject> callbacks)
        Parameters:
        callbacks - An object to hold reusable Callback Objects.
        Returns:
        The current builder
      • componentsObject

        public static ComponentsObjectBuilder componentsObject​(ComponentsObject toCopy)
        Creates a builder for a ComponentsObject based on an existing components object
        Parameters:
        toCopy - A component to copy. If null then an empty builder is returned.
        Returns:
        A new builder pre-populated with values from an existing component