-
-
Notifications
You must be signed in to change notification settings - Fork 211
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]: Improve Enum documentation #521
Comments
Can I work on this one @benjagm |
Let's discuss what the improvement is in this issue before working on it. |
I guess telling the user where does enum live in overall schema using an example of enumerated values and then giving an example of using two different data types will be helpful. |
This is my point: where would you say that
|
Agreed @gregsdennis it can vary depending on different schemas |
It's fine as it is or we can just add an example for an array of enumerated values |
We shouldn't combine We tell people this all the time, and they still do it. But we shouldn't promote this practice. |
Completely agree with you @gregsdennis. |
We just received more feedback regarding improving the docs of Enum:
|
So what changes we should introduce in the documentation @benjagm ? |
I don't think that makes sense from a JSON Schema perspective. However, I think it might make sense if they're trying to build a form, and they want a field called |
Yeah agreed @gregsdennis |
Add what? We can't document any form gen stuff because every form generator does things differently. There's no standard. |
Comment: Is "enum" a keyword or a user-defined name? For example, would "color": ["red", "green", "blue"] work? This comment |
I don't understand how adding that improves the docs. |
I think the docs are actually quite clear that it's a keyword. The examples on the page use it as a keyword. JSON Schema is comprised of keywords. I'm not sure how else it can be interpreted. I don't know what the commenter means by "user-defined name" because there's no such thing in JSON Schema. There are custom keywords, but those are also keywords. The page STARTS with "The |
After going through this thread, I came up with a couple suggestions: 1. To further enrich the We can add
Also, I agree with @gregsdennis , using 2. In response to the comment received It seems like a common query beginners might have. The code above perfectly shows how to use @benjagm Let me know if this task can be Assigned to me. Thanks. |
is this free? |
@radhesh1 what needs doing is unclear. I don't think that anything needs to be done and this issue can be closed. If you see a way to make things more clear, please make a proposal here before creating a PR. |
Hello! 👋 This issue has been automatically marked as stale due to inactivity 😴 It will be closed in 180 days if no further activity occurs. To keep it active, please add a comment with more details. There can be many reasons why a specific issue has no activity. The most probable cause is a lack of time, not a lack of interest. Let us figure out together how to push this issue forward. Connect with us through our slack channel : https://json-schema.org/slack Thank you for your patience ❤️ |
We'd love this issue to stay open. |
Hii @benjagm , I came across website and try to understand the application so my concern is we should work on providing more details for specific topic and give more language specific example like for JS and TS . And we can also add search bar for faster access the topic. |
@benjagm may I work on this issue, please review this, looks better |
@benjagm @valeriahhdez May I work on this issue, there is no activity from last 2 months |
@techmannih Yes, you can |
What Docs changes are you proposing?
We received this feedback from the website and we think this is a great suggestion to improve our docs:
Page: /understanding-json-schema/reference/enum
Comment: It'd be nice to see enum defined in context - where does it live in an overall schema?
Code of Conduct
The text was updated successfully, but these errors were encountered: