OpenApiDocument class

Builds the OpenAPI document from the registered routes and serves it.

Each route gets its docs from OpenApiConfig.registry (made by dox_builder from the controllers), the route body: option and the form request. Routes the registry does not know still get a basic entry.

Constructors

OpenApiDocument(OpenApiConfig config)

Properties

config → OpenApiConfig
final
hashCode → int
The hash code for this object.
no setterinherited
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited

Methods

build(Iterable<RouteData> routes) → OpenApi
The document for routes.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
register() → void
Add GET /docs, /openapi.json and /openapi.yaml.
serve(DoxRequest req) → dynamic
Controller of the docs routes. The document is built and encoded on the first request, and again only when routes were added.
toString() → String
A string representation of this object.
inherited
write(String dir) → Future<List<File>>
Write openapi.json and openapi.yaml into dir.

Operators

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