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

[gradle-plugin] Array model change #1789

Merged
merged 1 commit into from
Jan 2, 2019
Merged

Conversation

jimschubert
Copy link
Member

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\.
  • Filed the PR against the correct branch: master, 3.4.x, 4.0.x. Default: master.
  • Copied the technical committee to review the pull request if your PR is targeting a particular programming language.

Description of the PR

We've changed how top-level models defined as an array work. The change was not recent.

I found that CI wasn't running the checks on uploadArchive (so the failing test wasn't caught). This PR fixes the failing test and ensures we run check whenever we run uploadArchives (if tests fail, archive won't be uploaded).

* Update GenerateTaskDslTest to remove "Pets" array model which is no longer generated
* Ensure check on uploadArchives task
@jimschubert jimschubert force-pushed the gradle-plugin-array-model-change branch from 433967f to 27eebe0 Compare January 1, 2019 14:14
@wing328
Copy link
Member

wing328 commented Jan 2, 2019

We've changed how top-level models defined as an array work. The change was not recent.

You can restore the behavior using --generate-alias-as-model (default: false) (#1729)

I found that CI wasn't running the checks on uploadArchive (so the failing test wasn't caught). This PR fixes the failing test and ensures we run check whenever we run uploadArchives (if tests fail, archive won't be uploaded).

Shall we run the check everytime the CI runs instead of running via uploadArchives only?

@wing328 wing328 added this to the 4.0.0 milestone Jan 2, 2019
@jimschubert
Copy link
Member Author

@wing328

Shall we run the check everytime the CI runs instead of running via uploadArchives only?

I don't understand the question. In this PR, the tests have been added as a dependency to the uploadArchives task so tests will run when that task is called. If we were to add this elsewhere in a major/upcoming branch, it would be redundant.

Were you asking about explicitly adding it somewhere else?

@wing328
Copy link
Member

wing328 commented Jan 2, 2019

Sorry that I misunderstood. I thought the task will only be run for stable releases but it will be called when deploying snapshot version as well.

@wing328 wing328 merged commit 8fd474d into master Jan 2, 2019
@jimschubert jimschubert deleted the gradle-plugin-array-model-change branch January 4, 2019 23:46
A-Joshi pushed a commit to ihsmarkitoss/openapi-generator that referenced this pull request Feb 27, 2019
* Update GenerateTaskDslTest to remove "Pets" array model which is no longer generated
* Ensure check on uploadArchives task
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.

2 participants