75 Commits

Author SHA1 Message Date
William Cheng
5a9b0fcf9e update samples 2020-04-21 02:22:55 +08:00
William Cheng
faf6f197be Merge remote-tracking branch 'origin/master' into 5.0-sync-master 2020-04-17 15:51:00 +08:00
Shinya Sugmoto
800293ccf9
[Dart] Fix "basic" auth method and Add Bearer token support (#5743)
* added auth check and lint

* fixed basic auth condition

* Added bearer auth

* updated samples

* update dart petstore samples

Co-authored-by: William Cheng <wing328hk@gmail.com>
2020-04-12 09:38:15 +08:00
William Cheng
a0ca253218
update samples (#5722) 2020-03-27 13:55:55 +08:00
William Cheng
b450ce8a5a Merge remote-tracking branch 'origin/4.3.x' into 5.0.x 2019-12-28 12:34:30 +08:00
William Cheng
81e15ed0bf Merge remote-tracking branch 'origin/master' into 4.3.x 2019-12-28 12:00:09 +08:00
William Cheng
90cbf71134 update dart petstore samples 2019-12-28 00:13:02 +08:00
William Cheng
ca6fb2c4f2 update dart samples 2019-12-27 16:49:02 +08:00
William Cheng
11c7007429
Prepare v4.2.3 (#4663)
* update version

* update doc

* update samples
2019-12-02 15:26:01 +08:00
William Cheng
4ed742b6bc update samples 2019-11-21 15:24:13 +08:00
William Cheng
facabd4472 Merge branch '4.3.x' into 5.0.x 2019-11-21 15:19:31 +08:00
William Cheng
60f4de0f22 Merge remote-tracking branch 'origin/master' into 4.3.x 2019-11-20 18:15:22 +08:00
Mikle
2838db2052 Add HEAD method to ApiClient of dart codegen (#4504)
* add HEAD method to ApiClient of dart codegen

* update samples
2019-11-20 11:52:57 +08:00
William Cheng
f07b3e0521
Prepare 4.2.2-SNAPSHOT (#4497)
* update to 4.2.2-SNAPSHOT

* update doc

* update samples

* skip ocaml test

* update version

* fix version
2019-11-15 21:34:25 +08:00
William Cheng
4824bb7711 sync master, update samples 2019-11-04 09:28:19 +08:00
William Cheng
47e2c0d027
update samples (#4334) 2019-10-31 13:31:49 +08:00
wing328
54151891cc Merge branch 'master' into 5.0.x 2019-10-17 11:18:57 +08:00
Jim Schubert
54d7e8c488
[CLI] Initial implementation for batch generation (#3789)
* [CLI] Initial implementation for batch generation

Allows for generating multiple outputs via config. Just specify multiple
config files on command line.

Intent for this is to reduce CI times to generate outputs as well as to
reduce time for users to run ensure-up-to-date to meet PR standards.

Example command:

  openapi-generator batch --includes-base-dir `pwd` --fail-fast  -- bin/ci/*

---

As part of this implementation, the batch command support a customized
JSON key, `!include`. If this key's value refers to an existing file,
that file's contents are "unwrapped" into the config during
deserialization. This allows us to easily point to the same configs used
by our sample scripts without modifying the CLI generate task's switches
or assumptions.

* Allow for path-relative outputs
* Add batch JSON objects
* Include INFO log about threads used and includes/root
* Ensure GlobalSettings.reset()
* Improved thread-safety of ModelUtils
2019-10-09 12:51:52 -04:00
William Cheng
5eb67d471b Merge remote-tracking branch 'origin/4.2.x' into 5.0.x 2019-09-22 21:00:38 +08:00
William Cheng
3019b5a5e1 Merge remote-tracking branch 'origin/master' into 4.2.x 2019-09-22 14:18:07 +08:00
William Cheng
ea029b4029
update doc, samples (#3875) 2019-09-11 21:17:11 +08:00
William Cheng
3ebefccfa9
Prepare v4.1.2 release (#3873)
* update samples

* update date
2019-09-11 18:33:27 +08:00
Quim Muntal
8f13b88ed9 Support custom git repository (#3757)
* add gitHost param to GeneratorSettings and related

* parameterize gitHost in READMEs

* parameterize gitHost in go.mod

* parameterize gitHost in git_push

* update petstore samples

* run ./bin/utils/export_docs_generators.sh

* run meta-codehen.sh

* Revert "run meta-codehen.sh"

This reverts commit d6d579f6159186531257cdfdd73b9caf9e9ffeba.

* Revert "run ./bin/utils/export_docs_generators.sh"

This reverts commit 1b81538198d4319fd1b4e97447303e3cc0e8dc99.

* Revert "update petstore samples"

This reverts commit f513add88396707f6991ae2e4920359583ec88f1.

* run ensure-up-to-date
2019-09-03 21:35:49 +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
William Cheng
a8fe5d355c Merge remote-tracking branch 'origin/4.2.x' into 5.0.x 2019-08-29 14:48:00 +08:00
William Cheng
9182784955 Merge remote-tracking branch 'origin/master' into 4.2.x 2019-08-28 14:01:20 +08:00
William Cheng
d0d545bbdd
Prepare 4.1.2 snapshot (#3758)
* update pom

* update samples

* update ts axios samples
2019-08-26 22:13:12 +08:00
William Cheng
136c1407ac
Move tests to Drone.io CI (#3754)
* move tests to drone.io

* ls dir

* debug

* use bash

* use jdk 11 image

* move tests to drone.io

* use maven wrapper

* comment out scripts in circleci

* update dart samples

* remove commented tests

* update dart samples
2019-08-26 00:35:51 +08:00
Nick Meinhold
a05f68431a [Dart] Avoid redundant null checking in fromJson (#3632)
* Move dart null checks inside mustache type checks

- removed surrounding null check
- added a conditional expression to each case except the redundant one

* Run shell scripts so CIs can verify the change
2019-08-25 01:16:32 +08:00
William Cheng
bb5cd4c42d
[Dart] test Dart petstore clients in drone.io (#3717)
* test dart 1x in drone

* update dart image

* trigger build failure

* Revert "trigger build failure"

This reverts commit d565f348ba120d9111b7ad2c6f7e3ad077197a26.

* add dart 2 test

* update build runner version

* test dart2

* only test dart jaguar

* remove pubspec.lock

* better wording

* use pub run test

* revert changes in build_runner

* update test in pom.xml

* update samples

* add dart scripts to ensure up-to-date
2019-08-21 18:19:38 +08:00
Nick Meinhold
ba65f675e2 [Dart] Make clients crossplatform (#3608)
* Remove browserClient flag and bump http dependency

* Run shell scripts so CIs can verify the change
2019-08-13 15:35:00 +08:00
Paul Mundt
4b0fc3013f [dart2] Fix up test code generation, double deserialization, 'new' keyword deprecation (#3576)
* dart2: Use the correct classname in test generation

At present test generation has a stray hard-coded reference to the pet
store Pet() class, which should reflect the actual classname under test.

* dart2: Call toDouble() in generated code for double types

At present the generated code does not correctly handle transitioning
to double when dealing with non-integer types in JSON deserialization.
This ends up with dart raising an unhandled type mismatch exception:

Unhandled exception: type 'int' is not a subtype of type 'double' where
...

Using the .toDouble() conversion when a double type is expected fixes
this up by making the typing explicit.

* dart2: Drop use of deprecated 'new' keyword in generated code

The use of the 'new' keyword in dart2 is deprecated and should be
avoided, as per the official guidance of the dart2 authors:

https://dart.dev/guides/language/effective-dart/usage#dont-use-new

* dart2: Regenerate samples for mustache template changes
2019-08-09 00:15:45 +08:00
William Cheng
60e6371fc5
fix class hardcode to pet (#3014) 2019-05-28 00:45:01 +08:00
William Cheng
b88b1d656a
Add auto-generated tests and travis config to Dart clients (#3006)
* add auto-generated tests and travis config for dart

* improve tests

* fix tests

* add test, travis files to dart jaguar generator
2019-05-27 18:44:57 +08:00
William Cheng
2bc9592bd5
Revert "Add auto-generated tests and travis config to Dart clients (#2909)" (#3001)
This reverts commit dfda6655ec4add93b03bf351287286523cb53e97.
2019-05-26 01:50:31 +08:00
William Cheng
dfda6655ec
Add auto-generated tests and travis config to Dart clients (#2909)
* add auto-generated tests and travis config for dart

* improve tests

* fix tests
2019-05-25 22:52:30 +08:00
ircecho
049d24ee4f dart2: update to work with dart 2.3.0 (#2894)
* dart2: update to work with dart 2.3.0

* dart2: update to work with dart 2.3.0
2019-05-15 22:49:54 +08:00
Paul Mundt
c08c45de05 dart2 linter updates for prefer_equal_for_default_values, prefer_is_empty (#2654)
* Use isNotEmpty instead of length in dart2 validity checks

In dart2 the preferred method of checking whether an object is empty or
not is to use the .isNotEmpty property. An aspect that is now warned
about by the linter.

While not an issue in this particular case - testing length can also
have negative performance implications for Iterable collections, which
are not required to know or provide their length deterministically.

* Prefer equals for default values in dart2

The dart2 linter complains about m({a: 1}) style assignments, preferring
m({a = 1}) instead. Update the api_client generation to follow this.

* Regenerate dart2 samples for mustache template changes
2019-04-17 10:57:06 +08:00
Dale King
d93fd31bb1 [dart] Fix authentication for dart (#2419)
* [dart] Fix authentication so all forms of Swagger 2.0 authentication work

* Run changes on petstore examples

* Amend dart2 generated README to cover basic authentication

* Amend dart2 generated README to cover authentication methods

* [dart] Fix authentication so all forms of Swagger 2.0 authentication work

* Run changes on petstore examples
2019-03-19 10:08:43 +08:00
d3v-cl
49b15ee518 Dart queryargs (#2250)
* [DART2]: fix encoding query args

* [DART]fix: url encode query arguments

* [DART][DART2]feat: rebuild petstore
2019-03-07 15:52:34 +08:00
d3v-cl
bc6997f0e5 [DART2]: fix Map<String, nativeType> fromJson (#1936) 2019-01-25 10:54:46 +08:00
d3v-cl
9ccf872290 [DART] fix: set fields to null if json value is null. (#1798)
* fix: set fields to null if json value is null.

* rebuild dart2 petstore

* rebuild dart petstore

* rebuild petstore

* [DART]fix: set fields to null if json value is null.
2019-01-09 00:26:46 +08:00
William Cheng
d35f4b08d9
Fix various typos in the templates (Ruby, C#) (#1803)
* Fix typos

* update petstore samples
2019-01-05 09:39:10 +08:00
William Cheng
22049db8c1
fix enum value, update dart petstore samples (#1193) 2018-10-09 07:08:04 +08:00
William Cheng
29322da2f6
Dart (Jaguar) client generator (#998)
* generator for dart jaguar

* migrate to openapi-generator

* fix locale issue

* add auth generation for dart jaguar

* fix generation of jaguar api with auth (#1009)

* update deps (#1016)

* add CI tests for dart jaguar

* update dart jaguar bin script

* trigger build failure

* Revert "trigger build failure"

This reverts commit a7d8bfd47a93f0903932aeff4afefeb7aa4c5c4a.
2018-09-13 21:39:57 +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
Jérémie Bresson
059a3efe46 Regenerate samples (#367) 2018-05-08 16:44:51 +08:00
William Cheng
aab99bc530
Update Dart default value, re-enable Objc Tests (#328)
* update dart client default

* re-enable objc test

* restore dart flutter_petstore, update dart oas3 script
2018-05-06 01:45:52 +08:00
William Cheng
c791146b62
Update Dart petstore with OAS3, fix mustache format (#227)
* update dart petstore with oas3, fix mustache format

* update default value to null
2018-05-05 21:02:18 +08:00
William Cheng
f5f7546dcc
Update Dart petstore client (flutter) with OpenAPI v2 spec (#152)
* restore dart flutter samples from petstore oas2

* update dart-petstore (flutter) with OAS2
2018-04-25 14:53:42 +08:00