Skip to content

[All] Fix some inheritance/composition issues and add allOf unit tests - #3637

Merged
wing328 merged 1 commit into
swagger-api:masterfrom
cbornet:fix_multi_inheritance
Oct 3, 2016
Merged

wing328 merged 1 commit into
swagger-api:masterfrom
cbornet:fix_multi_inheritance

Conversation

@cbornet

@cbornet cbornet commented Aug 24, 2016

Copy link
Copy Markdown
Contributor

Also adds a supportMixins property for languages that support mixins/multiple inheritance.

Fix #3629 #3544 #3474 #3636

@cbornet

cbornet commented Aug 25, 2016

Copy link
Copy Markdown
Contributor Author

@wing328 we are now selecting the interface that has a discriminator as parent. But for models that don't have a discriminator, should we select the first interface as parent like it was done before ?
I don't have a strong opinion on this:

  • on one hand, it allows to have some model inheritance without discriminator which some people may find useful.
  • on the other hand, if you have several interfaces, it's a bit disturbing to have different implementation for them. But I guess most of the time, models will have only one interface so that may not be a big issue.

Eventually, we could also have some "x-extends" or "x-parent" vendor extension where users could explicitely define the interface they want to be used as parent model.

@wing328 wing328 added this to the v2.2.2 milestone Sep 6, 2016
@cbornet cbornet changed the title Fix some inheritance/composition issues and add allOf unit tests [All] Fix some inheritance/composition issues and add allOf unit tests Sep 13, 2016
@AlexNolasco

Copy link
Copy Markdown
Contributor

Wondering if addProperties should account for this issue
#3829

@cacti77

cacti77 commented Sep 30, 2016

Copy link
Copy Markdown

Will this PR fix issue #3904?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants