createDocumentationPart method
Creates a documentation part.
May throw BadRequestException.
May throw ConflictException.
May throw LimitExceededException.
May throw NotFoundException.
May throw TooManyRequestsException.
May throw UnauthorizedException.
Parameter location :
The location of the targeted API entity of the to-be-created documentation
part.
Parameter properties :
The new documentation content map of the targeted API entity. Enclosed
key-value pairs are API-specific, but only OpenAPI-compliant key-value
pairs can be exported and, hence, published.
Parameter restApiId :
The string identifier of the associated RestApi.
Implementation
Future<DocumentationPart> createDocumentationPart({
required DocumentationPartLocation location,
required String properties,
required String restApiId,
}) async {
final $payload = <String, dynamic>{
'location': location,
'properties': properties,
};
final response = await _protocol.send(
payload: $payload,
method: 'POST',
requestUri:
'/restapis/${Uri.encodeComponent(restApiId)}/documentation/parts',
exceptionFnMap: _exceptionFns,
);
return DocumentationPart.fromJson(response);
}