APIDocumentContext constructor Null safety

APIDocumentContext(
  1. APIDocument document
)

Creates a new context.

Implementation

APIDocumentContext(this.document)
    : schema = APIComponentCollection<APISchemaObject>._(
          "schemas", document.components!.schemas),
      responses = APIComponentCollection<APIResponse>._(
          "responses", document.components!.responses),
      parameters = APIComponentCollection<APIParameter>._(
          "parameters", document.components!.parameters),
      requestBodies = APIComponentCollection<APIRequestBody>._(
          "requestBodies", document.components!.requestBodies),
      headers = APIComponentCollection<APIHeader>._(
          "headers", document.components!.headers),
      securitySchemes = APIComponentCollection<APISecurityScheme>._(
          "securitySchemes", document.components!.securitySchemes),
      callbacks = APIComponentCollection<APICallback>._(
          "callbacks", document.components!.callbacks);