`hide-x-internal` built-in decorators
See original GitHub issueIs your feature request related to a problem? Please describe.
Hiding internal APIs is a common scenario.
Describe the solution you’d like
We have an article: https://redoc.ly/docs/cli/guides/hide-apis/ which shows how to make a decorator using x-internal
to hide operations, paths, and schema properties. This could be improved to support parameters, etc. Also, it doesn’t clean unused components (which should probably be its own built-in decorator).
Describe alternatives you’ve considered
None
Additional context
Related decorator ideas:
- Hide or select based on tags (for example, bundle only the customers and payments tags; or remove everything with the billing tag).
Issue Analytics
- State:
- Created 2 years ago
- Comments:9 (7 by maintainers)
Top Results From Across the Web
Using Python Class Decorators - Built In
This tutorial will demonstrate how classes can be used to decorate the functions we write in our Python code. We'll go over two...
Read more >Python - what are all the built-in decorators? [closed]
So any built-in function that returns another function can be used as a decorator. Question is - does it make sense to use...
Read more >Primer on Python Decorators
In this introductory tutorial, we'll look at what Python decorators are and how to create and use them.
Read more >A guide to Python's function decorators - The Code Ship
Essentially, decorators work as wrappers, modifying the behavior of the code before and after a target function execution, without the need to ...
Read more >5 Advanced Tips on Python Decorators | by Michael Berk
2 — The Property Decorator ... Tip: use the built-in @property to augment setter/getter functionality. One of the most common built-in decorators is...
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
I have just posted a related issue detailing problems when trying to make hide-internal-parameters work: #453.
I got stuck with tests here https://github.com/Redocly/openapi-cli/pull/443 and I need to switch to other more prioritised work. Maybe somebody will take over when time allows.