updateSchema method
Updates the schema definition
May throw BadRequestException.
May throw ForbiddenException.
May throw InternalServerErrorException.
May throw NotFoundException.
May throw ServiceUnavailableException.
Parameter registryName :
The name of the registry.
Parameter schemaName :
The name of the schema.
Parameter clientTokenId :
The ID of the client token.
Parameter content :
The source of the schema definition.
Parameter description :
The description of the schema.
Parameter type :
The schema type for the events schema.
Implementation
Future<UpdateSchemaResponse> updateSchema({
required String registryName,
required String schemaName,
String? clientTokenId,
String? content,
String? description,
Type? type,
}) async {
final $payload = <String, dynamic>{
'ClientTokenId': clientTokenId ?? _s.generateIdempotencyToken(),
if (content != null) 'Content': content,
if (description != null) 'Description': description,
if (type != null) 'Type': type.value,
};
final response = await _protocol.send(
payload: $payload,
method: 'PUT',
requestUri:
'/v1/registries/name/${Uri.encodeComponent(registryName)}/schemas/name/${Uri.encodeComponent(schemaName)}',
exceptionFnMap: _exceptionFns,
);
return UpdateSchemaResponse.fromJson(response);
}