Skip to content

Commit

Permalink
Merge pull request #53 from ankitmashu/uuid
Browse files Browse the repository at this point in the history
UUID changes
  • Loading branch information
kailash authored Aug 8, 2023
2 parents e27753e + 23f292e commit 0cc3d3f
Show file tree
Hide file tree
Showing 19 changed files with 838 additions and 761 deletions.
86 changes: 45 additions & 41 deletions docs/openapi.yaml

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion examples/data_txt.json
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"id":["iisc.ac.in/89a36273d77dac4cf38114fca1bbe64392547f86/rs.iudx.io/surat-itms-realtime-information/surat-itms-live-eta"],"geo-query":{"lat":21.178,"lon":72.834,"radius":10.0,"geoproperty":"location"},"offset":"0","limit":"10","searchType":"latestSearch_geoSearch","instanceID":"localhost:8090","applicableFilters":["SPATIAL","TEMPORAL","ATTR"],"publicKey":"1uxmO5GqpqootKRxK_6f_HvJ7ownd_ejwd_kZBN-bzM="}
{"id":["83c2e5c2-3574-4e11-9530-2b1fbdfce832"],"geo-query":{"geometry":"linestring","coordinates":"[[72.833994,21.17798],[72.833978,21.178005]]","georel":"intersects","geoproperty":"location"},"options":"count","searchType":"latestSearch_geoSearch","instanceID":"localhost:8090","applicableFilters":["SPATIAL","TEMPORAL","ATTR"],"publicKey":null,"ppbNumber":""}
5 changes: 4 additions & 1 deletion src/main/java/iudx/rs/proxy/apiserver/ApiServerVerticle.java
Original file line number Diff line number Diff line change
Expand Up @@ -611,13 +611,16 @@ private void updateAuditTable(RoutingContext context) {
ZonedDateTime zst = ZonedDateTime.now(ZoneId.of("Asia/Kolkata"));
long time = zst.toInstant().toEpochMilli();
String isoTime = zst.truncatedTo(ChronoUnit.SECONDS).toString();

String resourceid= authInfo.getString(ID);
JsonObject jsonObject = CatalogueService.getCatalogueItemJson(resourceid);
String providerID = jsonObject.getString("provider");
request.put(EPOCH_TIME,time);
request.put(ISO_TIME,isoTime);
request.put(USER_ID, authInfo.getValue(USER_ID));
request.put(ID, authInfo.getValue(ID));
request.put(API, authInfo.getValue(API_ENDPOINT));
request.put(RESPONSE_SIZE, context.data().get(RESPONSE_SIZE));
request.put(PROVIDER_ID,providerID);

meteringService.insertMeteringValuesInRMQ(
request,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,6 @@ public void handle(RoutingContext context) {
new JsonObject().put(API_ENDPOINT, path).put(HEADER_TOKEN, token).put(API_METHOD, method);

LOGGER.debug("Info :" + context.request().path());
LOGGER.debug("Info :" + context.request().path().split("/").length);

String id = getId(context);
authInfo.put(ID, id);
Expand Down Expand Up @@ -117,8 +116,7 @@ private JsonObject generateResponse(ResponseUrn urn, HttpStatusCode statusCode)
/**
* extract id from request (path/query or body )
*
* @param ctx current routing context
* @param forPath endpoint called for
* @param context current routing context
* @return id extraced fro path if present
*/
private String getId(RoutingContext context) {
Expand Down
Loading

0 comments on commit 0cc3d3f

Please sign in to comment.