-
-
Notifications
You must be signed in to change notification settings - Fork 9
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
feat: add flag moveAllToComponents
#216
Conversation
@KhudaDad414 @derberg |
@aeworxet can you resolve the conflicts? |
bd66dd1
to
0da5951
Compare
|
f8972c1
to
78ec006
Compare
@aeworxet the tests are failing. |
78ec006
to
0cb2bbe
Compare
0cb2bbe
to
185fa11
Compare
ad47136
to
a0e1783
Compare
383d1c8
to
d81adbd
Compare
52bf069
to
ab30af8
Compare
ab30af8
to
13c0681
Compare
This PR is ready for merging. |
90ff19b
to
93877bc
Compare
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
/rtm |
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. IfOptimizer
is unable to findx-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 instructOptimizer
to move all AsyncAPI Specification-valid components to thecomponents
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.moveAllToComponents: true
(therefore, the default ismoveDuplicatesToComponents: false
.)Adds new switch (property in the options object):
disableOptimizationFor: { schema: false }
will instructOptimizer
to ADD calculatedschemas
to the optimized AsyncAPI Document.disableOptimizationFor: { schema: true }
turns this behavior off. Ifschemas
existed in the AsyncAPI Document prior to optimization, they will be left intact.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