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

SwaggerGenerator double-writes all search parameters #535

Closed
lmsurpre opened this issue Dec 23, 2019 · 2 comments
Closed

SwaggerGenerator double-writes all search parameters #535

lmsurpre opened this issue Dec 23, 2019 · 2 comments
Assignees
Labels
bug Something isn't working
Milestone

Comments

@lmsurpre
Copy link
Member

Describe the bug
I tried running the SwaggerGenerator from the 4.0.0 release and, unfortunately, it produces invalid Swagger. OpenApiGenerator has the same issue.
image

To Reproduce
Execute OpenApiGenerator and validate the result.

Expected behavior
Search parameters should only be listed once per type.

Additional context
There was a late change leading up to 4.0.0 in which I introduced a second entry in the search parameters map for each search parameter. In the past we only needed to look up the applicable search parameters by "code" but for Composite search we needed to look them up by "url" as well.
Obviously, I didn't know that would cause this knock-on effect to the Swagger/OpenAPI.

@lmsurpre lmsurpre added the bug Something isn't working label Dec 23, 2019
@lmsurpre lmsurpre added this to the Sprint 6 milestone Dec 23, 2019
@prb112
Copy link
Contributor

prb112 commented Dec 23, 2019

interesting side effect.

@lmsurpre lmsurpre self-assigned this Dec 23, 2019
lmsurpre added a commit that referenced this issue Dec 23, 2019
Previously, the parameter maps built by ParametersUtil had each
SearchParameter listed twice...once by "code" and once by "url".

This pull request introduces a new ParametersMap object that
encapsulates two separate maps and presents it as a single object.

Signed-off-by: Lee Surprenant <lmsurpre@us.ibm.com>
lmsurpre added a commit that referenced this issue Dec 23, 2019
Previously, the parameter maps built by ParametersUtil had each
SearchParameter listed twice...once by "code" and once by "url".

This pull request introduces a new ParametersMap object that
encapsulates two separate maps and presents it as a single object.

Signed-off-by: Lee Surprenant <lmsurpre@us.ibm.com>
lmsurpre added a commit that referenced this issue Dec 24, 2019
issue #535 - Deduplicate the SearchParameter map
@prb112
Copy link
Contributor

prb112 commented Dec 24, 2019

Reviewed, and closing after discussions in PR are complete

@prb112 prb112 closed this as completed Dec 24, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants