Skip to content

Commit

Permalink
Merge pull request #175 from folio-org/MODLOGSAML-198-limit-1000
Browse files Browse the repository at this point in the history
MODLOGSAML-198: limit=1000 for GET /configurations/entries
  • Loading branch information
julianladisch authored Sep 13, 2024
2 parents cae8e2f + a110423 commit a85c4a9
Show file tree
Hide file tree
Showing 24 changed files with 73 additions and 73 deletions.
2 changes: 1 addition & 1 deletion src/main/java/org/folio/config/ConfigurationsClient.java
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ public static Future<JsonArray> checkConfig(Vertx vertx, OkapiHeaders okapiHeade
CharSequence encodedQuery = PercentCodec.encode(query);

return WebClientFactory.getWebClient(vertx)
.getAbs(okapiHeaders.getUrl() + CONFIGURATIONS_ENTRIES_ENDPOINT_URL + "?query=" + encodedQuery)
.getAbs(okapiHeaders.getUrl() + CONFIGURATIONS_ENTRIES_ENDPOINT_URL + "?limit=1000&query=" + encodedQuery)
.putHeader(XOkapiHeaders.TOKEN, okapiHeaders.getToken())
.putHeader(XOkapiHeaders.URL, okapiHeaders.getUrl())
.putHeader(XOkapiHeaders.TENANT, okapiHeaders.getTenant())
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/org/folio/util/OkapiHelper.java
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ public static OkapiHeaders okapiHeaders(Map<String, String> parsedHeaders) {
* For example in the class ConfigurationsClient:
* public static Future<JsonArray> ConfigurationsClient.checkConfig(Vertx vertx, OkapiHeaders okapiHeaders,String query)
* return WebClientFactory.getWebClient(vertx)
* .getAbs(okapiHeaders.getUrl() + CONFIGURATIONS_ENTRIES_ENDPOINT_URL + "?query=" + encodedQuery) ....
* .getAbs(okapiHeaders.getUrl() + CONFIGURATIONS_ENTRIES_ENDPOINT_URL + "?limit=1000&query=" + encodedQuery) ....
*/
public static OkapiHeaders okapiHeadersWithUrlTo(Map<String, String> parsedHeaders ) {
OkapiHeaders headers = okapiHeaders(parsedHeaders);
Expand Down
2 changes: 1 addition & 1 deletion src/test/java/org/folio/util/MockJsonExtended.java
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@

public class MockJsonExtended extends MockJson {
private static final Logger log = LogManager.getLogger(MockJsonExtended.class);
private static final String PARTIAL_URL = "/configurations/entries?query=%28module%3D%3DLOGIN-SAML%20AND%20configName%3D%3Dsaml%29";
private static final String PARTIAL_URL = "/configurations/entries?limit=1000&query=%28module%3D%3DLOGIN-SAML%20AND%20configName%3D%3Dsaml%29";
private static final String RECEIVED_DATA_CONSTANT = "receivedData";
private static final String CONFIGS_CONSTANT = "configs";
private static final String URL_CONSTANT = "url";
Expand Down
10 changes: 5 additions & 5 deletions src/test/resources/after_regenerate.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"mocks": [
{
"url": "/configurations/entries?query=%28module%3D%3DLOGIN-SAML%20AND%20configName%3D%3Dsaml%29",
"url": "/configurations/entries?limit=1000&query=%28module%3D%3DLOGIN-SAML%20AND%20configName%3D%3Dsaml%29",
"method": "get",
"status": 200,
"receivedData": {
Expand Down Expand Up @@ -62,7 +62,7 @@
"sendData": {}
},
{
"url": "/configurations/entries?query=%28module%3D%3DLOGIN-SAML%20AND%20configName%3D%3Dsaml%20AND%20code%3D%3D%20saml.attribute%29",
"url": "/configurations/entries?limit=1000&query=%28module%3D%3DLOGIN-SAML%20AND%20configName%3D%3Dsaml%20AND%20code%3D%3D%20saml.attribute%29",
"method": "get",
"status": 200,
"receivedData": {
Expand All @@ -71,7 +71,7 @@
}
},
{
"url": "/configurations/entries?query=%28module%3D%3DLOGIN-SAML%20AND%20configName%3D%3Dsaml%20AND%20code%3D%3D%20idp.url%29",
"url": "/configurations/entries?limit=1000&query=%28module%3D%3DLOGIN-SAML%20AND%20configName%3D%3Dsaml%20AND%20code%3D%3D%20idp.url%29",
"method": "get",
"status": 200,
"receivedData": {
Expand All @@ -88,7 +88,7 @@
}
},
{
"url": "/configurations/entries?query=%28module%3D%3DLOGIN-SAML%20AND%20configName%3D%3Dsaml%20AND%20code%3D%3D%20metadata.invalidated%29",
"url": "/configurations/entries?limit=1000&query=%28module%3D%3DLOGIN-SAML%20AND%20configName%3D%3Dsaml%20AND%20code%3D%3D%20metadata.invalidated%29",
"method": "get",
"status": 200,
"receivedData": {
Expand All @@ -105,7 +105,7 @@
}
},
{
"url": "/configurations/entries?query=%28module%3D%3DLOGIN-SAML%20AND%20configName%3D%3Dsaml%20AND%20code%3D%3D%20user.property%29",
"url": "/configurations/entries?limit=1000&query=%28module%3D%3DLOGIN-SAML%20AND%20configName%3D%3Dsaml%20AND%20code%3D%3D%20user.property%29",
"method": "get",
"status": 200,
"receivedData": {
Expand Down
2 changes: 1 addition & 1 deletion src/test/resources/mock_200_empty.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"mocks": [
{
"url": "/configurations/entries?query=%28module%3D%3DLOGIN-SAML%20AND%20configName%3D%3Dsaml%29",
"url": "/configurations/entries?limit=1000&query=%28module%3D%3DLOGIN-SAML%20AND%20configName%3D%3Dsaml%29",
"method": "get",
"status": 200,
"receivedData": {
Expand Down
2 changes: 1 addition & 1 deletion src/test/resources/mock_200_null.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"mocks": [
{
"url": "/configurations/entries?query=%28module%3D%3DLOGIN-SAML%20AND%20configName%3D%3Dsaml%29",
"url": "/configurations/entries?limit=1000&query=%28module%3D%3DLOGIN-SAML%20AND%20configName%3D%3Dsaml%29",
"method": "get",
"status": 200,
"receivedData": {}
Expand Down
2 changes: 1 addition & 1 deletion src/test/resources/mock_400.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"mocks": [
{
"url": "/configurations/entries?query=%28module%3D%3DLOGIN-SAML%20AND%20configName%3D%3Dsaml%29",
"url": "/configurations/entries?limit=1000&query=%28module%3D%3DLOGIN-SAML%20AND%20configName%3D%3Dsaml%29",
"method": "get",
"status": 400,
"receivedData": { }
Expand Down
12 changes: 6 additions & 6 deletions src/test/resources/mock_content.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"mocks": [
{
"url": "/configurations/entries?query=%28module%3D%3DLOGIN-SAML%20AND%20configName%3D%3Dsaml%29",
"url": "/configurations/entries?limit=1000&query=%28module%3D%3DLOGIN-SAML%20AND%20configName%3D%3Dsaml%29",
"method": "get",
"status": 200,
"receivedData": {
Expand Down Expand Up @@ -62,7 +62,7 @@
"sendData": {}
},
{
"url": "/configurations/entries?query=%28module%3D%3DLOGIN-SAML%20AND%20configName%3D%3Dsaml%20AND%20code%3D%3D%20saml.attribute%29",
"url": "/configurations/entries?limit=1000&query=%28module%3D%3DLOGIN-SAML%20AND%20configName%3D%3Dsaml%20AND%20code%3D%3D%20saml.attribute%29",
"method": "get",
"status": 200,
"receivedData": {
Expand All @@ -71,7 +71,7 @@
}
},
{
"url": "/configurations/entries?query=%28module%3D%3DLOGIN-SAML%20AND%20configName%3D%3Dsaml%20AND%20code%3D%3D%20idp.metadata%29",
"url": "/configurations/entries?limit=1000&query=%28module%3D%3DLOGIN-SAML%20AND%20configName%3D%3Dsaml%20AND%20code%3D%3D%20idp.metadata%29",
"method": "get",
"status": 200,
"receivedData": {
Expand All @@ -88,7 +88,7 @@
}
},
{
"url": "/configurations/entries?query=%28module%3D%3DLOGIN-SAML%20AND%20configName%3D%3Dsaml%20AND%20code%3D%3D%20idp.url%29",
"url": "/configurations/entries?limit=1000&query=%28module%3D%3DLOGIN-SAML%20AND%20configName%3D%3Dsaml%20AND%20code%3D%3D%20idp.url%29",
"method": "get",
"status": 200,
"receivedData": {
Expand All @@ -105,7 +105,7 @@
}
},
{
"url": "/configurations/entries?query=%28module%3D%3DLOGIN-SAML%20AND%20configName%3D%3Dsaml%20AND%20code%3D%3D%20metadata.invalidated%29",
"url": "/configurations/entries?limit=1000&query=%28module%3D%3DLOGIN-SAML%20AND%20configName%3D%3Dsaml%20AND%20code%3D%3D%20metadata.invalidated%29",
"method": "get",
"status": 200,
"receivedData": {
Expand All @@ -122,7 +122,7 @@
}
},
{
"url": "/configurations/entries?query=%28module%3D%3DLOGIN-SAML%20AND%20configName%3D%3Dsaml%20AND%20code%3D%3D%20user.property%29",
"url": "/configurations/entries?limit=1000&query=%28module%3D%3DLOGIN-SAML%20AND%20configName%3D%3Dsaml%20AND%20code%3D%3D%20user.property%29",
"method": "get",
"status": 200,
"receivedData": {
Expand Down
14 changes: 7 additions & 7 deletions src/test/resources/mock_content_legacy.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"mocks": [
{
"url": "/configurations/entries?query=%28module%3D%3DLOGIN-SAML%20AND%20configName%3D%3Dsaml%29",
"url": "/configurations/entries?limit=1000&query=%28module%3D%3DLOGIN-SAML%20AND%20configName%3D%3Dsaml%29",
"method": "get",
"status": 200,
"receivedData": {
Expand Down Expand Up @@ -69,7 +69,7 @@
"sendData": {}
},
{
"url": "/configurations/entries?query=%28module%3D%3DLOGIN-SAML%20AND%20configName%3D%3Dsaml%20AND%20code%3D%3D%20saml.attribute%29",
"url": "/configurations/entries?limit=1000&query=%28module%3D%3DLOGIN-SAML%20AND%20configName%3D%3Dsaml%20AND%20code%3D%3D%20saml.attribute%29",
"method": "get",
"status": 200,
"receivedData": {
Expand All @@ -78,7 +78,7 @@
}
},
{
"url": "/configurations/entries?query=%28module%3D%3DLOGIN-SAML%20AND%20configName%3D%3Dsaml%20AND%20code%3D%3D%20idp.metadata%29",
"url": "/configurations/entries?limit=1000&query=%28module%3D%3DLOGIN-SAML%20AND%20configName%3D%3Dsaml%20AND%20code%3D%3D%20idp.metadata%29",
"method": "get",
"status": 200,
"receivedData": {
Expand All @@ -95,7 +95,7 @@
}
},
{
"url": "/configurations/entries?query=%28module%3D%3DLOGIN-SAML%20AND%20configName%3D%3Dsaml%20AND%20code%3D%3D%20idp.url%29",
"url": "/configurations/entries?limit=1000&query=%28module%3D%3DLOGIN-SAML%20AND%20configName%3D%3Dsaml%20AND%20code%3D%3D%20idp.url%29",
"method": "get",
"status": 200,
"receivedData": {
Expand All @@ -112,7 +112,7 @@
}
},
{
"url": "/configurations/entries?query=%28module%3D%3DLOGIN-SAML%20AND%20configName%3D%3Dsaml%20AND%20code%3D%3D%20saml.callback%29",
"url": "/configurations/entries?limit=1000&query=%28module%3D%3DLOGIN-SAML%20AND%20configName%3D%3Dsaml%20AND%20code%3D%3D%20saml.callback%29",
"method": "get",
"status": 200,
"receivedData": {
Expand All @@ -129,7 +129,7 @@
}
},
{
"url": "/configurations/entries?query=%28module%3D%3DLOGIN-SAML%20AND%20configName%3D%3Dsaml%20AND%20code%3D%3D%20metadata.invalidated%29",
"url": "/configurations/entries?limit=1000&query=%28module%3D%3DLOGIN-SAML%20AND%20configName%3D%3Dsaml%20AND%20code%3D%3D%20metadata.invalidated%29",
"method": "get",
"status": 200,
"receivedData": {
Expand All @@ -146,7 +146,7 @@
}
},
{
"url": "/configurations/entries?query=%28module%3D%3DLOGIN-SAML%20AND%20configName%3D%3Dsaml%20AND%20code%3D%3D%20user.property%29",
"url": "/configurations/entries?limit=1000&query=%28module%3D%3DLOGIN-SAML%20AND%20configName%3D%3Dsaml%20AND%20code%3D%3D%20user.property%29",
"method": "get",
"status": 200,
"receivedData": {
Expand Down
12 changes: 6 additions & 6 deletions src/test/resources/mock_content_no_keystore.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"mocks": [
{
"url": "/configurations/entries?query=%28module%3D%3DLOGIN-SAML%20AND%20configName%3D%3Dsaml%29",
"url": "/configurations/entries?limit=1000&query=%28module%3D%3DLOGIN-SAML%20AND%20configName%3D%3Dsaml%29",
"method": "get",
"status": 200,
"receivedData": {
Expand Down Expand Up @@ -55,7 +55,7 @@
"sendData": {}
},
{
"url": "/configurations/entries?query=%28module%3D%3DLOGIN-SAML%20AND%20configName%3D%3Dsaml%20AND%20code%3D%3D%20saml.attribute%29",
"url": "/configurations/entries?limit=1000&query=%28module%3D%3DLOGIN-SAML%20AND%20configName%3D%3Dsaml%20AND%20code%3D%3D%20saml.attribute%29",
"method": "get",
"status": 200,
"receivedData": {
Expand All @@ -64,7 +64,7 @@
}
},
{
"url": "/configurations/entries?query=%28module%3D%3DLOGIN-SAML+AND+configName%3D%3Dsaml+AND+code%3D%3D+idp.metadata%29",
"url": "/configurations/entries?limit=1000&query=%28module%3D%3DLOGIN-SAML+AND+configName%3D%3Dsaml+AND+code%3D%3D+idp.metadata%29",
"method": "get",
"status": 200,
"receivedData": {
Expand All @@ -73,7 +73,7 @@
}
},
{
"url": "/configurations/entries?query=%28module%3D%3DLOGIN-SAML+AND+configName%3D%3Dsaml+AND+code%3D%3D+idp.url%29",
"url": "/configurations/entries?limit=1000&query=%28module%3D%3DLOGIN-SAML+AND+configName%3D%3Dsaml+AND+code%3D%3D+idp.url%29",
"method": "get",
"status": 200,
"receivedData": {
Expand All @@ -90,7 +90,7 @@
}
},
{
"url": "/configurations/entries?query=%28module%3D%3DLOGIN-SAML+AND+configName%3D%3Dsaml+AND+code%3D%3D+metadata.invalidated%29",
"url": "/configurations/entries?limit=1000&query=%28module%3D%3DLOGIN-SAML+AND+configName%3D%3Dsaml+AND+code%3D%3D+metadata.invalidated%29",
"method": "get",
"status": 200,
"receivedData": {
Expand All @@ -107,7 +107,7 @@
}
},
{
"url": "/configurations/entries?query=%28module%3D%3DLOGIN-SAML+AND+configName%3D%3Dsaml+AND+code%3D%3D+user.property%29",
"url": "/configurations/entries?limit=1000&query=%28module%3D%3DLOGIN-SAML+AND+configName%3D%3Dsaml+AND+code%3D%3D+user.property%29",
"method": "get",
"status": 200,
"receivedData": {
Expand Down
22 changes: 11 additions & 11 deletions src/test/resources/mock_content_with_delete.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"mocks": [
{
"url": "/configurations/entries?query=%28module%3D%3DLOGIN-SAML%20AND%20configName%3D%3Dsaml%29",
"url": "/configurations/entries?limit=1000&query=%28module%3D%3DLOGIN-SAML%20AND%20configName%3D%3Dsaml%29",
"method": "get",
"status": 200,
"receivedData": {
Expand Down Expand Up @@ -98,7 +98,7 @@
"status": 204
},
{
"url": "/configurations/entries?query=%28module%3D%3DLOGIN-SAML%20AND%20configName%3D%3Dsaml%20AND%20code%3D%3D%idp.metadata%29",
"url": "/configurations/entries?limit=1000&query=%28module%3D%3DLOGIN-SAML%20AND%20configName%3D%3Dsaml%20AND%20code%3D%3D%idp.metadata%29",
"method": "get",
"status": 200,
"receivedData": {
Expand All @@ -115,7 +115,7 @@
}
},
{
"url": "/configurations/entries?query=%28module%3D%3DLOGIN-SAML%20AND%20configName%3D%3Dsaml%20AND%20code%3D%3Didp.url%29",
"url": "/configurations/entries?limit=1000&query=%28module%3D%3DLOGIN-SAML%20AND%20configName%3D%3Dsaml%20AND%20code%3D%3Didp.url%29",
"method": "get",
"status": 200,
"receivedData": {
Expand All @@ -132,7 +132,7 @@
}
},
{
"url": "/configurations/entries?query=%28module%3D%3DLOGIN-SAML%20AND%20configName%3D%3Dsaml%20AND%20code%3D%3Dmetadata.invalidated%29",
"url": "/configurations/entries?limit=1000&query=%28module%3D%3DLOGIN-SAML%20AND%20configName%3D%3Dsaml%20AND%20code%3D%3Dmetadata.invalidated%29",
"method": "get",
"status": 200,
"receivedData": {
Expand All @@ -149,7 +149,7 @@
}
},
{
"url": "/configurations/entries?query=%28module%3D%3DLOGIN-SAML%20AND%20configName%3D%3Dsaml%20AND%20code%3D%3Duser.property%29",
"url": "/configurations/entries?limit=1000&query=%28module%3D%3DLOGIN-SAML%20AND%20configName%3D%3Dsaml%20AND%20code%3D%3Duser.property%29",
"method": "get",
"status": 200,
"receivedData": {
Expand All @@ -158,7 +158,7 @@
}
},
{
"url": "/configurations/entries?query=%28module%3D%3DLOGIN-SAML%20AND%20configName%3D%3Dsaml%20AND%20code%3D%3Dsaml.attribute%29",
"url": "/configurations/entries?limit=1000&query=%28module%3D%3DLOGIN-SAML%20AND%20configName%3D%3Dsaml%20AND%20code%3D%3Dsaml.attribute%29",
"method": "get",
"status": 200,
"receivedData": {
Expand All @@ -167,7 +167,7 @@
}
},
{
"url": "/configurations/entries?query=%28module%3D%3DLOGIN-SAML%20AND%20configName%3D%3Dsaml%20AND%20code%3D%3Dkeystore.file%29",
"url": "/configurations/entries?limit=1000&query=%28module%3D%3DLOGIN-SAML%20AND%20configName%3D%3Dsaml%20AND%20code%3D%3Dkeystore.file%29",
"method": "get",
"status": 200,
"receivedData": {
Expand All @@ -184,7 +184,7 @@
}
},
{
"url": "/configurations/entries?query=%28module%3D%3DLOGIN-SAML%20AND%20configName%3D%3Dsaml%20AND%20code%3D%3Dkeystore.password%29",
"url": "/configurations/entries?limit=1000&query=%28module%3D%3DLOGIN-SAML%20AND%20configName%3D%3Dsaml%20AND%20code%3D%3Dkeystore.password%29",
"method": "get",
"status": 200,
"receivedData": {
Expand All @@ -201,7 +201,7 @@
}
},
{
"url": "/configurations/entries?query=%28module%3D%3DLOGIN-SAML%20AND%20configName%3D%3Dsaml%20AND%20code%3D%3Dkeystore.privatekey.password%29",
"url": "/configurations/entries?limit=1000&query=%28module%3D%3DLOGIN-SAML%20AND%20configName%3D%3Dsaml%20AND%20code%3D%3Dkeystore.privatekey.password%29",
"method": "get",
"status": 200,
"receivedData": {
Expand All @@ -218,7 +218,7 @@
}
},
{
"url": "/configurations/entries?query=%28module%3D%3DLOGIN-SAML%20AND%20configName%3D%3Dsaml%20AND%20code%3D%3Dsaml.binding%29",
"url": "/configurations/entries?limit=1000&query=%28module%3D%3DLOGIN-SAML%20AND%20configName%3D%3Dsaml%20AND%20code%3D%3Dsaml.binding%29",
"method": "get",
"status": 200,
"receivedData": {
Expand All @@ -235,7 +235,7 @@
}
},
{
"url": "/configurations/entries?query=%28module%3D%3DLOGIN-SAML%20AND%20configName%3D%3Dsaml%20AND%20code%3D%3Dokapi.url%29",
"url": "/configurations/entries?limit=1000&query=%28module%3D%3DLOGIN-SAML%20AND%20configName%3D%3Dsaml%20AND%20code%3D%3Dokapi.url%29",
"method": "get",
"status": 200,
"receivedData": {
Expand Down
Loading

0 comments on commit a85c4a9

Please sign in to comment.