src/Microsoft.OpenApi.OData.Reader/Generator/OpenApiComponentsGenerator.cs
/// <summary>
/// Create a <see cref="OpenApiComponents"/>.
/// The value of components is a Components Object.
/// It holds maps of reusable schemas describing message bodies, operation parameters, and responses.
/// </summary>
/// <param name="context">The OData to Open API context.</param>
/// <returns>The created <see cref="OpenApiComponents"/> object.</returns>
Create a .
The value of components is a Components Object.
It holds maps of reusable schemas describing message bodies, operation parameters, and responses.
Create a . The value of components is a Components Object . It holds maps of reusable schemas describing message bodies operation parameters and responses .
public static OpenApiComponents CreateComponents(this ODataContext context)
        {
            Utils.CheckArgumentNull(context, nameof(context));
            return new OpenApiComponents
            {
                Schemas = context.CreateSchemas(),
                Parameters = context.CreateParameters(),
                Responses = context.CreateResponses(),
                RequestBodies = null,
                Examples = context.CreateExamples(),
                SecuritySchemes = context.CreateSecuritySchemes(),
                Links = null,
                Callbacks = null,
                Extensions = null
            };
        }
public static OpenApiComponents CreateComponents ( this ODataContext context ) { Utils . CheckArgumentNull ( context , nameof ( context ) ) ; return new OpenApiComponents { Schemas = context . CreateSchemas ( ) , Parameters = context . CreateParameters ( ) , Responses = context . CreateResponses ( ) , RequestBodies = null , Examples = context . CreateExamples ( ) , SecuritySchemes = context . CreateSecuritySchemes ( ) , Links = null , Callbacks = null , Extensions = null } ; }
Create a .
Create a .
// "components": { //   "schemas": …, //   "parameters": …, //   "responses": … //  } // The value of schemas is a map of Schema Objects. // Each entity type, complex type, enumeration type, and type definition directly // or indirectly used in the paths field is represented as a name/value pair of the schemas map. // The value of parameters is a map of Parameter Objects. // It allows defining query options and headers that can be reused across operations of the service. // The value of responses is a map of Response Objects. // It allows defining responses that can be reused across operations of the service. // Make others as null.
The created  object.
The created object .
ODataContext
this
context
The OData to Open API context.
The OData to Open API context .