Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

Merge models from multiple resource definition #610

Closed

Conversation

kendzi
Copy link

@kendzi kendzi commented Jul 4, 2014

I'm using swagger with JAX-RS. My project has resource which is split into two facades. Both facades have the same path and api key. Swagger correctly merge all methods from both facades with description but it is not merging definition of models. So models definitions are present only for facade which was scanned first and second has only empty class name. I'm referring to models definitions which are used inside “Response Class” and for input parameters “Data Type”.

I have created example patch which fix the problem. Unfortunately my scala knowledge is poor and it most likely could be improved.

@fehguy
Copy link
Contributor

fehguy commented Jul 4, 2014

Hi, thanks for sending this. What version of swagger are you using? I believe that 1.3.6 was updated to support this but perhaps you've found an issue.

@kendzi
Copy link
Author

kendzi commented Jul 8, 2014

I'm using swagger core 1.3.5. I will try to check it with new version of swagger.

@kendzi
Copy link
Author

kendzi commented Jul 10, 2014

It is working ok in swagger 1.3.6, so no fix is need.

@kendzi kendzi closed this Jul 10, 2014
@kendzi
Copy link
Author

kendzi commented Jul 11, 2014

After release it seems not working with 1.3.6. I could have locally cached artifact with my fix when I was make test last time :/

@kendzi kendzi reopened this Jul 11, 2014
fehguy added a commit that referenced this pull request Jul 12, 2014
@fehguy
Copy link
Contributor

fehguy commented Jul 12, 2014

OK fixed. It looks like the api declarations were being merged, but the models were not. That would have made inconsitent results when merging, depending on reflection order. The above patch should fix this permanently.

@fehguy fehguy closed this Jul 12, 2014
fehguy added a commit that referenced this pull request Jul 12, 2014
@fehguy
Copy link
Contributor

fehguy commented Jul 12, 2014

see 1.3.7-SNAPSHOT in sonatype snapshots for an artifact

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants