modelina icon indicating copy to clipboard operation
modelina copied to clipboard

Merging two CommonModels can overwrite unwanted properties

Open jonaslagoni opened this issue 3 years ago • 6 comments

Describe issue

With the current implementation of the merging of CommonModels we hardcode that the CommonModel being merged into another overwrites the following properties:

  • $id
  • $ref
  • extend
  • originalSchema

How to solve

I am not entirely sure how to solve this unless we allow those properties to contain multiple values, but that does not make sense from the generator's perspective.

Could we maybe add an option for the user to decide the merge option they want? 🤔

jonaslagoni avatar May 15 '21 16:05 jonaslagoni

@jonaslagoni this is even more complex after I intruduced this issue.

czlowiek488 avatar May 15 '21 16:05 czlowiek488

This issue has been automatically marked as stale because it has not had recent activity :sleeping: It will be closed in 60 days if no further activity occurs. To unstale this issue, add a comment with detailed explanation. Thank you for your contributions :heart:

github-actions[bot] avatar Jul 15 '21 00:07 github-actions[bot]

This issue has been automatically marked as stale because it has not had recent activity :sleeping: It will be closed in 60 days if no further activity occurs. To unstale this issue, add a comment with detailed explanation. Thank you for your contributions :heart:

github-actions[bot] avatar Sep 26 '21 00:09 github-actions[bot]

Still relevant, as #365 should solve this by providing both models, time will tell.

jonaslagoni avatar Sep 27 '21 10:09 jonaslagoni

This issue has been automatically marked as stale because it has not had recent activity :sleeping:

It will be closed in 120 days if no further activity occurs. To unstale this issue, add a comment with a detailed explanation.

There can be many reasons why some specific issue has no activity. The most probable cause is lack of time, not lack of interest. AsyncAPI Initiative is a Linux Foundation project not owned by a single for-profit company. It is a community-driven initiative ruled under open governance model.

Let us figure out together how to push this issue forward. Connect with us through one of many communication channels we established here.

Thank you for your patience :heart:

github-actions[bot] avatar Jan 26 '22 00:01 github-actions[bot]

This issue has been automatically marked as stale because it has not had recent activity :sleeping:

It will be closed in 120 days if no further activity occurs. To unstale this issue, add a comment with a detailed explanation.

There can be many reasons why some specific issue has no activity. The most probable cause is lack of time, not lack of interest. AsyncAPI Initiative is a Linux Foundation project not owned by a single for-profit company. It is a community-driven initiative ruled under open governance model.

Let us figure out together how to push this issue forward. Connect with us through one of many communication channels we established here.

Thank you for your patience :heart:

github-actions[bot] avatar May 29 '22 00:05 github-actions[bot]

As I have yet to find an example that can be tested for where we don't see an expected behavior it's almost impossible to ponder in which scenarios it won't work...

Lets go of each use-case that is being raised and see where it does not work.

jonaslagoni avatar Oct 11 '22 11:10 jonaslagoni