ApiDoc constructor

ApiDoc({
  1. List<ApiParameter> parameters = const [],
  2. List<ApiBodyField> body = const [],
  3. Map<String, List<ApiResponse>> response = const {},
  4. String? description,
  5. ApiDoc? delete,
  6. ApiDoc? get,
  7. ApiDoc? post,
  8. ApiDoc? put,
})

Creates an instance of ApiDoc with optional parameters for different HTTP methods.

parameters - List of query parameters, path parameters, etc. body - List of body fields for the API request. response - Map of responses categorized by HTTP status codes. description - Optional description of the API endpoint. delete - Documentation for the DELETE method. get - Documentation for the GET method. post - Documentation for the POST method. put - Documentation for the PUT method.

Implementation

ApiDoc({
  //For all methods
  this.parameters = const [],
  this.body = const [],
  this.response = const {},
  this.description,
  //For special Method
  this.delete,
  this.get,
  this.post,
  this.put,
});