Commit Graph

8 Commits

Author SHA1 Message Date
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
Benoît Courtine
f4eb96933a [Rust] Client library choice between hyper and reqwest (#1258)
* Port of PR https://github.com/swagger-api/swagger-codegen/pull/8804.

* Correction of conflict with PR #528 (missing template file).

* Add rust-reqwest samples to Circle CI tests.

* Add integration test pom.xml file with launcher to trigger cargo execution.

* Deduplicate Maven project name.

* Fix "api_key" header for Petstore.

* Better API key management.

* Fix query param for lists of objects other than strings (numbers, etc.).

* Update to reqwest 0.9, and refactor of header management (using reqwest transition feature).

* Merge scripts generating rust-hyper and rust-reqwest samples.

* Consistent full stops.

* Use raw variables in all Rust mustache templates.

* Replace production build in CI with a quick simple check.

* Update samples.

* Finish Reqwest 0.9 migration (removing "hyper 0.11" transition feature).

* Configuration implements Default trait.

* API template reorganized: HashMap is not required anymore.

* Revert "Merge scripts generating rust-hyper and rust-reqwest samples."

This reverts commit 970f996566a740045f2a986fd70fc70f11952925.

* Remove deprecated "-XX:MaxPermSize" java arg.
2018-10-26 10:24:14 +01:00
Jim Schubert
27426f7b52 Cli generator name option, replaces 'language' options in CLI and Maven Plugin (#57) 2018-05-23 05:41:19 +02:00
Ben Mordue
0d82971b0c Use maven batch-mode (#70) 2018-05-16 21:39:52 +08:00
Jérémie Bresson
019b0dca1c
Add echo line at the beginning of each sh script (#202) 2018-04-23 09:58:45 +02:00
wing328
4cfbc118e8 renaming for openapi-generator 2018-03-13 14:41:23 +08:00
Ahmed Charles
60766c6210 Make the Rust codegen compile. (#6411)
* Use the right package name for the Rust crate.

* Change getters on models to return Option for non-required fields.

* Cleanup Rust generation and get example compiling again.

* Use underscore names for functions.
2017-09-02 00:06:55 +08:00
wing328
4cb7f1d613 [Rust] add new Rust client generator (#6105)
* add rust generator (1st release)

* update based on feedback

* fix reserved keyword

* fix string parameter

* Convert String to &str in trait definition

* Only pass pathParams to uri builder

* Fixed the html escaping in return type

* Fixed the hashmap constructor

* Added models into API scope

* removed models subimport, reference from super

* update returntype in method signature

* Fixed the remaining templates inconsistencies

* Fixed issues that floated up in kubernetes swagger file

* add hash support, fix docstring

* fix map parameter, update api.mustache

* use baseName for parameter

* use fully-qualfiied model name

* add rust tests

* fix test cases

* Rust gen slightly more idiomatic (#6247)

* Go -> Rust in README

* Remove leftover go file in rust sample

* rust: Regenerate sample

* rust: Rename *Impl -> *Client

* rust: one-line use line

More in line with common style

* rust: Replace tabs (in java) with 4 spaces

* Added trivial getter implementation (#6249)

* update rust petstore samples
2017-08-06 16:59:08 +08:00