Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add Query parameter to membership endpoints #526

Merged
merged 1 commit into from
Aug 15, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions model/swagger.yml
Original file line number Diff line number Diff line change
Expand Up @@ -278,6 +278,7 @@ paths:
- $ref: "#/components/parameters/Fields"
- $ref: "#/components/parameters/Identifier"
- $ref: "#/components/parameters/Limit"
- $ref: "#/components/parameters/Query"
- $ref: "#/components/parameters/Sort"
- $ref: "#/components/parameters/SearchAfter"
/products/{identifier}/members/{versions}:
Expand All @@ -302,6 +303,7 @@ paths:
- $ref: "#/components/parameters/Fields"
- $ref: "#/components/parameters/Identifier"
- $ref: "#/components/parameters/Limit"
- $ref: "#/components/parameters/Query"
- $ref: "#/components/parameters/Sort"
- $ref: "#/components/parameters/SearchAfter"
- $ref: "#/components/parameters/Versions"
Expand All @@ -327,6 +329,7 @@ paths:
- $ref: "#/components/parameters/Fields"
- $ref: "#/components/parameters/Identifier"
- $ref: "#/components/parameters/Limit"
- $ref: "#/components/parameters/Query"
- $ref: "#/components/parameters/Sort"
- $ref: "#/components/parameters/SearchAfter"
/products/{identifier}/members/members/{versions}:
Expand All @@ -351,6 +354,7 @@ paths:
- $ref: "#/components/parameters/Fields"
- $ref: "#/components/parameters/Identifier"
- $ref: "#/components/parameters/Limit"
- $ref: "#/components/parameters/Query"
- $ref: "#/components/parameters/Sort"
- $ref: "#/components/parameters/SearchAfter"
- $ref: "#/components/parameters/Versions"
Expand All @@ -376,6 +380,7 @@ paths:
- $ref: "#/components/parameters/Fields"
- $ref: "#/components/parameters/Identifier"
- $ref: "#/components/parameters/Limit"
- $ref: "#/components/parameters/Query"
- $ref: "#/components/parameters/Sort"
- $ref: "#/components/parameters/SearchAfter"
/products/{identifier}/member-of/{versions}:
Expand All @@ -400,6 +405,7 @@ paths:
- $ref: "#/components/parameters/Fields"
- $ref: "#/components/parameters/Identifier"
- $ref: "#/components/parameters/Limit"
- $ref: "#/components/parameters/Query"
- $ref: "#/components/parameters/Sort"
- $ref: "#/components/parameters/SearchAfter"
- $ref: "#/components/parameters/Versions"
Expand All @@ -425,6 +431,7 @@ paths:
- $ref: "#/components/parameters/Fields"
- $ref: "#/components/parameters/Identifier"
- $ref: "#/components/parameters/Limit"
- $ref: "#/components/parameters/Query"
- $ref: "#/components/parameters/Sort"
- $ref: "#/components/parameters/SearchAfter"
/products/{identifier}/member-of/member-of/{versions}:
Expand All @@ -449,6 +456,7 @@ paths:
- $ref: "#/components/parameters/Fields"
- $ref: "#/components/parameters/Identifier"
- $ref: "#/components/parameters/Limit"
- $ref: "#/components/parameters/Query"
- $ref: "#/components/parameters/Sort"
- $ref: "#/components/parameters/SearchAfter"
- $ref: "#/components/parameters/Versions"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -409,7 +409,7 @@ private PdsLidVid resolveIdentifierToLidvid(PdsProductIdentifier identifier) thr

@Override
public ResponseEntity<Object> productMembers(
String identifier, List<String> fields, Integer limit, List<String> sort, List<String> searchAfter)
String identifier, List<String> fields, Integer limit, String q, List<String> sort, List<String> searchAfter)
throws NotFoundException, UnhandledException, SortSearchAfterMismatchException, BadRequestException,
AcceptFormatNotSupportedException{

Expand All @@ -433,7 +433,7 @@ public ResponseEntity<Object> productMembers(
}

SearchRequest searchRequest = searchRequestBuilder
.applyMultipleProductsDefaults(fields, "", List.of(), limit, sort, searchAfter, true)
.applyMultipleProductsDefaults(fields, q, List.of(), limit, sort, searchAfter, true)
.build();

SearchResponse<HashMap> searchResponse =
Expand All @@ -450,7 +450,7 @@ public ResponseEntity<Object> productMembers(

@Override
public ResponseEntity<Object> productMembersMembers(
String identifier, List<String> fields, Integer limit, List<String> sort, List<String> searchAfter)
String identifier, List<String> fields, Integer limit, String q, List<String> sort, List<String> searchAfter)
throws NotFoundException, UnhandledException, SortSearchAfterMismatchException, BadRequestException,
AcceptFormatNotSupportedException{

Expand All @@ -470,7 +470,7 @@ public ResponseEntity<Object> productMembersMembers(
}

SearchRequest searchRequest = searchRequestBuilder
.applyMultipleProductsDefaults(fields, "", List.of(), limit, sort, searchAfter, true)
.applyMultipleProductsDefaults(fields, q, List.of(), limit, sort, searchAfter, true)
.build();

SearchResponse<HashMap> searchResponse =
Expand Down Expand Up @@ -523,7 +523,7 @@ private List<PdsLidVid> resolveLidVidsFromProductField(PdsProductIdentifier iden

@Override
public ResponseEntity<Object> productMemberOf(
String identifier, List<String> fields, Integer limit, List<String> sort, List<String> searchAfter)
String identifier, List<String> fields, Integer limit, String q, List<String> sort, List<String> searchAfter)
throws NotFoundException, UnhandledException, SortSearchAfterMismatchException, BadRequestException,
AcceptFormatNotSupportedException, UnparsableQParamException {

Expand All @@ -543,7 +543,7 @@ public ResponseEntity<Object> productMemberOf(
}

SearchRequest searchRequest = new RegistrySearchRequestBuilder(this.connectionContext)
.applyMultipleProductsDefaults(fields, "", List.of(), limit, sort, searchAfter, true)
.applyMultipleProductsDefaults(fields, q, List.of(), limit, sort, searchAfter, true)
.matchFieldAnyOfIdentifiers("_id", parentIds)
.build();

Expand All @@ -561,7 +561,7 @@ public ResponseEntity<Object> productMemberOf(

@Override
public ResponseEntity<Object> productMemberOfOf(
String identifier, List<String> fields, Integer limit, List<String> sort, List<String> searchAfter)
String identifier, List<String> fields, Integer limit, String q, List<String> sort, List<String> searchAfter)
throws NotFoundException, UnhandledException, SortSearchAfterMismatchException, BadRequestException,
AcceptFormatNotSupportedException, UnparsableQParamException {

Expand All @@ -580,7 +580,7 @@ public ResponseEntity<Object> productMemberOfOf(
}

SearchRequest searchRequest = new RegistrySearchRequestBuilder(this.connectionContext)
.applyMultipleProductsDefaults(fields, "", List.of(), limit, sort, searchAfter, true)
.applyMultipleProductsDefaults(fields, q, List.of(), limit, sort, searchAfter, true)
.matchFieldAnyOfIdentifiers("_id", parentIds)
.build();

Expand Down
Loading