Commit Graph

7 Commits

Author SHA1 Message Date
Nick Meinhold
41acae19e4 Dart fix template tests (#4015)
* Clean up samples directory before fixing tests

- removed from samples/client/petstore/dart2 :
  - purge_test.sh (doesn't seem to be used and not helpful)
  - openapi folder (is to be re-generated with more meaningful name)
- updated dart2-petstore.sh to generate client library with new name
- used updated shell script to re-generate client library
- updated CI/.drone.yml to use the new client library for tests

* Update petstore tests to use faked http client

- skipped all of the tests that hit a live endpoint
- made a fake http client that can be set to check for expected values
   and/or return a provided response
- added some files with test data recorded from live api calls
- updated the README to reflect changes to tests

* Update .drone.yml so CI will run the tests
2019-10-02 11:16:05 +08:00
Nick Meinhold
f25c6da856 Don't create redundant samples (#3800)
- removed lines in dart2-petstore.sh that create redundant samples
- deleted all dart2 samples
- ran dart2-petstore.sh to create only openapi sample
2019-08-30 12:02:26 +08:00
William Cheng
8236424aff
Fix Dart2 default template (#3790)
* fix dart2 default template

* update dart samples
2019-08-29 15:10:19 +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
Richard Whitehouse
a4be2c0bb4 Remove -XX:MaxPermSize (#2712)
This was removed in JDK 8 and produces a warning
2019-04-23 11:34:01 +08:00
William Cheng
d9400caf69
Set Dart2 as default, better format Dart code with dartfmt (#949)
* change dart default to v2

* add dart2 author

* add dartfmt to postProcess file in dart generator

* add dartfmt to format dart code
2018-09-02 17:59:42 +08:00
Yimin Lin
d327c5be46 [Dart 2] Add support for Dart 2 (#754)
* Add an option for Dart2

* add dart2 samples, update travis

* fix dart installation

* Upper constraints on the SDK version

* Update dependencies

* supportDart2 option can now be passed through --additional-properties

* Update petstore tests

* Update dart2-petstore.sh

* Running tests on Dart VM

* Fixed JSON deserialization bugs

* Fixed missing initialization of postBody

* Run bin/dart2-petstore.sh to regenerate libraries

* Update pom.xml

* Added SDK version constraints in pubspec.mustache

* Run bin/dart2-petstore.sh to regenerate libraries

* move dart2 test to the end
2018-09-01 01:49:18 +08:00