getSchemaVersion method

Future<GetSchemaVersionResponse> getSchemaVersion({
  1. required String schemaVersionedId,
  2. required SchemaVersionType type,
  3. SchemaVersionFormat? format,
})

Gets a schema version with the provided information.

May throw AccessDeniedException. May throw ConflictException. May throw InternalServerException. May throw ResourceNotFoundException. May throw ServiceUnavailableException. May throw ThrottlingException. May throw ValidationException.

Parameter schemaVersionedId : Schema id with a version specified. If the version is missing, it defaults to latest version.

Parameter type : The type of schema version.

Parameter format : The format of the schema version.

Implementation

Future<GetSchemaVersionResponse> getSchemaVersion({
  required String schemaVersionedId,
  required SchemaVersionType type,
  SchemaVersionFormat? format,
}) async {
  final $query = <String, List<String>>{
    if (format != null) 'Format': [format.value],
  };
  final response = await _protocol.send(
    payload: null,
    method: 'GET',
    requestUri:
        '/schema-versions/${Uri.encodeComponent(type.value)}/${Uri.encodeComponent(schemaVersionedId)}',
    queryParams: $query,
    exceptionFnMap: _exceptionFns,
  );
  return GetSchemaVersionResponse.fromJson(response);
}