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
hashCode int
The hash code for this object.
no setterinherited
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
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
schema APIComponentCollection<APISchemaObject>
Reusable APISchemaObject components.
final
securitySchemes APIComponentCollection<APISecurityScheme>
Reusable APISecurityScheme components.
final

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 nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited