CodeSquared docs

OasComponents

OasComponents is an object representing the OpenAPI components object.

Properties

PropertyTypeDescription
schemasRecord<RefName, OasSchema> | undefinedAn optional map of schemas.
responsesRecord<RefName, OasResponse> | undefinedAn optional map of responses.
parametersRecord<RefName, OasParameter> | undefinedAn optional map of parameters.
examplesRecord<RefName, OasExample> | undefinedAn optional map of examples.
requestBodiesRecord<RefName, OasRequestBody> | undefinedAn optional map of request bodies.
headersRecord<RefName, OasHeader> | undefinedAn optional map of headers.
extensionFieldsRecord<RefName, unknown> | undefinedAn optional map of custom fields defined by OpenAPI extensions. Keys are strings beginning with x- and values are of any valid JSON type.

Methods

toSchemasRefNames

Returns an array of all schema RefNames in the components object.

components.toSchemasRefNames();

Return value

An array of all schema RefNames in the components object.