swagger.io/docs/specification/api-host-and-base-path/
swagger.io/docs/specification/basic-structure/
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.Fixed Fields
Field NameTypeDescription
schemas | Map[string, Schema Object | Reference Object] | An object to hold reusable Schema Objects. |
responses | Map[string, Response Object | Reference Object] | An object to hold reusable Response Objects. |
parameters | Map[string, Parameter Object | Reference Object] | An object to hold reusable Parameter Objects. |
examples | Map[string, Example Object | Reference Object] | An object to hold reusable Example Objects. |
requestBodies | Map[string, Request Body Object | Reference Object] | An object to hold reusable Request Body Objects. |
headers | Map[string, Header Object | Reference Object] | An object to hold reusable Header Objects. |
securitySchemes | Map[string, Security Scheme Object | Reference Object] | An object to hold reusable Security Scheme Objects. |
links | Map[string, Link Object | Reference Object] | An object to hold reusable Link Objects. |
callbacks | Map[string, Callback Object | Reference Object] | An object to hold reusable Callback Objects. |
This object MAY be extended with Specification Extensions.
All the fixed fields declared above are objects that MUST use keys that match the regular expression: ^[a-zA-Z0-9\.\-_]+$.
Field Name Examples:
Components Object Example