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

Fix Elm generator for polymorphism #78

Merged
merged 1 commit into from
May 17, 2018
Merged

Conversation

eriktim
Copy link
Contributor

@eriktim eriktim commented May 16, 2018

PR checklist

  • Read the contribution guidelines.
  • [ ] Ran the shell script under ./bin/ to update Petstore sample so that CIs can verify the change. (For instance, only need to run ./bin/{LANG}-petstore.sh and ./bin/security/{LANG}-petstore.sh if updating the {LANG} (e.g. php, ruby, python, etc) code generator or {LANG} client's mustache templates). Windows batch files can be found in .\bin\windows\. Apparently something is broken, the pet's category is named object instead, see Models are now typed as Object when properties of another Model #79. This PR does not alter the examples any further.
  • Filed the PR against the correct branch: Default: master.
  • Copied the technical committee to review the pull request if your PR is targeting a particular programming language.

Description of the PR

The support for polymorphism/discriminators was accidentally dropped by adding support for array schemas. This PR fixes correctly re-adds the array schemas support.

@wing328
Copy link
Member

wing328 commented May 17, 2018

I merged this into master locally and updated the Elm samples. The test result looks good:

elm|trenneman-fix-elm ⇒ mvn integration-test
[INFO] Scanning for projects...
[INFO]                                                                         
[INFO] ------------------------------------------------------------------------
[INFO] Building Elm Petstore Client 1.0-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO] 
[INFO] --- maven-dependency-plugin:2.8:copy-dependencies (default) @ ElmClientTests ---
[INFO] 
[INFO] --- exec-maven-plugin:1.2.1:exec (bundle-test) @ ElmClientTests ---
Success! Compiled 1 module.
Successfully generated index.html
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 3.113 s
[INFO] Finished at: 2018-05-17T19:03:42+08:00
[INFO] Final Memory: 11M/245M
[INFO] ------------------------------------------------------------------------

I'll merge this into master and update the Elm client with a separate PR.

@wing328 wing328 merged commit c522927 into OpenAPITools:master May 17, 2018
@eriktim eriktim deleted the fix-elm branch May 17, 2018 11:17
Ghufz pushed a commit to Ghufz/openapi-generator that referenced this pull request Jun 8, 2023
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.

None yet

2 participants