An object that can be documented into a OpenAPI specification.
Classes that wish to participate in the documentation process should extend or mixin this class.
Documentation behavior starts at the root of an application (its RequestSink) by invoking documentAPI. The RequestSink will invoke methods from this interface on its RequestSink.initialController. These methods travel down the object graph formed by a RequestSink, its Router, RequestControllers, AuthServer and ManagedObjects.
Classes that extend this class will override methods such as documentPaths and documentOperations if they have the information available to complete those requests. Any method from this interface that a subclasses does not override will automatically be forwarded on to its documentableChild. Thus, subclasses should override documentableChild to return the 'next' documentable item in their logical flow. For RequestControllers, this will be their 'next' handler.
Constructors
Properties
- documentableChild → APIDocumentable
-
Returns the next documentable object in a chain of documentable objects.
read-only - 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
Operators
-
operator ==(
other) → bool -
The equality operator.
inherited
Methods
-
documentAPI(
PackagePathResolver resolver) → APIDocument -
Returns an entire APIDocument describing an OpenAPI specification.
-
documentOperations(
PackagePathResolver resolver) → List<APIOperation> -
Returns all APIOperations this object knows about.
-
documentPaths(
PackagePathResolver resolver) → List<APIPath> -
Returns all APIPath objects this instance knows about.
-
documentRequestBodyForOperation(
APIOperation operation) → APIRequestBody -
Returns all APIRequestBodys for
operation
. -
documentResponsesForOperation(
APIOperation operation) → List<APIResponse> -
Returns all APIResponses for
operation
. -
documentSecuritySchemes(
PackagePathResolver resolver) → Map<String, APISecurityScheme> -
Returns all APISecuritySchemes this instance knows about.
-
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