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

[Bug] /route/ connections parameter is not working #907

Closed
6 tasks done
DaneelTrevize opened this issue May 10, 2018 · 2 comments
Closed
6 tasks done

[Bug] /route/ connections parameter is not working #907

DaneelTrevize opened this issue May 10, 2018 · 2 comments

Comments

@DaneelTrevize
Copy link

Bug

This endpoint returns a route that does not seem to consider any supplied connections pairs that would cause a shorter alternative route. In the following example, an Amarr to Jita route is request, with a shortcut connection supplied, between Sarum Prime and Perimeter. The regular ~10 gates route is still returned, rather than the 4 named systems hypothetical option.

Request

GET /latest/route/30002187/30000142/?connections[0]=[30003522,30000144]

Response

Status Code

200

Headers

HTTP/2.0 200 OK
date: Thu, 10 May 2018 09:49:06 GMT
content-type: application/json; charset=UTF-8
content-length: 91
access-control-allow-credentials: true
access-control-allow-headers: Content-Type,Authorization,If-None-Match,X-User-Agent
access-control-allow-methods: GET,HEAD,OPTIONS
access-control-allow-origin: *
access-control-expose-headers: Content-Type,Warning,ETag,X-Pages,X-ESI-Error-Limit-Remain,X-ESI-Error-Limit-Reset
access-control-max-age: 600
allow: GET,HEAD,OPTIONS
cache-control: public
etag: "e74c016dcf01085693f03b8c041773005b7062c565c655fcc48680c0"
expires: Thu, 10 May 2018 18:47:16 GMT
last-modified: Wed, 09 May 2018 18:47:16 GMT
strict-transport-security: max-age=31536000
vary: Accept-Encoding
x-esi-error-limit-remain: 100
x-esi-error-limit-reset: 54
x-esi-request-id: 7327c457-4b26-45ea-9938-93689e2180cd
X-Firefox-Spdy: h2

Body

Please provide the response body, feel free to scrub any opsec details you wish. E.g.:

[30002187,30003491,30003503,30003504,30002789,30002788,30002791,30000139,30000144,30000142]

Expected

[30002187,30003522,30000144,30000142]

Checklist

Check all boxes that apply to this issue:

  • Bug description is provided
  • Request path is provided
  • Response status code is provided
  • Response headers are provided
  • Response body is provided
  • Expected response is provided
@a-tal
Copy link
Contributor

a-tal commented May 10, 2018

you're missing qsarg formatting. (a swagger client would do this for you)

https://esi.evetech.net/latest/route/30002187/30000142/?connections=30003522%7C30000144&datasource=tranquility&flag=shortest

@DaneelTrevize
Copy link
Author

DaneelTrevize commented May 10, 2018

Hey, I was just trying to help someone else out.

Seems there's not a HTTP standard for GET request array encoding, even if Swagger has one somewhere. Good to know ESI sounds like it's following that.

Edit: I can find no non-ESI reference to "qsarg formatting". Swagger seems to call it style:pipeDelimited, explode:false query parameters.

The parameters section of ESI swagger.json for this endpoint doesn't specific schema or content. Only "collectionFormat": "pipes". Edit: because it's OAS 2, which has collectionFormat, not 3.

The nice thing about standards is that you have so many to choose from.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants