-
-
Notifications
You must be signed in to change notification settings - Fork 250
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
improve Enum documentation #1312
base: main
Are you sure you want to change the base?
Conversation
built with Refined Cloudflare Pages Action⚡ Cloudflare Pages Deployment
|
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #1312 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 10 10
Lines 396 396
Branches 106 106
=========================================
Hits 396 396 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
@benjagm @valeriahhdez review this PR |
@techmannih pls. attach some screenshots and screencasts showing your changes |
@DhairyaMajmudar sure, 20250201090654.mp4 |
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.
Instead of replacing one example with another, I suggest adding your example to the document. Please provide an introductory statement to your example.
@benjagm please review this now. |
### Extended Example: Accepting Multiple Data Types | ||
|
||
Enums can be used without explicitly setting a data type, allowing different types of values. | ||
In the following example, the schema is extended to include `null` (to represent an "off" state) and the number 42. |
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 would the number 42 mean? If we're explaining null
, then it seems we should explain 42
as well. Alternatively leave out the explanation.
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.
Now you've just removed 42 from the text, but it's still in the sample instance.
My point wasn't to remove the value. It was to either remove the description of null or add a description to 42.
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.
we are using both in the example, so I think we need to have both. what do you think?
What kind of change does this PR introduce?
improve Enum documentation
Issue Number: