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

[BUG][Java] Raw MultiValueMap instances created for formParams #5782

Closed
4 of 6 tasks
jonfreedman opened this issue Apr 1, 2020 · 0 comments · Fixed by #5784
Closed
4 of 6 tasks

[BUG][Java] Raw MultiValueMap instances created for formParams #5782

jonfreedman opened this issue Apr 1, 2020 · 0 comments · Fixed by #5784

Comments

@jonfreedman
Copy link
Contributor

Bug Report Checklist

  • Have you provided a full/minimal spec to reproduce the issue?
  • Have you validated the input using an OpenAPI validator (example)?
  • What's the version of OpenAPI Generator used?
  • Have you search for related issues/PRs?
  • What's the actual output vs expected output?
  • [Optional] Bounty to sponsor the fix (example)
Description

Compiler warnings are generated from Api classes as formParams is not parameterised.

openapi-generator version

openapi-generator-maven-plugin 4.3.0 - needs to be fixed in master

OpenAPI declaration file content or url

https://github.com/OpenAPITools/openapi-generator/blob/master/modules/openapi-generator/src/main/resources/Java/libraries/resttemplate/api.mustache#L119

Command line used for generation

n/a - this is present in your samples: https://github.com/OpenAPITools/openapi-generator/blob/master/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/api/StoreApi.java#L88

Steps to reproduce

n/a - this is present in your samples: https://github.com/OpenAPITools/openapi-generator/blob/master/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/api/StoreApi.java#L88

Related issues/PRs

n/a

Suggest a fix

Just add the parameters: <String, Object>

jonfreedman added a commit to jonfreedman/openapi-generator that referenced this issue Apr 1, 2020
jonfreedman added a commit to jonfreedman/openapi-generator that referenced this issue Apr 1, 2020
wing328 pushed a commit that referenced this issue Aug 12, 2020
* parameterize formParams

fixes #5782

* sync generated code

* update to latest version of spring, replace MultiValueMap#put with #addAll, remove unused imports

* restore java.util.HashMap import

* update spring version in pom/gradle templates

* re-generate resttemplate samples

* fix test

* fix test

* parameterize an additional usage of LinkedMultiValueMap

* re-generate resttemplate samples

* re-generate webclient samples

* manually edit FILES to replace \ with /
wing328 added a commit that referenced this issue Aug 27, 2020
* [java/resttemplate] Generate valid code if no Authentication implementations present

Take the logic used to decide which instances to add to the authentications map and re-use to not import classes or offer non-functional util methods

* parameterize formParams

fixes #5782

* replace use of ISO8601DateFormat and ISO8601Utils with StdDateFormat

fixes #5779

* add constructor to intialise calendar

* Revert "[java/resttemplate] Generate valid code if no Authentication implementations present"

This reverts commit 6e45090.

* Revert "parameterize formParams"

This reverts commit 7a26ce5.

* also override single arg parse method to avoid throwing exception

* also override single arg parse method to avoid throwing exception

* update samples

* update samples

* fix jersey1 tests

* fix jersey2 test

* update resteasy dependencies

* fix java jersey2 oas3 tests

* use java8 in springboot-beanvalidation

Co-authored-by: Jon Freedman <jon.freedman@zoho.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant