ApiDoc class

Represents the documentation for an API endpoint in OpenAPI/Swagger format.

Constructors

ApiDoc({List<ApiParameter> parameters = const [], List<ApiBodyField> body = const [], Map<String, List<ApiResponse>> response = const {}, String? description, ApiDoc? delete, ApiDoc? get, ApiDoc? post, ApiDoc? put})
Creates an instance of ApiDoc with optional parameters for different HTTP methods.

Properties

body List<ApiBodyField>
List of body fields for the API request.
getter/setter pair
delete ApiDoc?
Documentation for the DELETE method.
getter/setter pair
description String?
Optional description of the API endpoint.
getter/setter pair
get ApiDoc?
Documentation for the GET method.
getter/setter pair
hashCode int
The hash code for this object.
no setterinherited
parameters List<ApiParameter>
List of parameters for the API endpoint.
getter/setter pair
post ApiDoc?
Documentation for the POST method.
getter/setter pair
put ApiDoc?
Documentation for the PUT method.
getter/setter pair
response Map<String, List<ApiResponse>>
Map of responses for the API endpoint, categorized by HTTP status codes.
getter/setter pair
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

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

Static Methods

dartTypeToOpenApi(String type) String
Converts Dart type to OpenAPI type.