-
-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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
Docs/Add standard json schema examples #1355
Conversation
…tiple types with restrictions, enum, not specific type keys
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.
Good work, we will need to update this once Fluent-Schema goes v1.0.0. I’m +1 on landing this.
Regarding some of the other questions, I think you might want to open separate issues, and note that definitions and $ref are not supported. IMHO we could support those, but we should do in a separate PR (if you would like to do it, please send it over!)
Perfect, I'll do it! |
I'm not so convinced to introduce this kind of suggestion into the core documentation: maybe a simple link to the repository or npm package is enough. For example we introduce |
We have a lot of questions about json schema, it is not a common skill in web dev for some reasons. Providing a fluent API with good typings would go a long way in helping out newbies/beginners with Fastify. I was thinking of putting it in the README, but it’s probably too early days for it. |
Hi, I'm back 😄 Happy new year 🎉 Regarding this PR: so, could be a good trade-off adds to docs more json-schema standard examples? |
I'm good with that approach! |
This reverts commit 5fdcf69.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
Hi stale bot 😋 |
Meanwhile, fluent-schema v0.6.0 is out https://github.com/fastify/fluent-schema/releases/tag/v0.6.0 :) |
I will rework on this PR soon: I'm thinking how to write a schema/table in order to show easily:
|
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
Updated the title to match this #1355 (comment) |
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.
LGTM
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.
LGTM
This pull request has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
Checklist
Hi,
I'm opening this PR to get some feedback about this changing for issue #1329 .
I have written a "big" example with fluent schema because I think that put many little examples could be too broad and more confusing.
I have split the first example to view better the four main parameters of schema validation input (
body, querystring, params and headers
).There are some questions I would like to expose you:
fluent-schema
has started a big refactor for the v1 release, so I will update docs when it will be releaseddefinitions
and$ref
tags, as discussed in other issues like Encapsulate JSON schemas #1351 is supported byfluent-schema
but not in fastify: should we implement that function or add a disclaimer in docs?Let me know what do you think and what I should I do 😄
Thank you
PS: next days I will not have the PC so I'll continue with this PR at starts of January 💪