Skip to content

feat: add flag moveAllToComponents - #216

Merged
asyncapi-bot merged 10 commits into
asyncapi:nextfrom
aeworxet:feat-add-flag-moveAllToComponents
Apr 16, 2024
Merged

asyncapi-bot merged 10 commits into
asyncapi:nextfrom
aeworxet:feat-add-flag-moveAllToComponents

Conversation

@aeworxet

@aeworxet aeworxet commented Jan 19, 2024 •

Copy link
Copy Markdown
Contributor

This PR:

  • Adds support for property x-origin during optimization of the provided AsyncAPI Document, using its values to assign meaningful names to the moved components. If Optimizer is unable to find x-origin properties during optimization of the provided AsyncAPI Document, the existing names of components are used as a fallback mechanism.

  • Adds new functionality and therefore new switch (property in the options object) moveAllToComponents:

    • moveAllToComponents: true will instruct Optimizer to move all AsyncAPI Specification-valid components to the components object of the AsyncAPI Document during optimization process. moveDuplicatesToComponents: true has no impact in this case.
    • moveAllToComponents: false turns this behavior off, moveDuplicatesToComponents: true can be used again.
    • Default if not specified: moveAllToComponents: true (therefore, the default is moveDuplicatesToComponents: false.)
  • Adds new switch (property in the options object):

disableOptimizationFor: {
  schema: false,
},
    • disableOptimizationFor: { schema: false } will instruct Optimizer to ADD calculated schemas to the optimized AsyncAPI Document.
    • disableOptimizationFor: { schema: true } turns this behavior off. If schemas existed in the AsyncAPI Document prior to optimization, they will be left intact.
    • Default if not specified: disableOptimizationFor: { schema: false }.
  • Updates existing and adds new Jest tests.

  • Excludes repository's directory test from SonarCloud's automatic code review.

Partial resolution of asyncapi/bundler#141

@aeworxet

Copy link
Copy Markdown
Contributor Author

@KhudaDad414 @derberg
@asyncapi/bounty_team

@KhudaDad414

Copy link
Copy Markdown
Member

@aeworxet can you resolve the conflicts?

@sonarqubecloud

Copy link
Copy Markdown

Quality Gate Passed Quality Gate passed

Kudos, no new issues were introduced!

0 New issues
0 Security Hotspots
No data about Coverage
No data about Duplication

See analysis details on SonarCloud

@aeworxet
aeworxet marked this pull request as ready for review February 10, 2024 07:31
@KhudaDad414

Copy link
Copy Markdown
Member

@aeworxet the tests are failing.

@aeworxet

Copy link
Copy Markdown
Contributor Author

This PR is ready for merging.
Please review.

@sonarqubecloud

Copy link
Copy Markdown

Quality Gate Passed Quality Gate passed

Issues
0 New issues
0 Accepted issues

Measures
0 Security Hotspots
No data about Coverage
0.0% Duplication on New Code

See analysis details on SonarCloud

@KhudaDad414 KhudaDad414 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@KhudaDad414 KhudaDad414 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@aeworxet

Copy link
Copy Markdown
Contributor Author

/rtm

@asyncapi-bot
asyncapi-bot merged commit d10b7a1 into asyncapi:next Apr 16, 2024
@aeworxet
aeworxet deleted the feat-add-flag-moveAllToComponents branch April 16, 2024 20:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

Status: Completed

Development

Successfully merging this pull request may close these issues.

3 participants