searchSchemas method

Future<SearchSchemasResponse> searchSchemas({
  1. required String keywords,
  2. required String registryName,
  3. int? limit,
  4. String? nextToken,
})

Search the schemas

May throw ServiceUnavailableException. May throw BadRequestException. May throw UnauthorizedException. May throw InternalServerErrorException. May throw ForbiddenException.

Parameter keywords : Specifying this limits the results to only schemas that include the provided keywords.

Parameter registryName : The name of the registry.

Parameter nextToken : The token that specifies the next page of results to return. To request the first page, leave NextToken empty. The token will expire in 24 hours, and cannot be shared with other accounts.

Implementation

Future<SearchSchemasResponse> searchSchemas({
  required String keywords,
  required String registryName,
  int? limit,
  String? nextToken,
}) async {
  ArgumentError.checkNotNull(keywords, 'keywords');
  ArgumentError.checkNotNull(registryName, 'registryName');
  final $query = <String, List<String>>{
    'keywords': [keywords],
    if (limit != null) 'limit': [limit.toString()],
    if (nextToken != null) 'nextToken': [nextToken],
  };
  final response = await _protocol.send(
    payload: null,
    method: 'GET',
    requestUri:
        '/v1/registries/name/${Uri.encodeComponent(registryName)}/schemas/search',
    queryParams: $query,
    exceptionFnMap: _exceptionFns,
  );
  return SearchSchemasResponse.fromJson(response);
}