Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
How to document cnd's HTTP API #38
How to document cnd's HTTP API #38
Changes from 3 commits
90cdb10
aee9bc4
aaca50f
32aa452
e0b4366
16e4698
a227572
3c4914f
dfdc433
a32cad3
505f80f
e4dfc7f
f5f117b
7419c39
ed0d1dd
ed6719b
e23ed62
9e2903b
1e0e1ab
b3dfb80
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So the API documentation would be enough for
dredd
to generate random-yet-valid queries. That's cool.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah. But since you mention the word "random", it's important to point out that this is not fuzz-testing.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wouldn't you expect to replace the JSON schema with our Open API doc?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
My understanding is that JSON Schema is more expressive and can be used for things such as server-defined client-side validation. OpenAPI supports a subset of JSON Schema and in the near future if will be fully supported.
In any case, using the
$ref
keyword we can reference.schema.json
files in OpenAPI files. Until OpenAPI supports JSON Schema in full there might be some pain points, but there are ways to work around them.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would that allow developers to access the API specification of various versions or just master?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Talking to @thomaseizinger, we see the publicly hosted API specification only supporting master.
For someone developing against the API locally, we recommend adding an endpoint which returns the specification to the HTTP API itself.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you descrive a bit more OpenAPI vs JSON schema? I am not clear on the concepts.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hopefully clearer now.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What commit made it clearer?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This one.