patch method

SimpleApiBuilder patch(
  1. String path, {
  2. String? name,
  3. String? description,
  4. List<String>? queryParams,
  5. List<String>? pathParams,
  6. List<String>? headerParams,
  7. bool hasBody = true,
  8. List<String>? tags,
  9. String? responseType,
})

Adds a PATCH endpoint with the specified path and optional parameters.

Implementation

SimpleApiBuilder patch(
  String path, {
  String? name,
  String? description,
  List<String>? queryParams,
  List<String>? pathParams,
  List<String>? headerParams,
  bool hasBody = true,
  List<String>? tags,
  String? responseType,
}) {
  _endpoints.add(EndpointSpec(
    name: name ?? _generateName('PATCH', path),
    path: path,
    method: HttpMethod.patch,
    description: description,
    queryParams: queryParams ?? [],
    pathParams: pathParams ?? _extractPathParams(path),
    headerParams: headerParams ?? [],
    hasBody: hasBody,
    tags: tags ?? [],
    responseType: responseType,
  ));
  return this;
}