Commit Graph

4125 Commits

Author SHA1 Message Date
Kaito Watanabe
c30fb3ff0b Remove examples comment from swift3 and swift4 client (#61) 2018-05-16 17:58:36 +08:00
Jérémie Bresson
673f2bc469
Add CodegenProperty.nameInSnakeCase (#42) 2018-05-15 13:17:04 +02:00
William Cheng
7d9fb9f51e
Add CI test for Elm in travis (#40)
* test elm in travis

* install elm
2018-05-15 09:58:37 +08:00
William Cheng
67ebe17dd6
Fix isPrimitiveType flag for array of form parameters (#38)
* fix isprimitivetype for array of form parameters

* setup snapshot deployment
2018-05-14 23:28:03 +08:00
Jérémie Bresson
bf7e4e7df7 Java gson: add @SerializedName value as constant (#22)
* Java gson: add @SerializedName value as constant

Fix #21

* Run bin/java-petstore-all.sh
2018-05-13 19:58:46 +08:00
William Cheng
d80e295852
Fix JS test using baseName in default value (#5)
* fix js test using baseName in default value

* re-enable JS test
2018-05-13 10:19:16 +08:00
William Cheng
1d889da4e3
Various fixes (#1)
* fix pistache c++ server in windows

* skip perl test

* comment out go tests

* Fix go test, manually fix go client

* fix rails batch file

* fix tab in java file

* install rust

* fix swift2-deprecated in windows batch file

* fix rust installation

* comment out js test

* update swift windows batch files

* update tizen batch script

* comment out ktor test
2018-05-13 01:31:13 +08:00
William Cheng
2ed3d8cc86
Update python test (#426)
* update python test folders

* update python template

* update python samples

* fix python comment too long

* update ruby test case
2018-05-12 09:54:19 +08:00
William Cheng
4b7a583b33
Update Swift default value (#407)
* update swift4 default

* update swift3 default value

* update swift default value
2018-05-12 00:15:24 +08:00
William Cheng
0ad66f7fe5
fix ruby test case, update gemfile (#425) 2018-05-11 20:51:35 +08:00
William Cheng
b3f3eabc72
remove php old files, fix php folder in pom (#423) 2018-05-11 20:51:24 +08:00
William Cheng
70733deab9
remove unused js files (#421) 2018-05-11 17:28:24 +08:00
William Cheng
e5be838fa8
Update PHP client default value (#417)
* update php default value

* update php samples with oas3
2018-05-11 15:28:09 +08:00
William Cheng
0d913e6801
add step to restore Org.OpenAPITools.Test.csproj (#420) 2018-05-11 14:34:03 +08:00
William Cheng
a4f76b889e
update R default value, clean up old R files, add window batch for (#415)
openapi3
2018-05-11 11:25:50 +08:00
Akihito Nakano
d958480fea Reaname R default package name (#411)
* Rename package name

* Update samples

bin/openapi3/r-petstore.sh
2018-05-10 13:50:42 +08:00
Jérémie Bresson
a07ab606dc Small fixes in samples (#410) 2018-05-10 13:45:12 +08:00
William Cheng
27c372ff56
Update akka scala default value (#401)
* update akka scala default value

* fix akka-scala test option
2018-05-10 10:55:44 +08:00
William Cheng
f615d823f9
update ts node dependencies (#405) 2018-05-09 22:53:05 +08:00
William Cheng
286f2caa22
update scala default value (#402) 2018-05-09 21:48:32 +08:00
Jérémie Bresson
2ee05e12d2 Fixes in security examples (#396)
* Regenerate "samples/client/petstore-security-test/java/okhttp-gson/"

* Use correct jar

* Fix sh scripts

* Fix path: modules/swagger-codegen => modules/openapi-generator/
2018-05-09 18:13:30 +08:00
William Cheng
4852434d13
update scalaz default value (#395) 2018-05-09 17:26:42 +08:00
William Cheng
dcd26ece71
Update Scala gatling's default value (#390)
* update powershell script

* update powershell bin script (oas3)

* update html2 generator's default value

* update scala gatling default value
2018-05-09 16:34:54 +08:00
Jérémie Bresson
150d414b7e
Regenerate java clients (#385) 2018-05-09 07:45:53 +02:00
Akihito Nakano
872dd546f4 Update php related samples (#375)
* Update php client (OAS3)

bin/openapi3/php-petstore.sh

* Update symfony server (OAS2)

bin/php-symfony-petstore.sh

* Lumen: remove 'swagger'

* Update lumen server (OAS2)

* Update php client (security): deleted 'SwaggerClient-php' folder

* Update TEST_DIR

* Update php client tests (OAS3)

bin/openapi3/php-petstore.sh

* Update php client (OAS2)

bin/php-petstore.sh

* Fix

* Fix lumen -> php-lumen

* Update lumen server (security)

* Delete moved files

currently it will generate into under 'lib' folder.

* Fix slim -> php-slim

* Update slim server (security)

bin/security/slim-petstore-server.sh

* Fix

* Update dot files
2018-05-09 10:34:19 +08:00
Jérémie Bresson
d35bf1a388 Change default package name value for kotlin client (#382)
* Move pom.xml to sample.ci

* Regenerate 'kotlin-threetenbp' example

* Add build to gitignore

* Change default value for Kotlin

* Regenerate kotlin-string client

* Regenerate kotlin-threetenbp client

* Regenerate 'samples/client/petstore/kotlin'
2018-05-09 10:32:37 +08:00
William Cheng
e2d6f7c88f
update erlang client, server default value (#378) 2018-05-09 10:31:42 +08:00
Jon Schoning
68780afe9d [haskell-http-client] update samples (OAS3) (#381) 2018-05-09 10:31:28 +08:00
William Cheng
4fd68f0f24
update powershell default value (#380) 2018-05-09 10:31:05 +08:00
William Cheng
b24df8882f
update lua default value (#379) 2018-05-09 10:30:49 +08:00
William Cheng
ded082202e
update clojure default value (#377) 2018-05-09 10:30:35 +08:00
William Cheng
a9fa4cd0db
Update default value for C++ related generator (#373)
* udpate default value for cpp, remove unused imports

* update cpprest template

* update tizen default value

* update cpp restbed default value

* update qt5cpp samples

* update pistache samples

* regenerate restbed ignore file
2018-05-08 22:10:40 +08:00
William Cheng
13f084e7b0
Fix dataTypeWithEnum for array of form parameters (#354)
* fix datatypewithenum for array of form parameters

* add test cases to cover dataTypeWithEnum, enumName in Ruby
2018-05-08 20:55:49 +08:00
William Cheng
0d20f75afc
Update default value, fix example value (#370)
* fix python flask NPE with oas3

* update perl default value, fix example value

* update android sample, fix example value

* restore x-swagger-router-controller for nodejs server generator

* update default value for bash client, fix example value, invalid tag

* update default value for objc

* update objc pestore core data
2018-05-08 19:51:15 +08:00
William Cheng
c0a2673b26
update eiffel codegen default (#371) 2018-05-08 17:32:50 +08:00
Jérémie Bresson
e1c9a924c0 Generate kotlin 'client-string' sample (#369)
* Move pom to 'samples.ci'

* Regenerate 'samples/client/petstore/kotlin-string'
2018-05-08 16:45:50 +08:00
Jérémie Bresson
58c45b9b75 Regenerate 'samples/client/petstore-security-test/php/' (#368)
Using 'bin/security/php-petstore.sh'
2018-05-08 16:45:09 +08:00
Jérémie Bresson
059a3efe46 Regenerate samples (#367) 2018-05-08 16:44:51 +08:00
William Cheng
bbd2afdd0a
Update Flash default value (#366)
* update flash default value, clear samples

* add flash samples
2018-05-08 12:57:38 +08:00
William Cheng
0dbb6dcaa6
Update Go generators' default value (#362)
* udpate go client default value

* update go generators' default value
2018-05-08 10:16:38 +08:00
William Cheng
14c241fbce
Update python default value (#360)
* update pythong default value

* fix example, update python sample

* update python petstore sample (asyncio, tornado)
2018-05-08 01:23:49 +08:00
Akihito Nakano
376d9af9c0 Rename default packages for php client (#315)
* Rename default packages for php client

* Generate php client (OAS3)

* Rename namespace for tests

* Delete unnecessary 'use'

* Rename method/variable

* Update php client (OAS3)

* Generate php client (OAS2)

* Rename namespace for tests

* Delete unused files

* Fix tests
2018-05-07 23:04:06 +08:00
William Cheng
a9baaa81e3
update eiffel with petstore oas2 (#268) 2018-05-07 18:32:03 +08:00
Jérémie Bresson
a22afb3d81
Rename default packages for android (#349) 2018-05-07 09:54:47 +02:00
Jérémie Bresson
b947970f99
Rename default packages for java (#341) 2018-05-07 08:43:57 +02:00
William Cheng
e45b3784f1
Fix NPE with Haskell client generator with OAS3 spec (#334)
* fix NPE with haskell client oas3, better type check

* better unknown type check
2018-05-06 23:56:59 +08:00
William Cheng
b1eac05b2b
Fix form datatype (array of string) (#339)
* fix data type for array of form parameters

* add test case to cover the form parameter issue
2018-05-06 22:17:47 +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
3c666a6d44
Fix array of form parameters (#324)
* fix array of form parameters

* fix description for array of form parameters

* fix map of enum value
2018-05-06 00:39:38 +08:00
Christophe Bornet
90ac9d030c
Merge pull request #262 from cbornet/reactive
[Spring] Add reactive option for Spring Boot (webflux)
2018-05-05 18:01:46 +02:00
cbornet
8405b18563 Add spring cloud sample tests back 2018-05-05 17:26:21 +02:00
cbornet
1619486578 Add reactive option for Spring Boot (webflux) 2018-05-05 17:26:08 +02: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
5f2bc28779
update default value for elixir (#319) 2018-05-05 01:37:48 +08:00
William Cheng
e2251084f2
Update the default value of Ruby client generator (#320)
* fix ruby client default value

* fix example value for ruby
2018-05-05 00:10:34 +08:00
William Cheng
0b6a59fa09
update elixir with oas3 petstore (#318) 2018-05-04 23:52:52 +08:00
William Cheng
8edf6e52ad
Update Elixir Petstore with OAS2 (#316)
* restore elixir petstore original from codegen2x

* update elixir generator to work with oas2

* minor fix to elixir generato

* minor enhancement to templates

* update elixir petstore with oas2
2018-05-04 17:43:14 +08:00
William Cheng
ea18065447
Add Elm, Rust, Groovy to Travis CI (#308)
* add elm, rust, groovy to travis ci

* update elm script comment

* comment out elm test in travis
2018-05-04 16:12:18 +08:00
William Cheng
18a40deb30
Update rust client with Petstore OAS2 (#148)
* update rust client with petstore oas2

* update rust with oas2 petstore, fix default value

* fix type mapping for file, update api_doc for rust client

* update rust client with oas3
2018-05-04 01:38:40 +08:00
William Cheng
15d4d2f0d4
remove duplicated entries in C# csproj (#302) 2018-05-03 16:31:26 +08:00
William Cheng
95e04f91db
Add Elm script with Petstore OAS3 (#293)
* add elm script with petstore oas3

* change default value for elm generator

* update default value for elm templates

* fix typo
2018-05-02 23:04:16 +08:00
William Cheng
50837b2e83
update elm petstore with oas2 (#291) 2018-05-02 20:27:06 +08:00
William Cheng
ff3b954f10
update c# 2.0 samples (#285) 2018-05-02 14:30:25 +08:00
William Cheng
30b829c611
Update Swift4 client with OAS2 (#270)
* update swift4 client with oas2

* map binary as file in swift4
2018-05-02 14:30:11 +08:00
William Cheng
0c981b7c2f
Update C# default value (#283)
* update csharp default value

* update csharp 35 samples

* update csharp 40 client

* update c# net standard client

* update C# net core client

* update csharp propertychanged client
2018-05-02 00:48:55 +08:00
William Cheng
4c656bb1d9
Update C# with Petstore OAS3 (#281)
* update c# petstore with oas3

* update c# propertychanged with petstore oas3

* update c# netstandard with oas3
2018-05-01 14:02:55 +08:00
William Cheng
0b3ec6b1f8
fix NPE with cpp qt5, add logic to avoid NPE with composed schema (#267) 2018-05-01 12:05:57 +08:00
William Cheng
acb63fd5e8
Fix go readme, remove resty install (#280)
* fix go readme, remove resty install

* fix default to null in go petstore doc
2018-05-01 12:02:55 +08:00
William Cheng
9cb2f8472f
remove incorrect max, min in allowableValues (#269) 2018-04-30 23:48:59 +08:00
Akihito Nakano
be19724849 Fix default value (#260)
* Fix missing default value of form param

* Update php sample with OAS2

* Update php sample with OAS3

* Delete quotes as default value may have integer

* Update php samples with OAS2

* use toDefaultValue() in order to apply the decoration rules of generator

* Update php samples with OAS2

* Tweak: add quotes only if example is null

* Update php sample with OAS2

* Update php sample with OAS3
2018-04-30 17:18:58 +08:00
Akihito Nakano
aa5719e008 Fix missing default value (#257)
* Fix missing default value of form param

* Update php sample with OAS2

* Update php sample with OAS3
2018-04-30 16:24:07 +08:00
William Cheng
799b033c22
update go readme, update pom go dependencies (#274) 2018-04-30 13:04:00 +08:00
William Cheng
8730f910b2
Merge pull request #261 from wing328/fix_go
Various fix for Go petstore client
2018-04-30 09:49:49 +08:00
antihax
622a75b2ce Fix data type shadowing 2018-04-29 12:16:17 -07:00
William Cheng
1d7da2ecf4
fix apex npe, better example value (#266) 2018-04-29 22:15:04 +08:00
Jérémie Bresson
1587d202b0 Generate apex (#224) 2018-04-29 20:38:18 +08:00
William Cheng
c60010c965
Update default value for Perl, Ruby, ROR generators (#265)
* rename perl genreator default

* update ruby sinatra default

* rename ror default value
2018-04-29 20:37:12 +08:00
wing328
d8165b0cfb update go test files 2018-04-29 02:14:12 +08:00
wing328
1e999f289d various fix for go petstore 2018-04-29 02:03:21 +08:00
wing328
1577e5d89f restore go client from codgen2x 2018-04-28 22:04:47 +08:00
William Cheng
5114cd96b0
Update TypeScript Petstore samples with OAS3 (#253)
* add scripts for ts oas3 petstore

* remove json files

* update ts jquery with oas3 petstore

* update ts inversify, fix file mapping

* update ts fetch wtih oas3 (no diff), fix script
2018-04-28 12:11:02 +08:00
Akihito Nakano
7b6e17e02d Fix missing models (#250)
* ArraySchema should not be included in aliases

* Update php sample (OAS2)
2018-04-28 11:37:45 +08:00
William Cheng
78c865e268
update ts angular2 petstore oas2 (#249) 2018-04-27 22:12:30 +08:00
William Cheng
509fdd892b
Update TypeScript jQuery, Aurelia, Inversify with Petstore OAS2 (#248)
* update ts inversify with petstore oas2

* update typescript-aurelia petstore with oas2

* update ts jquery with oas2
2018-04-27 22:12:13 +08:00
William Cheng
6a98840199
update c# netstandard petstore (oas2) (#247) 2018-04-27 18:04:47 +08:00
William Cheng
0373b74a75
update ts angularjs petstore (oas2), fix model prefix (#245) 2018-04-27 17:09:34 +08:00
William Cheng
bec559a6e8
Update TypeScript Fetch client with Petstore OAS2 (#244)
* update ts fetch (default) with oas2

* update ts fetech npm with petstore oas2

* update ts fetch interface (petstore oas2)

* update ts fetch es6 (petstore oas2)
2018-04-27 15:37:41 +08:00
William Cheng
4ea2e6dc78
update C# property change client (oas2) (#242) 2018-04-27 11:55:37 +08:00
William Cheng
6f4af337d9
Update TS Angular v4, v4.3 with Petstore OAS2 (#241)
* update ts angular 4 from codegen2x

* update ts angular v4 with petstore oas2

* restore ts agnular 4.3 from codegen2x

* update ts angular 4.3 with petstore oas2
2018-04-27 00:24:40 +08:00
William Cheng
5ef5e540fd
Update C# API client with Petstore OAS2 (#240)
* update c# petstore with oas2

* add csharp tests
2018-04-27 00:03:30 +08:00
William Cheng
8640c172c9
update ts node with oas2 (#239) 2018-04-26 22:39:01 +08:00
William Cheng
049eef9c53
Test erlang client, server petstore (#235)
* test erlang client, server petstore

* rename tests, replace tab

* install rebar3 in shippable ci
2018-04-26 18:12:00 +08:00
William Cheng
bcc7b788e0
fix erlang client compilation error (#228) 2018-04-26 13:44:05 +08:00
William Cheng
e1a0355398
Update PHP samples with OAS2 before enabling CI test (#230)
* update php samples with oas2 before enabling ci test

* deleted unused php files
2018-04-26 13:17:16 +08:00
William Cheng
e2d4f5b5ca
update ruby with oas2 before ci test (#231) 2018-04-26 13:15:04 +08:00
William Cheng
fe15f46906
fix toDefaultValueWithParam in JS (#232) 2018-04-26 13:14:46 +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
Jérémie Bresson
25ccef818d
Rename default package for spring generator (#221) 2018-04-24 18:20:44 +02:00
antihax
5d8362d859 Update go client, fix double body read (#211) 2018-04-24 22:39:55 +08:00
Jérémie Bresson
949ef4453a
Generate java spring OAS2 (#216) 2018-04-24 16:26:52 +02:00
Jérémie Bresson
e0b0248c38
Rename default package in java clients (#218) 2018-04-24 16:26:20 +02:00
Jérémie Bresson
c8c316e41e
Update java client samples OAS2 (#140)
* Update java client examples
* Rename artifactId in json config files
* Add imports in api.mustache for play24 and play25
2018-04-24 09:51:50 +02:00
Jérémie Bresson
d5d8c356b7
Rename default packages for jaxrs generators (#209) 2018-04-24 06:26:42 +02:00
William Cheng
f353f60b89
Update Perl client samples (OAS2, OAS3) with various fixes (#204)
* update perl client with various fixes

* update perl petstore with oas3, tests passed
2018-04-23 17:49:48 +08:00
William Cheng
b908b734dd
Update Groovy default value, fix import error when doing "gradle test" (#203)
* update groovy default value, fix import error when doing gradle test

* remove empty lines
2018-04-23 17:31:14 +08:00
Jon Schoning
db02cc2ac9 [haskell-http-client] resolve oas 2.0 regressions (#198)
* [haskell-http-client] fix codegen issues

* ensure datatypeWithEnum is set on codegenParameter when is enum

* [haskell-http-client] fix isAlias + arrayModelType missing "datatype"

* [haskell-http-client] param.isListContainer is sometimes false for list types

* [haskell-http-client] gen MimeNoContent instances automatically

* [haskell-http-client] fix example-app and integration tests

* [haskell-http-client] update docs
2018-04-23 16:10:50 +08:00
William Cheng
2833319b81
Update Groovy petstore client via OAS2 (#133)
* restore groovy client from codegen 2x

* update groovy client with oas2

* reformat groovy templates to remove empty lines
2018-04-23 14:12:37 +08:00
Jérémie Bresson
7ecd5f3566
Rename "swagger" to "openapi" (#191)
* Rename ".swagger-codegen-ignore" to ".openapi-generator-ignore"
* Rename setGenerateSwaggerMetadata(Boolean) to setGenerateMetadata(Boolean)
* Rename Metadata Folder to .openapi-generator
2018-04-22 21:28:17 +02:00
William Cheng
a7da9039a4
Update Scala petstore with OAS2, OAS3 (#162)
* update pestore with oas2

* update scala petstore oas3 (no diff)
2018-04-22 22:00:49 +08:00
Jérémie Bresson
b109bf7ddc
Update "jaxrs-cxf-client" sample OAS2, OAS3 (#172) 2018-04-22 10:41:16 +02:00
William Cheng
6959ef9939
Update Clojure Petstore with OpenAPI spec v3 (#181)
* update clojure test

* update with clojure oas3
2018-04-22 16:32:51 +08:00
William Cheng
35f0cc221d
update erlang client with oas3 (#182) 2018-04-22 10:25:30 +08:00
William Cheng
f79f23865b
update clojure petstore with OAS2 (#117) 2018-04-21 23:06:07 +08:00
Jérémie Bresson
2e50780e1d
Remove "swagger-" prefix from artifactId (#170)
* Remove "swagger-" prefix in the samples artifactId
* Rename some artifactIds to make them unique
2018-04-21 12:31:21 +02:00
Akihito Nakano
1f0bed2a0c Update php client with OAS2 (#149)
* Update php client with petstore OpenAPI v2 spec

bin/php-petstore.sh

* Change order of arguments according to the changes that auto-generated codes

* Fix 'FakeHttpClient not found' error

It has occured when run the test case separately like below.
"vendor/bin/phpunit tests/RequestTest.php"

* Update assertion according to a change on spec

* Update assertion
2018-04-21 18:13:45 +08:00
William Cheng
0736939c2a
Remove x-codegen-hasMore extensions (#169)
* remove x-codegen-hasMoreRequired from ruby template

* remove x-codegen-hasMore from html2 templates

* remove commented code
2018-04-21 12:49:27 +08:00
Tomasz Prus
d74d2ba031 fix: python clients (#136)
* fix: python client

* fix: regenerate petstore samples for python-asyncio/tornado

* fix: python-asyncio tests

* fix: python-tornado tests

* chore: update python samples

* fix: enable tests for python-tornado

* fix: discriminator property

* fix: file type

* python: regenerate samples

* fix: define file as generic type
2018-04-21 11:54:40 +08:00
William Cheng
fdeca629bb
Update JS petstore with OAS2, fix example values (#168)
* restore js petstore from codegen 2x

* update js petstore with oas2, fix example values

* remove comment code in js generator
2018-04-21 11:49:02 +08:00
William Cheng
fa346ce004
Update Javascript closure angular Petstore samples with OAS2, OAS3 (#164)
* update js closure angular with oas2

* update js closure angular with oas3 (no diff)
2018-04-20 19:01:05 +08:00
William Cheng
3e0f959215
Update Scalaz petstore with OAS2, OAS3 (#163)
* update scalaz petstore with oas2

* update scalaz oas3 petstore (no diff)
2018-04-20 19:00:52 +08:00
William Cheng
e4b1613d1e
Update akka-scala petstore with OAS3 (#161)
* update akka-scala with oas3 petstore

* update akka-scala petstore oas3, fix import model
2018-04-20 16:58:27 +08:00
William Cheng
03490e9230 fix java binary mapping (#158) 2018-04-20 08:20:13 +02:00
William Cheng
86f67c6665
Update Erlang client petstore (OAS2) (#147)
* update erlang client, add method to customize array model parameter name

* remvoe debug log
2018-04-19 21:22:24 +08:00
William Cheng
c20352caab
Update Android Petstore (httpclient, volley) with OAS2, OAS3 (#145)
* restore android samples from codegen 2x

* update android volley with oas2

* update android volley oas3

* update android http client petstore (oas2)

* update android httpclient petstore (oas3)
2018-04-19 16:13:35 +08:00
William Cheng
80d10e2cba
Update C# dotnet2 client with OAS2, OAS3 petstore (#143)
* update csharp2 from codegen 2x

* update csharp dotnet 2 client (oas2)

* update csharp dotnet2 with pestore oas3
2018-04-19 15:05:47 +08:00
William Cheng
9fdcb3681b
Update ObjC petstore and test cases (#139)
* restore objc samples from codegen 2x

* update objc petstore test

* update objc with oas3 petstore
2018-04-19 12:08:00 +08:00
William Cheng
0feef2b57e
Update akka-scala petstore with OAS2, fix description in responder header (#129)
* update akka-scala sample by codegen 2x

* fix description in response headers, update akka scala generator
2018-04-19 09:16:28 +08:00
William Cheng
7c734445b2
fix file parameter in header file (cpprest) (#130) 2018-04-18 22:29:53 +08:00
William Cheng
52af29f46d
Update CPPREST client with OAS2 (#128)
* restore cpprest from codegen 2x

* fix cpprest by modifying the template

* better naming for array of models

* updtae cpprest samples with oas2
2018-04-18 18:13:35 +08:00
William Cheng
a30e25e50d
Update ObjC petstore with oas2, fix default value for parameter (#115)
* update objc petstore with oas2, fix default value for parameter

* update objc petstore with oas3 spec

* update objc core data oas2

* update objc petstore with oas3
2018-04-18 01:47:32 +08:00
William Cheng
dc0cbd23b6
update tizen samples with oas3 petstore (#114) 2018-04-17 22:53:09 +08:00
William Cheng
4845eaa81d
Update bash Petstore OAS2 (#112)
* update bash petstore oas2, fix default parameter, map file to binary

* update bash petstore with oas3 script
2018-04-17 22:39:26 +08:00
Jeremie Bresson
53597764c3 Add OpenAPI spec 3.0 support (beta)
Co-authored-by: Akihito Nakano <sora.akatsuki@gmail.com>
Co-authored-by: Jeremie Bresson <dev@jmini.fr>
Co-authored-by: Jim Schubert <james.schubert@gmail.com>
Co-authored-by: Martin Delille <martin@phonations.com>
Co-authored-by: Tomasz Prus <tomasz.prus@gmail.com>
Co-authored-by: William Cheng <wing328hk@gmail.com>
2018-04-17 09:19:10 +02:00
wing328
4cfbc118e8 renaming for openapi-generator 2018-03-13 14:41:23 +08:00
Martin Delille
1bb1e44d18 [qt5cpp] Remove qt5 pro.user file (#7813) 2018-03-12 23:17:39 +08:00
Martin Delille
9bd94b4dbb [qt] Fix warning message (#7815)
* [qt] fix warning message

* remove unused model.mustache file
2018-03-12 23:00:45 +08:00
etherealjoy
1947220159 Qt5cpp plug memleaks part2 (#7792)
* Small fixes to prevent crash when empty json body is provided.

* Fix some more memory Leaks in the model-body
- Members not deleted in cleanup() method, for maps/arrays of primitive types.
- Avoid undefined behavior when updating class members with data from missing json fields
2018-03-09 00:19:45 +08:00
Simon Sprünker
f00a1ef52c [JAVA] Fix #7734: Correct consumes/produces attributes for Spring Controllers (#7760)
* fix #7734: Correct consumes/produces attributes for Spring Controllers

* fix #7734: Update petstore
2018-03-08 22:56:43 +08:00
Charles Capps
4eeb974cb6 [Java][google-api-client] Fix bug with empty POST request not sending content-type (#7787)
* Add overloaded method to take an InputStream for the request body, and fix a bug with collections

* Use fully qualified name for InputStream to avoid potential conflicts

* Add support for Input Stream choosing content type, and fix a bug

* Ensure GET requests send an empty request body!
2018-03-08 22:51:49 +08:00
Dennis Frommknecht
53eeb0c049 fix connection leak on retrofit OAuth token renewal (#7750) 2018-03-08 22:00:22 +08:00
Akihito Nakano
0adbf7e51f [PHP] Improve: update sample tests automatically (#7717)
* Improve: update sample tests automatically

* security test

* Update sample

- bin/php-petstore.sh
- bin/security/php-petstore.sh

The security test has not been updated for a while.
2018-03-08 21:56:48 +08:00
Akihito Nakano
32cf2f16f5 [PHP] Non required enum property (#7723)
* Add required enum property

* Update samples

* Add test case which reproduce the problem

refs https://github.com/swagger-api/swagger-codegen/pull/7686#issuecomment-368200011
> 2. Non-required enum property is listed as invalid when omitted

* If the property is not empty, perform validation

* Update samples

* Use is_null() according to setter implementation

refs 377247f125/modules/swagger-codegen/src/main/resources/php/model_generic.mustache (L347)

* Update samples
2018-03-08 21:54:34 +08:00
etherealjoy
12f3661d6f Qt5cpp plug memleaks (#7695)
* Small fixes to prevent crash when empty json body is provided.

* WIP: plug mem-leaks

* fixup: add the QJsonObject instance in toJsonArray instead of pointer

* fixup: simplify toJsonMap

Actually the original solution is incomplete, because "innerType" maps to a single C++ type. Have a look at Qt's builtin QJsonObject::fromVariantMap.

* Updates to antis81:patch-1 after tests.

* update to remove string allocation

* Updates due to address of members being passed

* Update PetStore Examples

* Small updates for Header includes
2018-03-07 20:54:40 +08:00
wing328
724a8fb05d update java petstore samples (jersey1) 2018-03-05 19:34:34 +08:00
Paul Vogel
3bcf0ff764 [PHP] Add path & file separator (/) to return the correct path when deserializing a file (#7671)
* Add path & file separator (/) to return the correct path

Add the separator between the tempFolderPath and the sanitized filename so that the path to the file is correct.

(Fixes #7670)

* Remove separator from generated file

* Add separator

Add the separator between the tempFolderPath and the sanitized filename so that the path to the file is correct.

(Fixes #7670)

* Update sample code

Via ./bin/php-petstore.sh
2018-03-05 10:32:47 +08:00
Andy Kipp
8e0a0ebd62 Fix python / tornado body handling (#7738)
* Handle empty body

* Update petstore
2018-02-28 16:08:17 +08:00
Alberto Sartori
56a0268e39 [elm] missing '->' in Main elm template (#7728) 2018-02-26 23:11:21 +08:00
wing328
e5001a0c8d java update petstore clients 2018-02-22 21:51:14 +08:00
Adrien CABARBAYE
d4543a99e3 [Java][retrofit2] Fix for Issue #7446 (#7659)
* [Java][retrofit2]  Fix for issue #7446:  file upload sets filename as baseName instead of a dynamic filename. The solution is to use  okhttp3.MultipartBody.Part instead of RequestBody in formParams template.

* Changes corresponding to review comments

* Petstore Samples

* Fixed tests
2018-02-22 21:45:19 +08:00
wing328
b4827beba4 update python petstore samples 2018-02-22 20:59:45 +08:00
wing328
a59c325cb7 update dart, ruby petstore samples 2018-02-22 17:53:51 +08:00
Akihito Nakano
91bd7ac3b9 [PHP] Run unit tests on 'tests' directory (#7675)
* Run unit tests on 'tests' directory

* Fix: move argument to <argument>
2018-02-22 17:31:47 +08:00
Akihito Nakano
be14e02875 [PHP] Cleanup test (#7673)
* Regenerate PetApiTest, OrderTest

The same test code as deleted is in the 'tests' directory.

* Move test code 'test' -> 'tests', and Regenerate test/Model/PetTest.php

* Regenerate 'test' directory

rm -rf samples/client/petstore/php/SwaggerClient-php/test && bin/php-petstore.sh
2018-02-22 17:31:18 +08:00
Akihito Nakano
14e1e19803 [PHP] Improve validation on empty arrays (#7686)
* Api should throw exception if an empty array is passed

* Update samples

- bin/php-petstore.sh
- bin/security/php-petstore.sh
2018-02-22 17:15:00 +08:00
Ken Gilmer
39fa375e3a [kotlin] Fix NPE for POST/PUT/PATCH with empty request models. (#7629)
* [kotlin] Fix NPE for POST/PUT/PATCH with empty request models.

* [kotlin] Pass content type in empty response as discussed in PR review.
2018-02-18 23:51:02 +08:00
edwd
9fb2c29a46 7644 objc deprecated afnetworking datataskwithrequest (#7645)
* Replacing calls to dataTaskWithRequest:completionHandler:

In objc ApiClient-body.mustache, replacing calls to AFNetworking's deprecated `dataTaskWithRequest:completionHandler:` with calls to `dataTaskWithRequest:uploadProgress:downloadProgress:completionHandler:`.

* Ran the shell script under ./bin/ to update Petstore sample so that CIs can verify the change: ./bin/objc-petstore.sh and ./bin/security/objc-petstore.sh
2018-02-18 22:58:57 +08:00
Benoit Vermont
c599906f1a Kotlin: Correct data_class.mustache to use proper property for inner enum data type (#7597)
* Correct data_class.mustache to use proper property

The name of the property is "datatype" lowercase, as can be seen in https://github.com/swagger-api/swagger-codegen/blob/master/modules/swagger-codegen/src/main/java/io/swagger/codegen/CodegenProperty.java#L10

Using "dataType" does not work, and the type of the inner enum is null.

* Change in petstore
2018-02-18 22:44:35 +08:00
Karol
cddcda0fe0 Java Jersey2: Make generated client code thread safe (#7605)
* fix issue-7453; make jersey 2 generated code thread safe by following the withHttpInfo pattern used by many other generated clients

* fix issue-7453; make jersey 2 generated code thread safe by following the withHttpInfo pattern used by many other generated clients
2018-02-18 22:35:08 +08:00
William Cheng
aa6b217bb9
[Ruby] Add auto-generated rubocop config file (#7637)
* add rubocop to ruby api client

* add new files

* fix ruby generator test case
2018-02-12 14:08:02 +08:00
Victor Orlovsky
62a930223f [JAVA][Rest-assured] reqSpec() method has been added into api.mustache for requests custom… (#7556)
* reqSpec() method has been added into api.mustache for requests customisation (group operations)

* add - reqSpec() has been added to samples
2018-02-08 14:51:23 +08:00
Alexander Ovchinnikov
ee561fcd63 Add withXml option for Go language (#7566)
* Added support for application/xml content-type for GO language
Issue #7463

* Added test scripts for Go lang "withXml" feature

* Added samples for Go land "withXml" feature.

* "withXml" feature for Go language is only available for client.
2018-02-08 14:47:47 +08:00
Xiaoxiao
b184fb1d9c [Swift3] escape URL parameters (#7529)
* Escape URL parameters for Swift4 and update its Petstore sample

* Update the code style

* Update code style

* Update code style

* Remove break statements in switch for AlamofireImplementations
2018-02-08 00:19:04 +08:00
William Cheng
52f606b8dc
Fix Swift3 test cases and add pom.xml, travis config for iOS test (#7608)
* add pom.xml for testing objc, swift

* add travis config for testing swift, objc

* test swift, objc clients

* use ruby 2.4.2

* remove stack

* update swift3 petstore

* test with xcode9

* remove testing inline additional properties for swift3

* restore travis, pom
2018-02-07 23:13:48 +08:00
Jim Schubert
0e34bcf4e4 [csharp] ctor params should always be camelCase (#7519)
* [csharp] ctor params should always be camelCase

After PR #6305, var names defaulted to PascalCase results in constructor
arguments also being PacalCase. Model properties and constructor
arguments have no reason to be the same case, and in fact may cause
issues (`name = name` will result in a compilation error).

This commit forces all constructor params in models to lowerCase.

This is a necessary change, for instance, if client SDK consumers assign
using named args:

var a = new Model(first = "", second = "")

The PacalCase default and update to constructor arg casing will break
existing consumers of the client.

See #7070 for more details and discussion.

* [csharp] Regenerate samples

* [csharp] Remove client models generated from a different spec.

* [csharp] Escape reserved words on camelcase/lowercase lambdas

* [csharp] Regenerate samples
2018-02-06 22:54:26 +08:00
Stephane Carrez
9ba74f4840 [Ada] Fix GNAT project and server skeleton to avoid sending a response when an error is returned (#7574)
* Fix the GNAT project for the client and server to avoid using unecessary projects on
the client side

* Define a minimal configuration for user and application definition

* Fix the server skeleton to emit the response only when the status code is 200

* Fix the Ada petstore GNAT project
2018-02-05 17:47:20 +08:00
William Cheng
dbe78e23e8
[Lua] Improve auto-generated test files (#7568)
* move lua spec folder, remove extra endline

* remove extra line

* remove duplicated import
2018-02-04 22:06:43 +08:00
William Cheng
6c79052ac4
Add auto-generated Lua spec files for APIs, models (#7562)
* add auto-generated lua spec files for api, models

* use partial header in test files
2018-02-03 00:12:01 +08:00
shwetas1205
dfbef43743 Fixed unicode error and supported allow_nonstandard_methods in tornado based python client (#7560)
* fixing "decoding Unicode is not supported" error for py2 when data is unicode

* allowing nonstandard methods for tornado python client.

* Making sure to return unicode when needed
2018-02-02 23:00:04 +08:00
William Cheng
38a2c1dde9
[Lua] Fix Rockpec (#7554)
* fix lua rockspec

* use dot in the rockspec namespace
2018-02-02 14:03:58 +08:00
wing328
5a2c3a6571 Merge branch 'fix/issue-6553-completable' of https://github.com/wingsofovnia/swagger-codegen into wingsofovnia-fix/issue-6553-completable 2018-02-02 12:19:44 +08:00
William Cheng
fec0363f7d
[Java] Add back byte array enhancement (#7546)
* add back byte array enhanceement

* add okio dependency to java rest assured api client
2018-02-01 21:49:22 +08:00
wing328
d01a60cb14 update ts petstore files 2018-02-01 19:20:35 +08:00
wing328
3adbd86760 remove corrupted ts files 2018-02-01 19:18:14 +08:00
Tomasz Prus
f6e0e297eb [python-asyncio] tests and fixes (#7235)
* fix: creating ssl context and passing args/files/forms

* feat: python-async add tests

* chore: rebuild petstore sample for python, tornado and asyncio

* feat: add python asyncio to travis

* feat: print coverage (python-asyncio)
2018-02-01 17:26:38 +08:00
Erik Timmers
157e6b7fab [angular] Add option to generate tagged unions (#7245)
Using the option `taggedUnions` will create a union type for each parent
type instead of extending interfaces. The union types are tagged by using
the discriminator values.

And also:
* Add support for aliases;
* Add support for read-only properties.
2018-02-01 17:20:50 +08:00
William Cheng
36f69a034d
remove trailing spaces in qt5 c++ templates (#7525) 2018-02-01 13:35:09 +08:00
Jon Schoning
2d0bafb6b2 [haskell-http-client] default InlineMimeTypes=true (#7534)
- default CLI option InlineMimeTypes to True, since it produces cleaner code

- update bounds on dependancies
2018-02-01 12:26:13 +08:00
William Cheng
6b9d38d40a
remove trailing spaces in ada template (#7527) 2018-01-30 14:39:13 +08:00
William Cheng
eb35870d11
remove trailing spaces in r templates (#7526) 2018-01-30 11:02:13 +08:00
wing328
36b042d605 update ts aurelia petstore samples 2018-01-29 16:42:16 +08:00
Konstantin Simon Maria Möllers
7faaa091cd Fix generated module imports in Aurelia APIs (#7465) (#7520) 2018-01-29 15:46:51 +08:00
wing328
cf21ac0327 update spring petstore samples 2018-01-29 01:38:13 +08:00
wing328
6bc84eeee1 add rest-assured to circleci jdk8 test 2018-01-28 22:33:24 +08:00
Victor Orlovsky
6debf749ae [NEW API CLIENT] Rest-assured (#7492)
* Rest-assured http client has been added

ApiClient has been added

@Deprecated has been added for operation

{{{returnType}}} has been fixed

build.gradle.mustache, build.sbt.mustache, api_doc_mustache has been added

Samples has been added for rest-assured

Useless supporting files has been removed for rest-assured

Sample has been added for rest-assured

* Tests has been added

* Doc and tests has been fixed, JSON.mustache moved to common
2018-01-28 22:29:23 +08:00
William Cheng
c69925b53a
[Kotlin] Fix issues with threetenbp (#7516)
* fix kotlin threetenbp client

* fix typo in kotlin sample path
2018-01-28 21:40:22 +08:00
wing328
a811a48c3f minor fix to kotlin client genrator due to merge conflict 2018-01-28 17:18:15 +08:00
Jon Schoning
9fba9c3255 [haskell-http-client] add config options: cabalPackage, cabalVersion, baseModule, requestType, configType (#7515)
- add new config options:

    cabalPackage
      Set the cabal package name, which consists of one or more alphanumeric words separated by hyphens

    cabalVersion
      Set the cabal version number, consisting of a sequence of one or more integers separated by dots

    baseModule
      Set the base module namespace

    requestType
      Set the name of the type used to generate requests

    configType
      Set the name of the type used for configuration
2018-01-28 14:59:04 +08:00
Stephane Carrez
4bd8fc6e8a Fix 7511: [Ada] Client call is not correct with multiple parameters and application/x-www-urlencoded (#7512)
* Fix calling the 'Call' procedure to submit the request for the Ada client when a request
has form parameters

* Rebuild the files by running bin/ada-petstore.sh
2018-01-28 14:54:36 +08:00
micheleISEP
3035bc629b [Ada] Hotfix/ada model sort (#7491)
* Ada generator generates "=>" (correct syntax) instead of "->". Fixes #7450

* Updated the Ada petstore samples

* Committing "VERSION" file and the rest of the petstore samples

* Redone the algorithm to sort the models by their dependencies, to create correct *-model.ads files.

To fix #7485

* changed tabs into spaces
2018-01-28 14:48:51 +08:00
Jean-François Côté
d1933b5fca Fix a problem in the generation of typescript-jquery when we have enum in a query param (#7506) 2018-01-28 14:48:33 +08:00
William Cheng
a2410b210c
Add auto-generated rockspec file to Lua API client (#7475)
* add luarocks spec

* remove trailing spaces

* remove rockspec filename option

* update lua rockspec

* update rockspec based on feedback

* remove configuration which is not needed

* remove api_client, which is no longer needed
2018-01-27 17:09:45 +08:00
wing328
15b3dfbb80 update java petstore samples 2018-01-26 10:02:24 +08:00
Benjamin Roedell
47111b3241 Issue 4824 fix gson deserialize format byte (#7473)
* Build sample prior to code changes so differences are easier to decipher

* Add byte array type adapter for okhttp-gson (java8 only)

* Unit revealed that Gson (or GsonFire) defaults to escape = (equal sign) out of base64 string.  Add disableHtmlEscaping() to gsonbuilder.

* Update specs and samples to include format=byte and include junit test of byte array serialization and deserialization.

* Implement recommendations by @cbornet including: Use okio.ByteString for base64 conversions instead of java 8 lib since the okhttp-gson client already includes okio. Remove setting to disableHtmlEscaping. Rename LocalByteArrayAdapter to ByteArrayAdapter.

* Update spec and sample for java okhttp-gson library client

* Undo addition of profilePhoto property.  A format byte property is already available under the format_test definition.

* Put previously deleted tests back. Modified testFindPetsByTags() to verify exception since the server now returns a 500 for this request.

* Update test to pass when run against docker containerized server swaggerapi/petstore (heads up, this test fails if calling out to the internet published version of http://petstore.swagger.io)
2018-01-26 09:52:49 +08:00
Jens Radtke
76907cacde fix: declare property headerSelector (#7495)
The property was created dynamically, it's a more clean approach to
declare it as a member of the class.
2018-01-26 00:49:35 +08:00
William Cheng
2394fac677
update swagger annoatation version to 1.5.17 (#7500) 2018-01-25 23:29:20 +08:00
William Cheng
df10c725ab
Add lua test script, minor fix to Lua API files (#7490)
* add lua test script, minor fix to api files

* fix model import, avoid null header issue

* add space before equal sign
2018-01-25 22:01:04 +08:00
etondoze
d1a296412e Upgraded swagger-parser and swagger-core versions (#7497) 2018-01-25 21:35:11 +08:00
ehyche
a3d0f1d4bd Swift4: make generated models structs instead of classes (#7345)
* Split up model template into partials

* Change models from class to struct.

This fixes issue https://github.com/swagger-api/swagger-codegen/issues/6941.

In this change, we make our Swift4 generated model objects struct instead of class. However, in order to do this, we needed to handle the following edge cases:

* Inheritance and polymorphism (allOf)
  * With classes, we use inheritance. So therefore, the parent properties are ONLY on the parent generated class, and the model object which derives from the parent class picks up those properties through inheritance.
  * However, structs do not support inheritance. So we simply duplicate the parent allOf properties in the child struct.
* We have to handle the case where the property name on the struct may be different than the property name in the JSON. By default, the Codable protocol assumes that the JSON property name is the same as the struct property name. If they need to be different, then we generate a CodingKeys string enum, which contains the mapping between struct property name and JSON property name.
* additionalProperties. We cannot use the default Codable implementation for the additionalProperties, since it will look for an actual dictionary called "additionalProperties" in the JSON. Therefore, for model objects which have additionalProperties, we must generate our own implementation for the Decodable and Encodable protocols.

I have run ./bin/swift4-all.sh and ./bin/swift4-test.sh to re-generate all of the sources, and I have verified that the generated code in samples/clients/test/swift4/default builds and the unit tests pass.

* Update VERSION in .swagger-codegen

* Update generated code for swift4-test schema
2018-01-25 21:33:11 +08:00
Jeffrey Slort
2b84118c9f removed isomorphic-fetch typing dependency (#6894)
* removed isomorphic-fetch typing dependency
removed postinstall command

* space

* regenerated samples

* updated security samples

* fixed missing url module

* added prepublish hook

* regenerated samples

* added npm build to build
2018-01-25 21:20:58 +08:00
wing328
0b4b25afff update all c# pestore samples 2018-01-25 21:17:57 +08:00