Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FEATURE] Support ignore feature of optimizer #1432

Closed
2 tasks done
KhudaDad414 opened this issue May 17, 2024 · 3 comments · Fixed by #1447
Closed
2 tasks done

[FEATURE] Support ignore feature of optimizer #1432

KhudaDad414 opened this issue May 17, 2024 · 3 comments · Fixed by #1447
Labels
enhancement New feature or request released

Comments

@KhudaDad414
Copy link
Member

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?

  • I checked and didn't find a similar issue

🏢 Have you read the Contributing Guidelines?

Are you willing to work on this issue?

No, someone else can work on it.

@helios2003
Copy link
Contributor

Hey @KhudaDad414, I am working on this issue, but could you please provide more information on what the disableOptimizationFor does in the optimizer?

@aeworxet
Copy link
Contributor

Forward of #1323 (comment):

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.

@asyncapi-bot
Copy link
Contributor

🎉 This issue has been resolved in version 2.3.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request released
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

4 participants