writeOnly and readOnly naming
See original GitHub issueIt might be beneficial to have aliases for writeOnly
and readOnly
, as their use cases are often considered in the context of their reverse, per https://github.com/OAI/OpenAPI-Specification/issues/425#issuecomment-220882892.
writeOnly
is used for input fields (like passwords) on GET requests.
readOnly
is used for server-generated output fields (like IDs) on POST requests.
May I suggest:
writeHidden
to be aliased to readOnly
and
readHidden
to be aliased to writeOnly
Issue Analytics
- State:
- Created 5 years ago
- Comments:18 (9 by maintainers)
Top Results From Across the Web
c# - How to get 'ReadOnly' or 'WriteOnly' properties from a class?
1 Answer 1 · Apologies, I forgot the sorting request - how do you want them sorted? By read\write, read-only, write-only, or by...
Read more >Schema object property has both 'writeOnly' and 'readOnly' set ...
One or more properties in the schema you have defined has both writeOnly and readOnly properties set to true . You can define...
Read more >readonly keyword - C# Reference - Microsoft Learn
A readonly field can be assigned and reassigned multiple times within the field declaration and constructor. A readonly field can't be assigned ...
Read more >OpenAPI Specification - Version 3.0.3 - Swagger
All field names in the specification are case sensitive. This includes all fields ... Patterned fields MUST have unique names within the containing...
Read more >Question - When is [WriteOnly] safe? - Unity Forum
AFAIK Read-only and WriteOnly allows the jobsystem to schedule jobs easier, probably reducing computations deciding when to schedule jobs.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@tedepstein and given the OP’s nick
toobulkeh
it seems that he was also making fun of whoever he wanted to make fun of.Having aliases / multiple ways of achieve the same thing is basically not the way the OAS is written. It would be a burden, cognitively (i.e on support) and on tooling.