How to lint a decorated bundle output?
I think I'm missing something. I have an OpenAPI description which ... needs some work. It's generated, so I can't change it directly, and I'm evaluating using decorators to get it to the point that it passes the linting step, with some rules disabled. I'll say immediately that it was super simple to get started, the example of a custom decorator is a great starting point, and this was much easier to get moving with than I expected; I have a great first impression so far.
So now the sticking point: How do I bundle and then lint? I can redocly bundle --lint but that shows me the errors as if the decorators haven't been run. If I bundle and save to an output file, then (using duplicate config for the rules) lint the resulting output, I get what I expected - I still see some errors but the decorators have fixed a few things.
I expected to be able to do this in one step: producing the decorated output with bundle and it being linted against the declared rules. Can I do that? If not, would you consider adding this?
It looks like you are looking for preprocessors. Decorators are similar to decorators but they run before the lint or bundle, not after.
Preprocessors are a little bit tricky. A simple mistake in the preprocessor can break our core validation. Also, we can't show correct error message locations after the preprocessors run.
We're considering deprecating preprocessors in the current shape and replacing them with a separate command (like preprocess or compile). Alternatively, we're considering changing the way they run.
But we won't change the API so you're pretty safe using them now.
Let me know if you have any other quesitons.
Closing it as outdated.