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

Removes secondaryParam and hasMore #7882

Merged

Conversation

spacether
Copy link
Contributor

@spacether spacether commented Nov 5, 2020

This PR removes the properties

  • secondaryParam
  • hasMore

because these parameters are booleans that are used to control rendering in mustache templates
We can remove these because mustache already has #-first and #-last and ^-first and ^-last tags

  • #secondaryParam -> ^-first
  • ^secondaryParam -> -first
  • #hasMore -> ^last
  • ^hasMore -> -last

PR checklist

  • Read the contribution guidelines.
  • Pull Request title clearly describes the work in the pull request and Pull Request description provides details about how to validate the work. Missing information here may result in delayed response from the community.
  • If contributing template-only or documentation-only changes which will change sample output, build the project beforehand.
  • Run the shell script ./bin/generate-samples.shto update all Petstore samples related to your fix. This is important, as CI jobs will verify all generator outputs of your HEAD commit as it would merge with master. These must match the expectations made by your contribution. You may regenerate an individual generator by passing the relevant config(s) as an argument to the script, for example ./bin/generate-samples.sh bin/configs/java*. For Windows users, please run the script in Git BASH.
  • File the PR against the correct branch: master
  • Copy the technical committee to review the pull request if your PR is targeting a particular programming language.

@spacether spacether marked this pull request as draft November 5, 2020 02:43
@spacether spacether added this to the 5.0.0 milestone Nov 5, 2020
@spacether spacether marked this pull request as ready for review November 5, 2020 04:40
@spacether spacether closed this Nov 5, 2020
@spacether spacether reopened this Nov 5, 2020
@spacether spacether force-pushed the removes_secondaryParam_and_hasMore branch from 26a0932 to b6e34ae Compare November 6, 2020 04:50
@spacether spacether force-pushed the removes_secondaryParam_and_hasMore branch from b6e34ae to fc81c68 Compare November 6, 2020 04:52
@wing328
Copy link
Member

wing328 commented Nov 6, 2020

Looks like somes tests need to be updated accordingly as well:

[ERROR] COMPILATION ERROR : 
[ERROR] /home/travis/build/OpenAPITools/openapi-generator/modules/openapi-generator/src/test/java/org/openapitools/codegen/DefaultCodegenTest.java:[2590,14] cannot find symbol
  symbol:   variable hasMore
  location: variable propA of type org.openapitools.codegen.CodegenProperty
[ERROR] /home/travis/build/OpenAPITools/openapi-generator/modules/openapi-generator/src/test/java/org/openapitools/codegen/DefaultCodegenTest.java:[2593,14] cannot find symbol
  symbol:   variable hasMore
  location: variable propB of type org.openapitools.codegen.CodegenProperty
[ERROR] /home/travis/build/OpenAPITools/openapi-generator/modules/openapi-generator/src/test/java/org/openapitools/codegen/DefaultCodegenTest.java:[2596,14] cannot find symbol
  symbol:   variable hasMore
  location: variable propC of type org.openapitools.codegen.CodegenProperty
[ERROR] /home/travis/build/OpenAPITools/openapi-generator/modules/openapi-generator/src/test/java/org/openapitools/codegen/DefaultCodegenTest.java:[2599,22] cannot find symbol
  symbol:   variable hasMore
  location: variable propBRequired of type org.openapitools.codegen.CodegenProperty
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.8.1:testCompile (default-testCompile) on project openapi-generator: Compilation failure: Compilation failure: 
[ERROR] /home/travis/build/OpenAPITools/openapi-generator/modules/openapi-generator/src/test/java/org/openapitools/codegen/DefaultCodegenTest.java:[2590,14] cannot find symbol
[ERROR]   symbol:   variable hasMore
[ERROR]   location: variable propA of type org.openapitools.codegen.CodegenProperty
[ERROR] /home/travis/build/OpenAPITools/openapi-generator/modules/openapi-generator/src/test/java/org/openapitools/codegen/DefaultCodegenTest.java:[2593,14] cannot find symbol
[ERROR]   symbol:   variable hasMore
[ERROR]   location: variable propB of type org.openapitools.codegen.CodegenProperty
[ERROR] /home/travis/build/OpenAPITools/openapi-generator/modules/openapi-generator/src/test/java/org/openapitools/codegen/DefaultCodegenTest.java:[2596,14] cannot find symbol
[ERROR]   symbol:   variable hasMore
[ERROR]   location: variable propC of type org.openapitools.codegen.CodegenProperty
[ERROR] /home/travis/build/OpenAPITools/openapi-generator/modules/openapi-generator/src/test/java/org/openapitools/codegen/DefaultCodegenTest.java:[2599,22] cannot find symbol
[ERROR]   symbol:   variable hasMore
[ERROR]   location: variable propBRequired of type org.openapitools.codegen.CodegenProperty
[ERROR] -> [Help 1]

@wing328
Copy link
Member

wing328 commented Nov 6, 2020

cc @OpenAPITools/generator-core-team as well

@wing328 wing328 added the Enhancement: Code Cleanup General refactoring, removal of deprecated things, commenting, etc. label Nov 6, 2020
@spacether
Copy link
Contributor Author

Looks like some tests need to be updated accordingly as well:
@wing328 thank you; all tests are now passing

@wing328
Copy link
Member

wing328 commented Nov 7, 2020

FYI. Some comments still are still referencing hasMore in OneOfImplementorAdditionalData.java and we can revise those later as these comments do not impact the functionality of the code.

Copy link
Member

@wing328 wing328 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@wing328 wing328 merged commit 08fb590 into OpenAPITools:master Nov 7, 2020
@spacether spacether deleted the removes_secondaryParam_and_hasMore branch November 8, 2020 15:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Breaking change (without fallback) Enhancement: Code Cleanup General refactoring, removal of deprecated things, commenting, etc.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants