post method
Adds a POST endpoint with the specified path and optional parameters.
Implementation
SimpleApiBuilder post(
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('POST', path),
path: path,
method: HttpMethod.post,
description: description,
queryParams: queryParams ?? [],
pathParams: pathParams ?? _extractPathParams(path),
headerParams: headerParams ?? [],
hasBody: hasBody,
tags: tags ?? [],
responseType: responseType,
));
return this;
}