Skip to content
New issue

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

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

Already on GitHub? # to your account

feat: add flag moveAllToComponents #216

Merged
merged 10 commits into from
Apr 16, 2024

Conversation

aeworxet
Copy link
Collaborator

@aeworxet aeworxet commented Jan 19, 2024

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
Collaborator Author

@KhudaDad414 @derberg
@asyncapi/bounty_team

@KhudaDad414
Copy link
Member

@aeworxet can you resolve the conflicts?

@aeworxet aeworxet force-pushed the feat-add-flag-moveAllToComponents branch from bd66dd1 to 0da5951 Compare January 26, 2024 14:19
Copy link

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
@aeworxet aeworxet force-pushed the feat-add-flag-moveAllToComponents branch from f8972c1 to 78ec006 Compare March 16, 2024 09:50
@KhudaDad414
Copy link
Member

@aeworxet the tests are failing.

@aeworxet aeworxet force-pushed the feat-add-flag-moveAllToComponents branch from 78ec006 to 0cb2bbe Compare March 25, 2024 04:48
@aeworxet aeworxet force-pushed the feat-add-flag-moveAllToComponents branch from 0cb2bbe to 185fa11 Compare March 25, 2024 23:05
@aeworxet aeworxet force-pushed the feat-add-flag-moveAllToComponents branch from ad47136 to a0e1783 Compare April 4, 2024 07:49
@aeworxet aeworxet force-pushed the feat-add-flag-moveAllToComponents branch 5 times, most recently from 383d1c8 to d81adbd Compare April 6, 2024 03:20
@aeworxet aeworxet force-pushed the feat-add-flag-moveAllToComponents branch from 52bf069 to ab30af8 Compare April 9, 2024 00:21
@aeworxet aeworxet force-pushed the feat-add-flag-moveAllToComponents branch from ab30af8 to 13c0681 Compare April 9, 2024 08:35
@aeworxet
Copy link
Collaborator Author

This PR is ready for merging.
Please review.

@aeworxet aeworxet force-pushed the feat-add-flag-moveAllToComponents branch from 90ff19b to 93877bc Compare April 10, 2024 23:18
Copy link

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

Copy link
Member

@KhudaDad414 KhudaDad414 left a comment

Choose a reason for hiding this comment

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

LGTM!

Copy link
Member

@KhudaDad414 KhudaDad414 left a comment

Choose a reason for hiding this comment

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

LGTM!

@aeworxet
Copy link
Collaborator Author

/rtm

@asyncapi-bot asyncapi-bot merged commit d10b7a1 into asyncapi:next Apr 16, 2024
10 checks passed
@aeworxet aeworxet deleted the feat-add-flag-moveAllToComponents branch April 16, 2024 20:43
@asyncapi-bot asyncapi-bot added the bounty AsyncAPI Bounty label Aug 21, 2024
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
Projects
Status: Completed
Development

Successfully merging this pull request may close these issues.

3 participants