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

How to document cnd's HTTP API #38

Merged
merged 20 commits into from
Sep 3, 2019
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Suggest rather than recommend endpoint name
  • Loading branch information
luckysori committed Sep 3, 2019
commit 9e2903b5eb56b6b40a3ed277b3428c37c159bf63
4 changes: 2 additions & 2 deletions 0015-how-to-document-cnd-http-api.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -267,7 +267,7 @@ Link: <http:https://example.com/schemas/swap.schema.json#>; rel=”describedby”

* https://apisyouwonthate.com/blog/the-many-amazing-uses-of-json-schema-client-side-validation[Blog on client-side validation based on JSON Schema].
Copy link
Contributor

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.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hopefully clearer now.

Copy link
Contributor

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?

Copy link
Collaborator Author

@luckysori luckysori Sep 5, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.


=== [[recommend-http-spec-endpoint]] Where to get the specification for the version you are developing against ===
=== [[recommend-use-endpoint-to-host-spec]] Where to get the specification for the version you are developing against ===

Instead of keeping track of all the versions of the API specification and serving all of them remotely, I recommend serving the specification on a local endpoint of cnd's HTTP API, such as `GET /http-spec`.

Expand All @@ -282,4 +282,4 @@ Instead of keeping track of all the versions of the API specification and servin
* <<recommend-host-github-pages, Use GitHub Pages>> to host documentation for latest `master`.
* <<recommend-custom-section-link-relation, Use custom section>> in spec to document extension relation types.
* <<recommend-use-json-schema-more, Embrace JSON Schema>> to describe data.
* <<recommend-http-spec-endpoint, Add `GET /http-spec` endpoint>> to provide documentation for a running instance of cnd.
* <<recommend-use-endpoint-to-host-spec, Add endpoint such as `GET /http-spec`>> to provide documentation for a running instance of cnd.