ApiDefinition class

HTTP operations and schemas extracted from one API description.

Constructors

ApiDefinition({required String title, required String apiVersion, required OpenApiVersion specVersion, Uri? sourceUri, Iterable<ApiOperation> operations = const [], Iterable<ApiOperation> webhooks = const [], Map<ReferenceLocation, List<ApiOperation>> callbacks = const {}, Iterable<JsonValue> servers = const [], Iterable<JsonValue> security = const [], Map<String, JsonValue> securitySchemes = const {}, Map<String, ReferenceLocation> namedSchemas = const {}, Map<ReferenceLocation, ApiSchema> schemas = const {}, Map<(Uri, String), ReferenceLocation> dynamicAnchors = const {}})
Copies the extracted routes and schema indexes.

Properties

apiVersion → String
Application version from info.version.
final
callbacks → Map<ReferenceLocation, List<ApiOperation>>
Callback operations by physical callback definition. Links can form cycles.
final
dynamicAnchors → Map<(Uri, String), ReferenceLocation>
Reachable dynamic anchors by canonical resource URI and name.
final
hashCode → int
The hash code for this object.
no setterinherited
namedSchemas → Map<String, ReferenceLocation>
All named schemas in the entry document, including unused schemas.
final
operations → List<ApiOperation>
Operations mounted in the entry document.
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
schemas → Map<ReferenceLocation, ApiSchema>
Entry, inline, and reachable external schemas by physical identity.
final
security → List<JsonValue>
Entry security alternatives. Each object lists schemes used together.
final
securitySchemes → Map<String, JsonValue>
Security schemes by entry name.
final
servers → List<JsonValue>
Entry server definitions, including URL templates and variables.
final
sourceUri → Uri?
Entry document URI used to resolve mapping selectors.
final
specVersion → OpenApiVersion
OpenAPI version of the entry document.
final
title → String
Title from the entry document.
final
webhooks → List<ApiOperation>
Incoming webhook operations keyed by their path name in each operation.
final

Methods

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