createDocumentationVersion method
Creates a documentation version
May throw BadRequestException.
May throw ConflictException.
May throw LimitExceededException.
May throw NotFoundException.
May throw TooManyRequestsException.
May throw UnauthorizedException.
Parameter documentationVersion :
The version identifier of the new snapshot.
Parameter restApiId :
The string identifier of the associated RestApi.
Parameter description :
A description about the new documentation snapshot.
Parameter stageName :
The stage name to be associated with the new documentation snapshot.
Implementation
Future<DocumentationVersion> createDocumentationVersion({
required String documentationVersion,
required String restApiId,
String? description,
String? stageName,
}) async {
final $payload = <String, dynamic>{
'documentationVersion': documentationVersion,
if (description != null) 'description': description,
if (stageName != null) 'stageName': stageName,
};
final response = await _protocol.send(
payload: $payload,
method: 'POST',
requestUri:
'/restapis/${Uri.encodeComponent(restApiId)}/documentation/versions',
exceptionFnMap: _exceptionFns,
);
return DocumentationVersion.fromJson(response);
}