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

Better visibility of response structure by changing template #5

Open
Bertware opened this issue Mar 27, 2017 · 1 comment
Open

Better visibility of response structure by changing template #5

Bertware opened this issue Mar 27, 2017 · 1 comment

Comments

@Bertware
Copy link
Member

Change templates, or modify the current one, to explicitly show the returned datastructures and their descriptions.

@stijndcl
Copy link

Could this 7-year-old issue perhaps be looked into again? The current documentation is lacking in many aspects, making it unnecessarily difficult to develop applications against the iRail API.

  • The JSON schemas only describe the top-level fields of responses, never the nested objects inside of them
    • As a direct consequence of this, it's hard to know which fields are optional and which aren't, as this part of the schema is simply not available
  • The example responses are inaccurate/data is returned in unexpected formats
    • Numbers are shown in the example as floats and ints, but in practice they are returned as strings
    • Booleans are shown in the example as ints (0 or 1), but in practice they are also returned as strings (these should just contain true and false instead of numbers in all honesty)
    • This also leads to uncertainties surrounding some fields. When I see the value "0" in my API response, is it a string, an int or a bool?

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

2 participants