Commit Graph

107 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
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
Jeremie Bresson
98348a9ee6 Merge remote-tracking branch 'origin/master' into HEAD 2019-05-20 13:06:34 +02:00
Jérémie Bresson
4e579ff75b
[meta] remove cli dependency (#2896) 2019-05-19 21:25:16 +02: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
a2fb88c1c1
[all] Adds strict spec option (#2783)
* [all] Adds strict spec option

Introduces an option to allow user customization of strict specification
behaviors. For instance, OpenAPI 3.x requires a path object name to be
prefixed with '/' so we append any missing '/', but this may not be
desirable to some users or generators. In this commit, this fix specifically is
the only modification affected.

* Clarify strict-spec docs, add option to README.md

* Update CLI options in docs/usage.md
2019-05-03 10:57:47 -04:00
Jim Schubert
5ea4391af5 [cli][gradle] Adds package name as a global option (#2557)
* [cli] Support packageName as global option

CLI supports other package-related options (--api-package,
--model-package, --invoker-package). This aligns those options with
--package-name to avoid confusion about how to configure these options
where those are supported.

This intentionally does not apply a packageName getter/setter to
DefaultCodegen to reduce the footprint of this change.

* [gradle] Add packagName as global option

This makes packageName available as a global option, beside apiPackage,
modelPackage, and invokerPackage to reduce potential confusion about how
to configure the four of these options by generators which support them.
2019-05-01 00:46:48 +08: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
William Cheng
23476fb66a
Revert "update version (#2591)" (#2597)
This reverts commit b3146c9983.
2019-04-05 00:26:30 +08:00
William Cheng
b3146c9983
update version (#2591) 2019-04-04 20:50:50 +08:00
dragosnutu
9e391efd1d [#2442] - implement yamlsample config help output; (#2443) 2019-03-26 15:22:59 +08:00
john lilley
dc78405a68 1391 jel minimal overwrite option (#2451)
Option to overwrite only changed files
2019-03-21 00:17:10 +08:00
Vincent Devos
218c2e75ab [MAVEN PLUGIN] fix javadoc + sonarlint (#2399) 2019-03-20 16:16:59 +08:00
Ramzi Maalej
3100afce26 second part of fixing Sonar issues (#2295)
* fix sonar issues

* fix csharp model issue

* refactor code
2019-03-20 15:12:00 +08:00
dragosnutu
1f45ea7d1a [#2425] - implemented yaml parsing for config file. (#2434) 2019-03-18 21:49:45 +08:00
Jason Henriksen
e5a0d18374 PR for ability to easily debug newly created codegen classes. (#2388)
* 2nd attempt to make the automatic checkin testing work

* trying to submit the samples in hopes that the CI matches them and passes

* found some samples I hadn't updated.  Maybe this is it?
2019-03-16 12:53:45 +09:00
Vincent Devos
027e6c4a5c [plugin][maven] add missing General Configuration parameters in README (#2156) 2019-02-16 22:12:19 -05:00
Jeremie Bresson
16f52cf2ad Set version to 4.0.0-SNAPSHOT
This reverts commit 6a414af13f.
2019-02-01 00:03:51 +01:00
Jérémie Bresson
6a414af13f
4.0.0-beta2 release (#2036) 2019-02-01 00:00:22 +01:00
Jim Schubert
6fe9a52229 [feat][docs][website] Initial docusaurus based site (#1770)
* Iniital docusaurus based site

* Remove error about default local being used by String.format

* Change pinned users to represent global presence rather than alphabetical order pinning

* Include generator indexes in ensure-up-to-date (docusaurus site and /generators/README)

* Add Font Awesome attribution footer

* Remove feature callout until it is completed

* Include NPM try it out section

* Improve "Getting Started" type docs

* Include new custom template documentation

* Updating templating and customization docs

* Add vendor extension docs

* Cleanup templating page(s).

* Move users to yaml file for easy edit.

* travis configuration, and baseUrl mods to image URLs

* [docs] Migrate FAQ, release summary  from wiki

FAQ has been split into multiple smaller documents to better categorize
and allow users to find what they're looking for (in docs folder or in
new website).

Release summary information (versioning strategy and cadence) has been
migrated from the Wiki and clarified a bit.

Also adds copy button for all code snippets in website.

* Copy current contributing/code of conduct to website

* [docs] Creating a new generator
2019-01-18 17:39:33 +08:00
Jim Schubert
db9102a440 Clean up file output handling (#1895)
* Clean up file output handling

This attempts to normalize all generators to use OS agnostic
File.separator.

It also cleans up some areas in code where we replace "." in full file
output path with File.separator. We should only be modifying directory
names we own, and should avoid modifying anything that can be provided
by a user.

It would probably be better to use Paths.get(…).toString() in all cases.

* Fix missed path separators in java codegen

* Adjust Java codegen path replacements

* Convert / in full path replacements, as / is forbidden in Windows, and noop elsewhere

* Use Paths.get where files are written, to better handle Windows path constraints
2019-01-14 22:49:39 +08:00
Akihito Nakano
6e4556772c Delete langs command (#1836)
* Delete langs command

* Delete "langs" from docker entrypoint script

* langs -> list

* langs -> list
2019-01-07 08:57:05 -05:00
William Cheng
3ec90a86cb
Add an option to generate the alias (map, array) as model (#1729)
* add option to generate alias as model

* fix issue due to incorrect merge
2018-12-31 11:59:58 +08:00
Daiki Matsudate
9ff8a24895 fix description (#1710) 2018-12-20 15:55:29 +08:00
Akihito Nakano
f19794464b
Delete --lang option (#1592)
* Delete --lang option

* Fix -l

* Fix -l flag (windows)

* Add migration guide

* Change to -g

* Remove lang option

* Change to -g
2018-12-09 19:26:51 +09:00
William Cheng
b226f52d13 Merge remote-tracking branch 'origin' into 4.0.x 2018-11-30 10:16:16 +08:00
Akihito Nakano
3efe56752e Improve error message when the spec is not found (#1495)
* Improve error message when spec not found

* Add test yaml

* Fix invalid yaml file path

* Fix typo
2018-11-28 16:50:52 +08:00
William Cheng
2bcf5b2263 Merge remote-tracking branch 'origin/3.4.x' into 4.0.x 2018-11-15 17:49:44 +08:00
William Cheng
a87a544bf5 Merge remote-tracking branch 'origin/master' into 3.4.x 2018-11-15 17:11:01 +08:00
William Cheng
8d9542207a
Prepare 3.3.4 snapshot (#1450)
* change version to 3.3.4-snapshot

* updat readme

* update samples
2018-11-15 16:21:15 +08:00
William Cheng
7564d629e7
prepare 3.3.3 release (#1447) 2018-11-14 23:56:58 +08:00
Akihito Nakano
c8837ea414
Change entrypoint to docker-entrypoint.sh (#1413)
Run entrypoint script
2018-11-13 17:24:04 +09:00
William Cheng
02e85cc417
Prepare v3.3.3-SNAPSHOT (#1355)
* prepare 3.3.3-snapshot

* update petstore samples
2018-11-01 10:42:26 +08:00
William Cheng
0cc9b69b6f
3.3.2 release (#1353)
* prepare 3.3.2 release

* update script to remove outdated reference
2018-10-31 20:48:14 +08:00
William Cheng
3482a0a993 Merge remote-tracking branch 'origin/master' into 3.4.x 2018-10-26 21:04:25 +08:00
William Cheng
4a47acce19 Merge remote-tracking branch 'origin/3.4.x' into 4.0.x 2018-10-26 18:41:58 +08:00
William Cheng
9422dea149 Merge remote-tracking branch 'origin/master' into 3.4.x 2018-10-26 18:40:37 +08:00
Akihito Nakano
27fd224828 [CLI] Fix help command (#1279)
* Bump up airline

* Since airline 0.8, "ParserUtil.createInstance" requires CommandFactory
2018-10-20 15:06:55 +08:00
William Cheng
9e3c7781bb Merge remote-tracking branch 'origin/3.4.x' into 4.0.x 2018-10-16 16:08:11 +08:00
William Cheng
257a97b6cd update petstore samples 2018-10-16 13:19:40 +08:00