`media-type-examples-override` decorator
See original GitHub issueIs your feature request related to a problem? Please describe.
To solve the same issue we solved with other decorators.
Most developers are too lazy to define media type examples.
https://github.com/redocly-demo/decorators-demo/pull/1
In the event the OpenAPI file is auto-generated, then there is no reliable way to add examples (without them getting overwritten on the next auto-generation).
Describe the solution you’d like
I’d like to see:
decorators:
media-type-examples-override:
operationIds:
PostPets: ./pet-examples.yaml
Describe alternatives you’ve considered None - I am open to ideas.
Issue Analytics
- State:
- Created 2 years ago
- Comments:6 (6 by maintainers)
Top Results From Across the Web
media-type-examples-override - Redocly
This decorator provides a way to "overlay" a new examples over the source so that as the source changes you won't lose your...
Read more >Override value of custom runtime annotation applied on ...
tl;dr: I'm overriding a method annotation of an interface on a child-child class, but the annotation's value is not being override.
Read more >PEP 698 – Override Decorator for Static Typing
This PEP proposes adding an @override decorator to the Python type system. This will allow type checkers to prevent a class of bugs...
Read more >Enforcing the Output MediaType | MuleSoft Documentation
However, as shown in the video media type example, you can use whatever ... This parameter allows the module's user to manually override...
Read more >Using @Consumes and @Produces to Customize Requests ...
The doGetAsHtml method's @Produces annotation overrides the class-level ... If a resource class is capable of producing more that one MIME media type, ......
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 Free
Top 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
Yes, it can have multiple examples. However, that’s a good question. It needs to target the response code or the request media type.
So maybe it should be like this:
EDITED
I implemented the second option because it looks more secure