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.

`hide-x-internal` built-in decorators

See original GitHub issue

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

github_iconTop GitHub Comments

3reactions
bojanzcommented, Nov 18, 2021

I have just posted a related issue detailing problems when trying to make hide-internal-parameters work: #453.

2reactions
slavikbezcommented, Nov 8, 2021

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.

Read more comments on GitHub >

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

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