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

Rienafairefr's templating branch updated to current master #2657

Merged
merged 26 commits into from Apr 26, 2019

Conversation

Projects
None yet
3 participants
@jimschubert
Copy link
Member

commented Apr 13, 2019

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, ./bin/openapi3/{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

master merge and Locale.ROOT fix to get #690 to cleanly merge into master.

For any discussions, please continue the thread at #690.

rienafairefr and others added some commits Aug 17, 2018

Merge branch 'master' into rienafairefr-templating
* master: (133 commits)
  #2503: fix out-of-memory issue with nested objects with arrays with maxItems set by limiting to max. 5 example items (#2536)
  remove emitDefaultValue option (#2559)
  fix EmitDefaultValue default vallue with false (#2558)
  Added API Key auth to rust-server (#2459)
  remove initialCaps and replace with camelize (#2546)
  Add packageName configuration to maven (#2429)
  [Typescript AngularJS] fix Extra package prefix in api parameters operations (#2522)
  #1023 - [Scala] Use status family during response processing (#1024)
  Generate setters for readonly properties in server code (#1582)
  [JS] fix NPE for null string and improve Travis config file (#2553)
  [elm] Update ISO 8601 library (fixes missing time zone designator) (#2545)
  [csharp] update sample after #2528 (#2550)
  [JavaScript] fix index.js, ApiClient.js and test files generated to incorrect location (#2511)
  Aspnetcore nullable support (#2529)
  Csharp nullable support (#2528)
  [C++] [Qt5] Add enum support for client and server (#2339)
  Fixed typo in migration-from-swagger-codegen.md (#2548)
  [TypeScript Client] fix install Aurelia + fix use deprecated function (#2514)
  [KOTLIN] fix var name not correctly sanitized (#2537)
  Update swagger-parser to '2.0.11-OpenAPITools.org-1' (#2262)
  ...
Merge branch 'master' into rienafairefr-templating
* master: (47 commits)
  [Slim] Fix AbstractAuthenticator constructor TypeError (#2641)
  Fix issue 1340 - StaticHtmlGenerator to allow snake_case property names (#2612)
  Test Gradle plugin in Appveyor CI (#2651)
  Add Camptocamp to company list (#2652)
  Use percent encoding for path parameters (#2649)
  Unescape HTML characters in JS docstring (#2636)
  [ONLINE] Minor links fix (#2644)
  better handling of undefined inner property in array (#2635)
  Fix regexp error on php-slim (#2604)
  [TypeScript-Fetch] Generate oneOf schemas as type unions (#2617)
  Add Namsor as the sponsor (#2639)
  fix classname in website (#2638)
  Code review fixes (#2633)
  Move Ruby module/gem to codegen constant (#2621)
  Add sponsor section to the website (#2634)
  [Spring] Spotbugs static class and default encoding (#2609)
  Add @Zomzog (2019/04) to Java, Kotlin tech comm (#2630)
  [maven] remove validateSpec (#2614)
  Clean up the license field in various templates to ensure it's unlicense by default. (#2627)
  Fix NPE when server url is null (#2628)
  ...

@jimschubert jimschubert referenced this pull request Apr 13, 2019

Closed

Templating Engine API and handlebars support #690

3 of 3 tasks complete

@OpenAPITools OpenAPITools locked and limited conversation to collaborators Apr 13, 2019

@jimschubert

This comment has been minimized.

Copy link
Member Author

commented Apr 13, 2019

@OpenAPITools/openapi-generator-core-team Anyone able to review for potential breaking changes concerns? I'd like to get the functionality into 4.0.0 major release.

@jimschubert jimschubert added this to the 4.0.0 milestone Apr 13, 2019

@@ -70,6 +70,10 @@
description = "folder containing the template files")
private String templateDir;

@Option(name = {"-e", "--engine"}, title = "templating engine",
description = "templating engine, for now \"mustache\" and \"handlebars\" are supported")

This comment has been minimized.

Copy link
@wing328

wing328 Apr 14, 2019

Member

Minor suggestion: make it clear that mustache is the default and handlebar is beta only (not officially support)

@@ -184,6 +184,9 @@
public static final String DOTNET_FRAMEWORK = "targetFramework";
public static final String DOTNET_FRAMEWORK_DESC = "The target .NET framework version.";

public static final String TEMPLATING_ENGINE = "templatingEngine";
public static final String TEMPLATING_ENGINE_DESC = "The templating engine plugin to use";

This comment has been minimized.

@jimschubert

This comment has been minimized.

Copy link
Member Author

commented Apr 17, 2019

Breaking change with b5f2c2a, avoiding confusing package location.

@jimschubert

This comment has been minimized.

Copy link
Member Author

commented Apr 17, 2019

@wing328 thanks for the review. I added some clarity around those descriptions. I've also relocated package org.openapitools.codegen.mustache to org.openapitools.codegen.templating.mustache, and implemented a startsWith template helper as requested in #690.

While writing the unit test for this handlebars helper, I noticed the tests I had previously written for the mustache helpers no longer exist. Do you recall why they were removed, and if not… any objection if I add those tests back in? I looked in history and it seems they may have been removed mistakenly during a package rename.

@wing328

This comment has been minimized.

Copy link
Member

commented Apr 17, 2019

While writing the unit test for this handlebars helper, I noticed the tests I had previously written for the mustache helpers no longer exist. Do you recall why they were removed, and if not… any objection if I add those tests back in? I looked in history and it seems they may have been removed mistakenly during a package rename.

No objection at all and I don't recall removing those tests.

We definitely welcome more tests for this project.

@jimschubert

This comment has been minimized.

Copy link
Member Author

commented Apr 17, 2019

Cool. I'll create an issue and sign it to myself as a reminder.

Merge branch 'master' into rienafairefr-templating
* master: (40 commits)
  Remove quotation marks around {{paramName}} for header params in api-body.mustache (#2727)
  Add FiNC Technologies (#2728)
  fix missing parenthesis for http bearer auth (#2723)
  Add missing closing parenthesis (#2720)
  update perl test with correct body parameter (#2717)
  [Java][Spring] Fix template for reactive implementation with `interfaceOnly` parameter (#2437)
  Bugfix(Perl): Support nested primitive types in ARRARY or HASH for basic object (#2713)
  Remove `-XX:MaxPermSize` (#2712)
  Remove setting generateAliasAsModel in rust server generator (#2714)
  update rust server samples
  Revert "update rust samples"
  update rust samples
  update samples
  [Rust Server] Improve XML support (#2504)
  Improve CONTRIBUTING.md (#2699)
  [PHP][Lumen] Rename template folder (#2707)
  [aspnetcore] Support async tasks and some code cleanups (#2629)
  [C++][Pistache] Fixed #2643 (#2653)
  update petstore samples (#2697)
  [JAVA][Webclient]fix select body for url encoded media type. (#2686)
  ...

@jimschubert jimschubert merged commit 8bbeb8b into master Apr 26, 2019

6 checks passed

Shippable Run 7480 status is SUCCESS.
Details
ci/circleci Your tests passed on CircleCI!
Details
continuous-integration/appveyor/branch AppVeyor build succeeded
Details
continuous-integration/appveyor/pr AppVeyor build succeeded
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
continuous-integration/travis-ci/push The Travis CI build passed
Details

@jimschubert jimschubert deleted the rienafairefr-templating branch Apr 26, 2019

@jimschubert

This comment has been minimized.

Copy link
Member Author

commented Apr 26, 2019

Task for tracking adding back the tests is #2682

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
You can’t perform that action at this time.