As we discovered in #3463, there are various bits of the rust client generator that are currently untested. This PR adds tests for various generator-specific types, and also files.
Follows the example of the rust-server generator for making it easy to add new test specs. This should make it easier for future contributors to make sure that their contributions are tested
* 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
* 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.
* 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.
* 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