describeSchema method
Retrieve the schema definition.
May throw BadRequestException. May throw UnauthorizedException. May throw InternalServerErrorException. May throw ForbiddenException. May throw NotFoundException. May throw ServiceUnavailableException.
Parameter registryName
:
The name of the registry.
Parameter schemaName
:
The name of the schema.
Parameter schemaVersion
:
Specifying this limits the results to only this schema version.
Implementation
Future<DescribeSchemaResponse> describeSchema({
required String registryName,
required String schemaName,
String? schemaVersion,
}) async {
ArgumentError.checkNotNull(registryName, 'registryName');
ArgumentError.checkNotNull(schemaName, 'schemaName');
final $query = <String, List<String>>{
if (schemaVersion != null) 'schemaVersion': [schemaVersion],
};
final response = await _protocol.send(
payload: null,
method: 'GET',
requestUri:
'/v1/registries/name/${Uri.encodeComponent(registryName)}/schemas/name/${Uri.encodeComponent(schemaName)}',
queryParams: $query,
exceptionFnMap: _exceptionFns,
);
return DescribeSchemaResponse.fromJson(response);
}