Some URN inconsistencies
abhi4578 opened this issue · 1 comments
abhi4578 commented
Some URN inconsistencies I found while testing
- MethodNotAllowed for not proper method requested, eg: requesting apidocs using TRACK method, refer
curl -XTRACK https://rs.iudx.org.in/apis -vvv
Response : response code :404
, json recieved:{"type":"urn:dx:rs:general","title":"Not Found","detail":"Not Found"}
Expected : It should be something like response code :405
, json-recieved{"type":"urn:dx:rs:MethodNotAllowed","title":"Method Not Allowed","detail":"Specified method is invalid for this resource"}
- Latest data search/spatial search
json response:{ "type": 200, "title": "Success", "results": [ ] }
expected json response must be like :
{
"type": "urn:dx:rs:Success",
"title":"",
"results": [
{
"id": "resource-id-xyz-abc"
}
]
}
- Capitalisation of first letter in type . Eg:
"type":"urn:dx:rs:general"
should be"type":"urn:dx:rs:General"
Please do refer the urn response defined in draft BIS Standard: IS 18003 (Part 2):2021 Doc No: LITD 28 (17249), Unified Data Exchange Part 2: API specifications.
@kailash @swaminathanvasanth
abhi4578 commented
- Some response are directly given by gateway nginx and is not proxied to vertx. Do we want that too to follow urn responses ? @swaminathanvasanth . This includes following:
- 500 internal server error
- 502 bad gateway. This can appear while autoscalling of api servers or api servers are done for some reason.
- 429 Too many requests per ip and total requests to server
- 400 bad request method :
curl -XtRACK https://rs.iudx.org.in/apis -vvv
- 431 Request Header Fields Too Large
- 414 Request-URI Too Long
- 308 Permanent redirection :
curl http://rs.iudx.org.in/apis -vvv
- etc, other 3xx,4xx,5xx refer