Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upImprove documentation for hydra responses #1663
Open
Comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Is your feature request related to a problem? Please describe.
When I'm consuming hydra APIs I would like to know which fields in the response json can be optional/null/absent, so that I can model my types properly on the consumer side.
For some responses there is a proper description of the fields in the documentation.
For example for login request responses there are already helpful comments
This information lets me model this as
otherwise it would look like this:
That is all great, but I would like this information for all fields in all response objects.
After the sample json in the documentation it says
But the API documentation doesn't give me the information I need:
https://www.ory.sh/docs/hydra/sdk/api#loginrequest
Describe various solutions you'd like
This information belongs in the API documentation.
Possible solutions:
a. Right now there is "Required" column that always seems to be false. We could use that value to indicate that a field will always be present in the response and that it has a non-null value.
b. We could postfix Name or Type values with "(optional)"
c. We could prefix Description value with "(optional)"
More opinions
I think this should apply to at least all endpoints of all ory services that are not supposed to be consumed by a standard library (like oauth2/token etc)