question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

writeOnly and readOnly naming

See original GitHub issue

It 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:closed
  • Created 5 years ago
  • Comments:18 (9 by maintainers)

github_iconTop GitHub Comments

3reactions
silkentrancecommented, Aug 9, 2018

@tedepstein and given the OP’s nick toobulkeh it seems that he was also making fun of whoever he wanted to make fun of.

2reactions
MikeRalphsoncommented, Aug 9, 2018

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.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found