updateDocumentationPart method

Future<DocumentationPart> updateDocumentationPart({
  1. required String documentationPartId,
  2. required String restApiId,
  3. List<PatchOperation>? patchOperations,
})

May throw BadRequestException. May throw UnauthorizedException. May throw NotFoundException. May throw ConflictException. May throw LimitExceededException. May throw TooManyRequestsException.

Parameter documentationPartId : Required The identifier of the to-be-updated documentation part.

Parameter restApiId : Required The string identifier of the associated RestApi.

Parameter patchOperations : A list of update operations to be applied to the specified resource and in the order specified in this list.

Implementation

Future<DocumentationPart> updateDocumentationPart({
  required String documentationPartId,
  required String restApiId,
  List<PatchOperation>? patchOperations,
}) async {
  ArgumentError.checkNotNull(documentationPartId, 'documentationPartId');
  ArgumentError.checkNotNull(restApiId, 'restApiId');
  final $payload = <String, dynamic>{
    if (patchOperations != null) 'patchOperations': patchOperations,
  };
  final response = await _protocol.send(
    payload: $payload,
    method: 'PATCH',
    requestUri:
        '/restapis/${Uri.encodeComponent(restApiId)}/documentation/parts/${Uri.encodeComponent(documentationPartId)}',
    exceptionFnMap: _exceptionFns,
  );
  return DocumentationPart.fromJson(response);
}