156 Commits

Author SHA1 Message Date
Januson
c49d8fda8e
[M][REQ][JAVA]: Add option to generate arrays with "uniqueItems" true as Sets rather than Lists (#5466)
* [REQ][JAVA]: Add option to generate arrays with "uniqueItems" true as Sets rather than Lists
 - Update Java code generation to use sets instead of lists when uniqueItems is set to true
 - Add import resolution for sets
 - Add tests and fix broke tests

resolve #5254

* Update Javascript, Perl, Python and Ruby to preserve current functionality.

* Switch set implementation to LinkedHashSet

* Fix missing import for uniqueItems used on param.

* Fix missing import and return type for responses with uniqueItems

* Fix default values for array of enum

* Update generated samples

* fix merge issue

* Update generated samples

Co-authored-by: William Cheng <wing328hk@gmail.com>
2020-05-21 13:27:57 +08:00
William Cheng
26830bf3bc
Mark swift4 generator as deprecated (#6311)
* mark swift4 generator as deprecated

* add new files
2020-05-15 20:50:45 +08:00
William Cheng
deec5da8a7
[Java][jersey2] replace jersey2 with jersey2-experimental (#6251)
* replace jersey2 with jersey2-experimental

* better handling of oauth

* add jersey2 java8 samples

* add dependency to test pom

* fix test, update doc
2020-05-12 18:27:33 +08:00
DK99
5693cb9863
[c-sharp] generator added CancellationToken to async api calls (#6243)
* csharp generator CancellationToken added to async methods

* update samples
2020-05-10 23:55:48 -04:00
William Cheng
1d606499ee Merge remote-tracking branch 'origin/5.0.x' 2020-05-06 22:51:05 +08:00
William Cheng
9afa154a5e
[aspnetcore] test petstore samples in drone.io (#6148)
* test aspnetcore 3.0/3.1 in drone.io

* switch images

* trigger build failure

* Revert "trigger build failure"

This reverts commit f5c2c1578db1a0e7b90a668f095e1d6eb1766fca.
2020-05-04 15:09:28 +08:00
Ukonn Ra
f4fa00fefa
Add async native Java Client (#4721)
* Add async native Java Client

* UPDATE: Reformat the samples

* test java native async in drone.io

* update test count

Co-authored-by: William Cheng <wing328hk@gmail.com>
2020-05-03 16:06:18 +08:00
William Cheng
ec0db2f1ee
Test java 11 native client in drone.ci (#6144)
* test java 11 native clientin drone.ci

* trigger build failure

* Revert "trigger build failure"

This reverts commit e52ad39ec1c6508864fd7c3c8513e56a2eef6539.
2020-05-03 14:46:17 +08:00
William Cheng
faf6f197be Merge remote-tracking branch 'origin/master' into 5.0-sync-master 2020-04-17 15:51:00 +08:00
William Cheng
aca8089bdd
update bitwise config (#5904) 2020-04-13 16:57:44 +08:00
William Cheng
6c153bd079
[C#] dependency upgrade (#5870)
* Updating packages version (#5313)

* Add support to RestSharp version 106.10.1

Restsharp 106.10.1 needs the Content Lenght as a parameter to AddFile method

* Updating RestSharp Version

Updating RestSharp Version

* Update netcore_project.mustache

* Update netcore_testproject.mustache

* Update Project.mustache

* Updating packages version

Updating packages version

* Updating packages version

Updating packages version

* Updating packages version

Updating packages version

* Updating packages version

Updating packages version

* Updating packages version

Updating packages version

* Updating packages version

Updating packages version

* Execute task async obsolete

Use ExecuteAsync instead

* update csharp samples

Co-authored-by: William Cheng <wing328hk@gmail.com>

* [csharp] Library upgrade fix (#5848)

* On .net45 framework, Restsharp version is updated to 106.10.1 Otherwise, it stays on version 105.1.0

* Added additionalProperties for library versions and target frameworks

* Removed unused properties

* Added an additional property to test for a specific version of RestSharp

* Updated csharp samples

* Fixed nuspec.mustache to use library specific additional properties

* Updated csharp samples

* Updating CI/samples.ci csharp petstore test project file.

* Updated csharp.md

Co-authored-by: Olivier Leonard <oleonard@ankama.com>

* [csharp-client] Restored tests on csharp samples (#5879)

* Restored tests on csharp samples

* Restored a reference to the file used to test file uploads

Co-authored-by: Olivier Leonard <oleonard@ankama.com>

* update samples

Co-authored-by: Igor Quirino <iquirino91@gmail.com>
Co-authored-by: Bouillie <34162532+Bouillie@users.noreply.github.com>
Co-authored-by: Olivier Leonard <oleonard@ankama.com>
2020-04-10 15:08:34 +08:00
Sebastien Rosset
527d5e4248
[Java] Update version of maven-surefire-plugin (#5509)
* use more recent version of maven-surefire-plugin

* use more recent version of maven-surefire-plugin

* higher debug level for troubleshooting ci issue

* temporarily increase debug log to help troubleshoot

* Use local instance of pet store service for unit test purpose

* Add more logging to troubleshoot unit test failures

* Add more logging to troubleshoot unit test failures

* Add more logging to troubleshoot unit test failures

* Add more logging to troubleshoot unit test failures

* Add more logging to troubleshoot unit test failures

* use random ID for Java unit test instead of fixed id

* add code comments and specify URL for java unit test

* reenable quiet argument

* fix java unit test issues

* fix java unit test issues

* Revert "fix java unit test issues"

This reverts commit e8508416ff0f2aeb568e3f916b013dc967390f74.

* fix java unit test issues
2020-03-26 16:47:51 +08:00
Sebastien Rosset
5e6a261d12
[go-experimental] Do not generate HTTP signature unit test for every generated SDK (#5588)
* Do not generate HTTP signature unit test for every generated SDK

* Add golang 1.14 to CI environment

* fix unit test issues

* remove script commands that were commented out

* add support for ed25519 private keys
2020-03-14 19:34:58 -04:00
William Cheng
68a291e380
Test Dart petstore client in CircleCI (#5544)
* test dart2 in circle ci (jdk7)

* fix tests

* update package

* fix dart installation
2020-03-07 00:20:44 +08:00
William Cheng
100b01844a Merge remote-tracking branch 'origin/master' into 5.0.x 2020-02-04 15:31:10 +08:00
Tatsuro Shibamura
a8435d153e
[csharp-netcore] Remove unnecessary legacy project definitions (#5108)
* Remove unnecessary csproj definitions

* Removed deprecated files generation

* Fixed code generator compile error

* Update sample code

* Update sample projects

* Revert "Removed deprecated files generation"

This reverts commit c6841c2b54fac74d31a1cf59ea73d50c430609ba.

* Revert "Fixed code generator compile error"

This reverts commit cc0bd070e75d9fbc9620045105631fef8ca6fc1b.

* Regenerate missing project.json file
2020-02-02 00:08:09 +08:00
Jim Schubert
1ac0f141a6
[feature] Default CI log level for slf4j-simple to error to prevent noise (#5118)
* [feature] Log "debounce" filter to remove spam.

* [log] slf4j-simple should be optional

This also sets the default log level to ERROR during CI builds for many
mvn invocations. This should reduce noise in the logs.

* [log] Rely only on mvn loglevel=error for now

* [cli] Clean up unused dependency

* [log] Change level to error/warn in more CI
2020-01-29 16:28:42 +08:00
Tatsuro Shibamura
305b7279ee [csharp-netcore] Update RestSharp and improve async methods (#5066)
* Update RestSharp and improve async methods

* Fixed missing type parameter

* Update sample code

* Update README

* Update RestSharp version for CI

* Fixed sample test projects
2020-01-25 19:07:50 -05:00
William Cheng
82e2448bf2 Merge remote-tracking branch 'origin/4.3.x' into 5.0.x 2020-01-20 15:46:13 +08:00
Erik Timmers
b62fc1c031 Elm refactoring (#4891)
* [elm] Remove support for Elm 0.18

* [elm] Drop `Main.elm`

* [elm] Put all models in a single file

* [elm] Put generated code in `Api` package

* [elm] Introduce Request type for operations

* [elm] Generate list of enum variants

* [elm] Make default Time module

* [elm] Small improvements & fixes

* [elm] Improve support for allOf

* All of types are now nested;
* Adding a discriminator creates a custom type wrapping all variants
  and a 'catch-all' fallback variant.

* [elm] Add support for recursive types

* [elm] Add catch-all type for allOf

* [elm] Drop support for post-processing of files

* [elm] Only import required packages

* [elm] Handle reserved and unsafe words

* [elm] Minor improvements

* [elm] Add support for integer enums

* [elm] Remove additional slash in path

* [elm] Add link to docs

* [elm] Update CI test file & scripts
2020-01-10 17:12:33 +08:00
Bruno Coelho
5cc5fbe76a New generator swift5 (#4086)
* [swift5] introduce new generator

* [swift5] add Swift Package Manager integration and update dependencies

* [swift5] run petstore

* [swift] update Swift 5 generator with Swift 4 changes

* [swift] update Swift 5 generator with Swift 4 changes

* [swift] make CodableHelper more customizable

* [swift] update pet projects

* [swift] update pet projects

* [swift] add nullable support

* [swift] make enums conform to CaseIterable

* [swift] date formatter add support for ISO8601 with and without milliseconds

* [swift] add urlsession support

* [swift] remove unecessary sample unwrapRequired

* [swift] rename JSONEncodableEncoding.swift to JSONDataEncoding.swift

* [swift] use result in generator internals

* [swift] cocoapods remove deprecated docset_url and add watchos deployment target

* [swift] Add ability to pass in a dedicated queue for processing network response (Fix for 230)

* [swift] update pet projects

* [swift] update docs

* [swift] add support for combine

* [swift] update docs

* [swift] update windows bat scripts

* [swift] update windows bat scripts

* [swift] update swift pet project tests

* [swift] update depencies

* [swift] make urlsession the default http client

* [swift] add urlsession sample project

* [swift] add urlsession sample project

* [swift] update docs

* [swift] improve combine unit tests

* [swift] update docs
2020-01-02 20:21:45 +08:00
sullis
178a3e24bd upgrade to JUnit 4.13 (#4899) 2020-01-02 13:20:29 +08:00
William Cheng
adbed055dd
CI improvements (#4791)
* run all script in circleci

* test kotlin clients

* add new files

* undo chanages to circleci script

* update samples

* update bitwise config

* fix typo
2019-12-15 18:39:04 +08:00
William Cheng
2f01053680
Add bitrise badge to readme (#4578)
* add bitrise badge to readme

* move bitrise.yml to CI
2019-11-23 11:41:29 +08:00
William Cheng
de69eac316
Use non-batch mode in ensure-up-to-date (#4573)
* use non batch mode in ensure-up-to-date

* update samples
2019-11-22 11:43:52 +08:00
William Cheng
8ca1788a75
Fix drone.io yaml file (#4528)
* fix yaml file

* remove version

* pin version
2019-11-18 23:23:23 +08:00
William Cheng
40d7b58666
[Swift] Enhancements to iOS tests (#4521)
* update .travis.yml.ios

* test ios travis

* skip javadoc error

* use xcode 10.3

* remove --no-ri

* remove --no-rdoc

* use ios 12.4

* update to ios 13.1
2019-11-18 13:30:35 +08:00
Justin Black
d175673077 [OCAML] Fixes cloud.drone.io ocaml-test (#4501)
* Fixes ocaml-test

* Ocaml readme update
2019-11-17 09:23:15 +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
Jim Schubert
4a91e62fb7 [ci] Setting ensure-up-to-date to use batch option in CircleCI (#4445)
* [build] Enable --batch option in ensure-up-to-date

* [samples] Regenerate

* [ci] Use --batch in CircleCI script
2019-11-13 18:06:14 +08:00
William Cheng
55737c236c
skip the test as async call may have finished (#4377) 2019-11-06 10:35:59 +08:00
William Cheng
61d7d22b24
smaller tests, better code format (#4355) 2019-11-03 23:18:09 +08:00
William Cheng
5dcde3f855
[Go][Server] better tests (#4295)
* better test for go-api-server

* better test for go gin server

* fix go-api-server test

* fix folder path

* remove red test

* update test files

* update script with gofmt

* update windows batch files

* discard changes before running ensure-up-to-date

* add go-api-server to ensure uptodate script
2019-10-29 15:15:24 +08:00
William Cheng
7901ae2306
[Java][okhttp] Test setVerifyingSsl (#4252)
* test setVerifyingSsl

* update test file under petstore
2019-10-24 22:02:39 +08:00
atsharp
d75d089bc9 [Java] Support cookie-based security schemas in Java clients (#4155)
* Adding cookie support and cookie-based AuthKeys to Java clients

* Fix indentation

* Revert accidental change

* Updating samples

* Fixing tests and regenerating samples
2019-10-19 18:05:02 +08:00
William Cheng
3141e483ef
Fix NPE in Elm path parameter (#4116)
* fix NPE in elm path parameter

* replace paramName with baseName

* install elm format in circleci

* switch to /usr/bin/env
2019-10-10 18:20:46 +08:00
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
William Cheng
e4b39ce95e
Test Haskell client in drone.io (#3791)
* test haskell in drone.io

* fix docker image

* trigger alert

* Revert "trigger alert"

This reverts commit 9637b5c6a770649fbde6c9e98954a7ac92181e81.
2019-08-29 12:37:04 +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
Josh Giles
158cdfeb3c [typescript-fetch] fix #1998: prefix req ifaces. (#3740)
Prefix generated request interface names with API classname rather than
using namespaces, because namespaces are not well-supported by some
tooling (in particular, Babel).
2019-08-23 16:58:51 +02:00
Josh Giles
b323b0a0af [typescript-fetch] Fix #1998: namespace reqs. (#3695)
* [typescript-fetch] Fix #1998: namespace reqs.

Fix #1998 by namespacing the generated request object types used in the
typescript-fetch client codegen.

* Update petstore samples.

* Add default-false namespacing config option.

* Re-run code sample generation.

* Add maven build configurations.

* Fix sample VERSION files.

* Update typescript-fetch docs.

* Emulate with-npm-version, adding package.json.

* Add Paxos to companies using.

* Prefix namespace with basename to avoid collisions.
2019-08-22 07:59:34 +02: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
Jérémie Bresson
a4811c7850 [java-client] set collection to null when not required (#3615)
* [java][model] set collection to null when not required

* Fix tests

* Fix trailing whitespace

* generate samples

* Restore 'de.thetaphi' plugin in pom.xml
2019-08-15 22:01:19 +08:00
Marc Schlegel
0a7527b03e [java-client][okhttp-gson] fixes for interceptors in ApiClient.java (#3502)
ApiClient for Okhttp3 must not copy the interceptors when setting the HttpClient.
Enforce invariant that the HttpClient must never be null.
2019-08-01 06:39:47 +02:00
William Cheng
cbd78d7fca
Test OCaml petstore client in drone.io (#3484)
* test ocaml petstore

* undo directory rename

* run eval

* install m4

* force yes

* fix permission issue

* specify build dir

* fix dune

* give full permission

* fix steps

* rename test

* update ocaml petstore path
2019-07-29 10:16:59 +08:00
William Cheng
652b14c28f
Add drone.io CI for Java 11 test (#3472)
* add drone.yml

* use maven wrapper instead

* break the build

* Revert "break the build"

This reverts commit 69769d6cadd4c25ea5e8c5ed2bc5115ec29b0ecb.

* add drone.io badge to README

* update wording
2019-07-26 20:21:38 +08:00
Jean-François Côté
610ca28681 Fix #3349 : [typescript-fetch] Proposition to follow spec (#3351)
* Fix 3349 : Proposition to follow spec closely

* Fix #3349 : Changes suggested by code review. Add an option for the single request parameter.

* Fix #3349 : Add sample with the use of the single request parameter

* Fix #3349 : Small fix that wasn't passing the tests

* Fix #3349 : Remove cariage return that might create an error

* Fix #3349 : Add chmod to make new sh file executable and fix the CircleCI issue

* Fix #3349 : Add windows sample generation

* Fix #3349 : Rename everything because of default value change

* Fix #3349 : Indentation fix

* Fix #3349 : Add 755 to typescript-fetch-petstore-multiple-parameters.sh

* Fix #3349 : Auto generation of the documentations

* Fix #3349 : Revert back a change that was auto-generated.
2019-07-17 22:30:27 +02:00
Jérémie Bresson
3943d1cc9d [java] fix javadoc configuration (#3302)
* [java] fix javadoc configuration

* [java-pkmst-microservice] fix generated javadoc
2019-07-08 21:25:47 +08:00
William Cheng
9f1b9386f1
[CI] Test maven plugin in Travis, move jobs from Shippable to Circle CI (#3087)
* test plugin in travis, move jobs to circle CI

* Revert "[maven-plugin] fix strictSpec parameter (#3071)"

This reverts commit 8c9a1512ae824d35866375eb69ddd085309d0251.

* Revert "Revert "[maven-plugin] fix strictSpec parameter (#3071)""

This reverts commit c3e5723c5a365ffb8a6cedfcc4a7a278543e63a3.

* test with jdk8
2019-06-05 00:07:15 +08:00
William Cheng
e06a408141
Update C# client dependency (#2678)
* update csharp dependency

* fix appveyor test

* skip build error

* update nunit version

* fix nunit path

* update petstore test

* various fix
2019-06-03 21:17:17 +08:00