APIDocumentContext class

An object that contains information about APIDocument being generated.

This object is passed to you in every documentation method. You use this method to work with components and schedule deferred functionality.

Component registries for each type of component - e.g. schema, responses - are used to register and reference those types.

Constructors

APIDocumentContext(APIDocument document)
Creates a new context.

Properties

callbacks APIComponentCollection<APICallback>
Reusable APICallback components.
final
document APIDocument
The document being created.
final
headers APIComponentCollection<APIHeader>
Reusable APIHeader components.
final
parameters APIComponentCollection<APIParameter>
Reusable APIParameter components.
final
requestBodies APIComponentCollection<APIRequestBody>
Reusable APIRequestBody components.
final
responses APIComponentCollection<APIResponse>
Reusable APIResponse components.
final
schema APIComponentCollection<APISchemaObject>
Reusable APISchemaObject components.
final
securitySchemes APIComponentCollection<APISecurityScheme>
Reusable APISecurityScheme components.
final
hashCode → int
The hash code for this object.
read-only, inherited
runtimeType → Type
A representation of the runtime type of the object.
read-only, inherited

Methods

defer(FutureOr document()) → void
Allows asynchronous code during documentation. [...]
finalize() → Future<Map<String, dynamic>>
Finalizes document and returns it as a serializable Map. [...]
noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent method or property is accessed.
inherited
toString() → String
Returns a string representation of this object.
inherited

Operators

operator ==(dynamic other) → bool
The equality operator.
inherited