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

Require schemas for APIs #719

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

Require schemas for APIs #719

wants to merge 1 commit into from

Conversation

JoelQ
Copy link
Contributor

@JoelQ JoelQ commented Nov 13, 2024

When consuming an API from a client, a schema makes your life easier. Not only does it provide documentation, but it also can integrate into automated tooling such as type-checkers and code generators.

On the back end, it's nice to plug a schema into a unit test to guarantee that the implementation matches the spec. Depending on the system you use, schemas can also be used to generate API docs or test fixtures.

When consuming an API from a client, a schema makes your life easier. Not only does it provide documentation, but it also can integrate into automated tooling such as type-checkers and code generators.

On the back end, it's nice to plug a schema into a unit test to guarantee that the implementation matches the spec. Depending on the system you use, schemas can also be used to generate API docs or test fixtures.
Copy link
Member

@nickcharlton nickcharlton left a comment

Choose a reason for hiding this comment

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

To bring over my comment from the PR which spawned this one:

Do we have a general preference for tools for doing this?

I think something in the guides which provided specific direction there would be great (and also would make a good blog post!).

@purinkle
Copy link
Contributor

In Rails on iOS, we recommend using json-schema

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

Successfully merging this pull request may close these issues.

3 participants