exportSchema method
May throw BadRequestException. May throw UnauthorizedException. May throw InternalServerErrorException. May throw ForbiddenException. May throw NotFoundException. May throw ServiceUnavailableException. May throw TooManyRequestsException.
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<ExportSchemaResponse> exportSchema({
required String registryName,
required String schemaName,
required String type,
String? schemaVersion,
}) async {
ArgumentError.checkNotNull(registryName, 'registryName');
ArgumentError.checkNotNull(schemaName, 'schemaName');
ArgumentError.checkNotNull(type, 'type');
final $query = <String, List<String>>{
'type': [type],
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)}/export',
queryParams: $query,
exceptionFnMap: _exceptionFns,
);
return ExportSchemaResponse.fromJson(response);
}