[FEATURE] Support ignore feature of optimizer
Why do we need this improvement?
Optimizer 1.0.0 Supports [ignoring the schemas](https://github.com/asyncapi/optimizer?tab=readme-ov-file#applying-the-suggested-changes. I think I make sense that we introduce a new flag to the optimize flag to in CLI.
How will this change help?
It will help users over-optimizations in scenarios when there schemas are simple.
Screenshots
No response
How could it be implemented/designed?
We can add a new flag to the optimize command.
something like: asyncapi optimzie --ignore schemas
🚧 Breaking changes
No
👀 Have you checked for similar open issues?
- [X] I checked and didn't find a similar issue
🏢 Have you read the Contributing Guidelines?
- [X] I have read the Contributing Guidelines
Are you willing to work on this issue?
No, someone else can work on it.
Hey @KhudaDad414, I am working on this issue, but could you please provide more information on what the disableOptimizationFor does in the optimizer?
Forward of https://github.com/asyncapi/cli/issues/1323#issuecomment-2117488533:
I would suggest format of
disableOptimizationFor: {
schema: true,
},
to be rethought in a way that makes both options (in standalone and CLI) consistent.
Like
{ disableOptimizationForSchema: true } // in the standalone Optimizer
--disableOptimizationForSchema // in CLI's command line, as the very presence of the cmd switch already
// means 'true' and its absence - 'false'
{ disableOptimizationForSchema: flags.disableOptimizationForSchema } // in CLI's 'optimize.ts'
@helios2003
disableOptimizationFor is simply a section in the options object responsible for aggregating a set of true/false switches. It was introduced only in v1.0.0 strictly for schema: true, has no other purposes, and can safely be removed in favor of the above change.
:tada: This issue has been resolved in version 2.3.0 :tada:
The release is available on:
Your semantic-release bot :package::rocket: