Commit Graph

17 Commits

Author SHA1 Message Date
wing328
7534df4520 Merge remote-tracking branch 'origin/master' into 4.1.x 2019-06-26 16:01:23 +08:00
Jim Schubert
3ee76a0662
[core] Initial implementation of a validation framework in core (#3183)
* Initial implementation of a validation framework in core

* Print surefire summary (helps evaluate errors)

* Bump versions: surefire plugin,jmockit

* Depend on jmockit within maven-surefire-plugin which requires it
2019-06-24 18:24:50 -04:00
Jim Schubert
6b428d65f6
Release versioning helper script(s) (#3110)
* Release versioning script with marker tags.

Introduces bump.sh which supports moving from version to version but
only within delimiting marker tags in the target file.

This script currently doesn't do validations or anything fancy.

* Allow bumping version according to type (major,minor,build,revision)

* bump.sh will display error if file contents are unchanged
2019-06-24 18:22:10 -04:00
William Cheng
8e11fd9fe4
Prepare 4.0.3-SNAPSHOT (#3185)
* update version to 4.0.3-SNAPSHOT

* update readme

* update gradle, maven plugin

* update release schedule

* update samples
2019-06-20 18:50:49 +08:00
William Cheng
fae9d4a37b
4.0.2 release (#3181)
* remove snapshot version

* update stable version

* remove build.gradle sample from relesae script
2019-06-20 12:39:15 +08:00
Jim Schubert
a96ab1cf9d
[core] GeneratorSettings, WorkflowSettings, and cleanup in CodegenConfigurator (#2946)
* Introduce GeneratorSettings + cleanup

GeneratorSettings is an immutable settings object, intended to limit the
manipulation of generator settings.

To move to GeneratorSettings, lots of modification was done to
CodegenConfigurator. The goal  here is that CodegenConfigurator
would create the contextual information required to initiate a
generator run:

* GeneratorSettings
* Workflow related settings
* Configuring "system" GeneratorProperties (ThreadLocal properties)
* Deserializing from file to config object
* Input spec document (OpenAPI, intending to target others)

ClientOpts was generally unused, and the few places it was being used
have been updated to pass the properties to
codegen.additionalProperties.

* Add sanity to system properties

The -D argument for the generate command is an application argument
which is easily confused for Java System Properties. This isn't the
case, as setting values here doesn't update the configuration in
System.getProperties().

This adds a warning and deprecation to that option, as defining these
values as system properties will also continue to work as expected. This
makes the -D application argument redundant and confusing.

* Contextualize generator/workflow settings

This splits settings relevant to generator configuration (the what) and
workflow configuration (the how) in an attempt to make configuration
easier to conceptualize.

* Update Gradle task w/ CodegenConfigurator setters

* Remove -D usage in scripts

* Add -p option for additional properties

* Regnerate samples
2019-06-07 13:07:52 -04:00
William Cheng
7e457f7e41 sync master 2019-06-03 00:32:13 +08:00
William Cheng
8d3a1a5add Merge remote-tracking branch 'origin/master' into 4.1.x 2019-06-03 00:06:43 +08:00
Jérémie Bresson
dc81574f2b Update version to 4.0.2-SNAPSHOT (#3047)
* Update version to 4.0.2-SNAPSHOT

* Update samples

* Change AppVeyor script (test of gradle sample)

* Fix release version bump script (gradle plugin, sample poms)

* Include sonatype snapshots in maven examples which reference 4.0.2-SNAPSHOT
2019-06-01 21:32:44 -04:00
William Cheng
39648ee3a7
Prepare 4.0.1 release (#3041)
* update snapshot version

* update to 4.0.1
2019-05-31 23:42:55 +08:00
William Cheng
f5de532c5e update to 4.1.0-SNAPSHOT 2019-05-14 22:43:10 +08:00
William Cheng
cbe39ba881 Set version to 4.0.1-SNAPSHOT (#2882) 2019-05-14 10:28:32 +02:00
William Cheng
3744273312
4.0.0 release (#2878)
* remove snapshot version

* update readme

* undo changes to example

* revert apache maven version

* update gradle property
2019-05-13 20:56:47 +08:00
Jim Schubert
6e1c8976fc
[feat] Intro GeneratorMetadata (stability index) (#2816)
* [feat] Intro GeneratorMetadata (stability index)

GeneratorMetadata offers an immutable object created via Builder pattern
which allows generators to explicitly define their stability (stable,
beta, experimental, deprecated) as well as a message to be shown during
generation.

This is a step toward:

* Fleshing out the "Core" artifact (#845)
* Providing a place to encapsulate feature-oriented metadata (#840)
* Providing a means to communicate end of life scheduling (#116)

This new structure, specifically the Stability property, allows us to
offer future enhancements such as allowing users to filter down to only
"Stable" generators via CLI, and eventually any compat table (see #503).

* Mark deprecated generators as deprecated in-code

* Re-export docs/generators.md
2019-05-05 16:54:22 -04:00
Jim Schubert
a02cb19d31 [docs] Document new templating engine, adding ability to reference templates by file to comlete the example (#2773) 2019-05-05 18:03:28 +08:00
Jim Schubert
baf0e85216
Load TemplatingEngineAdapter via Service Provider (#2755) 2019-04-29 15:17:11 -04:00
Jim Schubert
8bbeb8b7e3
Feature: Experimental Handlebars support (rienafairefr) (#2657)
* new module: openapi-generator-core
* templating engine adapters to support extension (currently only Handlebars)
* new `-e` templating engine CLI option
* adapt Generator to process Template with the passed TemplatingEngineAdpater
* add a MustacheEngineAdapter to the codegen in the unit tests
* force default MustacheEngineAdapter
* copy new core module in the root Dockerfile
* add processTemplatingEngine to CodegenConfig, to be overriden by Codegen classes if needed
* support multiple file extensions per templating engine adapter
* Extends handlebars experimental adapter with explicit contextual resolvers (e.g. map processing)
* Add new openapi-generator-core/pom.xml to release_version_update.sh
* A detailed message will be logged on missing handlebars helper
* Adds README documentation around template default and beta options
* Moves mustache package under new templating package
* Include built-in handlebars helpers which require explicit registration, and custom `startsWith` helper.
2019-04-25 21:52:50 -04:00