Commit Graph

4912 Commits

Author SHA1 Message Date
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
3758aad225
Update Python flask default value (#361)
* update python flask default value

* update python flask samples
2018-05-08 10:16:25 +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
Jérémie Bresson
e2f8976fa7
Remove old metadata files (#357) 2018-05-07 13:31:17 +02:00
William Cheng
a9baaa81e3
update eiffel with petstore oas2 (#268) 2018-05-07 18:32:03 +08:00
William Cheng
d74b4cdf8d
fix map type and collection format for form parameter (array) (#356) 2018-05-07 18:22:30 +08:00
Jérémie Bresson
e49e8ca169 Generate 'cwiki' (#351)
* Regenerate 'cwiki'

* Change default package value for cwiki
2018-05-07 17:53:08 +08:00
Jérémie Bresson
c42777b09e
Rename default package for html, html2, dynamic-html (#350) 2018-05-07 09:55:23 +02: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
Arthur Mogliev
d30fcbabba Fixes for php-ze-ph generator (#340)
* Fixes for ze-ph:
- fixed gathering of required properties for query data model
- fixed setting of internal vendor extensions for query data model detection
- fixed small typo in generated README

* Updated samples for ze-ph fixes
2018-05-07 10:22:08 +08: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
Jérémie Bresson
4d3110f29d
Rename default packages for 'java-undertow-server' (#336) 2018-05-06 12:34:54 +02:00
Jérémie Bresson
d8fd560d64
Rename default packages for 'jaxrs-spec' (#333) 2018-05-06 12:34:36 +02:00
Jérémie Bresson
2103fadab8
Fix package declaration for play-framework (#332) 2018-05-06 08:08:34 +02: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
Jérémie Bresson
252a1c2599
Regenerate html.md OAS2 (#251) 2018-05-05 13:24:30 +02:00
Akihito Nakano
1245a47649
Merge pull request #321 from ackintosh/update-nodejs-server
Update nodejs server
2018-05-05 17:06:46 +09:00
William Cheng
5f2bc28779
update default value for elixir (#319) 2018-05-05 01:37:48 +08:00
akihito.nakano
1bd393f4ea Rename 'keywords' for package.json 2018-05-05 01:43:35 +09:00
akihito.nakano
90438b8e71 Tweak indent 2018-05-05 01:38:23 +09:00
akihito.nakano
6c3d7bbc48 Update nodejs samples which skipped overwriting 2018-05-05 01:36:37 +09: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
Akihito Nakano
08e0393def Fix missing examples (#305)
* Fix missing examples

* support ArraySchema

* Refactor: move the logic to generate samples from DefaultCodegen to ExampleGenerator

* Delete unnecessary argument

OpenAPI is passed in constructor

* Delete unnecessary 'import'

* Update samples ( bin/springboot-petstore-server.sh )

* Update samples ( bin/openapi3/nodejs-petstore-server.sh )
2018-05-04 17:25:49 +08:00
Jérémie Bresson
4dc519b4fe
Rename groupId for java-play-framework (#310) 2018-05-04 10:22:42 +02:00
Jérémie Bresson
71d544c9f7
Rename default packages in meta (#314) 2018-05-04 10:19:07 +02: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
de55812d68 Update wordings (#301)
* update wordings
* update git_push wordings
* update git clone
* update homepage url
* update meta-codegen sample
2018-05-03 14:12:24 +02:00
William Cheng
15d4d2f0d4
remove duplicated entries in C# csproj (#302) 2018-05-03 16:31:26 +08:00
Jérémie Bresson
0ba2a9a250
Update java play framework samples OAS2 (#286)
* Regenerate play framework examples
* Add 'samples.ci' for manual files and update scripts
2018-05-03 08:19:59 +02:00
William Cheng
9cf185912c
Fix Scalatra petstore sample (#300)
* restore scalatra from codegen

* regenerate scalatra oas2 petstore, fix defaut value

* better code format for scalatra

* more format fix for scalatra

* update scalatra parameter template
2018-05-03 13:26:04 +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
Jérémie Bresson
1492df6cef
Override server port for Jetty configuration (#246) 2018-05-02 07:11:29 +02: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
42aebe4367
Update Lumen generator petstore with OAS2, OAS3 (#256)
* update php lumen with oas3 petstore

* update lumen with oas3 pestore
2018-04-30 16:12:25 +08:00
William Cheng
7ad92572e4
Update default value for PHP server generators (slim, silex) (#272)
* update php slim samples

* update php silex samples

* update php silex default value
2018-04-30 15:18:13 +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
2ce721d0b9
Update PHP ZE-PH server samples with OAS2, OAS3 (#259)
* update php ze-ph samples with oas2

* update zeph samples with oas3
2018-04-28 21:48:50 +08:00
William Cheng
490255025e
Update PHP Slim server samples with OAS2, OAS3 (#258)
* update php slim server petstore with oas2

* update php slim petstore with oas3 (no diff)
2018-04-28 21:48:40 +08:00
William Cheng
7621deeb9f
Update PHP Silex server petstore with OAS2, OAS3 (#254)
* update php silex with oas2 petstore

* update php silex with oas3 petstore
2018-04-28 21:48:22 +08:00
William Cheng
69133d3677
Update PHP Symfony server petstore with OAS2, OAS3 (#255)
* update php symfony with oas2 petstore

* update php symfony with oas3 petstore
2018-04-28 14:38:37 +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
Jérémie Bresson
3f976afca8
Generate vertx OAS2 (#226) 2018-04-27 10:19:48 +02: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
Jérémie Bresson
19b0d37c38
Generate java-msf4j (#225) 2018-04-26 10:41:17 +02:00
Jérémie Bresson
52391ed9e5 Regenerate all jaxrs examples (#234) 2018-04-26 13:54:41 +08:00
William Cheng
bcc7b788e0
fix erlang client compilation error (#228) 2018-04-26 13:44:05 +08:00
William Cheng
df26bcb40c
Update Erlang server samples with Petstore OAS2 (#150)
* update erlang server samples with petstore oas2

* fix compilation in erlang server
2018-04-26 13:34:02 +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
4924b4951c
Generate java-pkmst (#223) 2018-04-25 07:01:48 +02:00
Jérémie Bresson
6f28209ccc
Generate java inflector OAS2 (#222) 2018-04-25 07:01:32 +02: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
William Cheng
2c6380c846
fix inner item (list, map) for play framework (#217) 2018-04-24 19:02:10 +08: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
5340c35ce1
Rename sagger metadata and more (#208)
* Rename groupId, artifactId, project name, title, ...
* Remove .swagger-codegen/VERSION file
2018-04-24 08:08:53 +02:00
Jérémie Bresson
d5d8c356b7
Rename default packages for jaxrs generators (#209) 2018-04-24 06:26:42 +02:00
Jérémie Bresson
6983dcffa2
Update all jaxrs examples (#144) 2018-04-23 12:17:14 +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
Akihito Nakano
5e05638360 Fix content type (#179)
* Update php client with OAS3

* Fix content type

the endpoint consumes 'application/x-www-form-urlencoded'

* Regenerate php client from OAS3

* Update the test case according to the fix on spec
2018-04-21 22:26:35 +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
93bf3d91ea
Update C++ Pistache samples with oas2, oas3 (#166)
* restore pistache from codegen 2.x

* update pistache samples with oas2

* update pistache with oas3 petstore (no diff)

* restore datatype for array of model

* update pisache server scripts

* Revert "restore datatype for array of model"

This reverts commit 3b949a3873f3fca78311065173eda26e786dedec.

* fix array of models in method signature
2018-04-21 00:40:45 +08:00
Jérémie Bresson
d21e4227a6 Update finch Petstore OAS2 (#126)
* Update finch sample

* Udpate 'finch' samples

* update finch with oas3 petstore (no diff)
2018-04-20 21:52:22 +08:00
William Cheng
8a4f905892
Update C++ Restbed server samples with OAS2, OAS3 (#165)
* restore restbed samples from codegen2x

* update restbed samples with oas2

* update restbed sample with oas3 (no diff)
2018-04-20 19:07:42 +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
Jérémie Bresson
f3736d66b7 Fix "meta" command (#157)
* Fix "meta" generator

* Add script in bin/ to test the use case

* Add result in samples/

* Update read-me

* Implement 'escapeQuotationMark'
2018-04-20 15:25:51 +08:00
William Cheng
03490e9230 fix java binary mapping (#158) 2018-04-20 08:20:13 +02:00
William Cheng
28a1255c0e
Update Go server petstore sample with OAS3 (#154)
* restore go server from codegen 2x

* update go server petstore with oas3
2018-04-20 12:05:27 +08:00
William Cheng
686ff6a502
Go server petstore update (OAS2, OAS3) (#146)
* restore go server petstore from codegen 2x

* update go server petstore (oas2) - no diff

* update go server samples (oas3)

* add go petstore server script
2018-04-19 21:57:22 +08: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
74ddbf7a16
update scalatra with oas2 spec (#131) 2018-04-19 09:16:52 +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
05f5c5798b
Update html, dynamic-html petstore, fix example value for form parameters (#122)
* update dynamic-html samples with oas2

* update dynamic-html oas3 (no change)

* update html petstore (oas2)

* update html petstore with oas3

* fix example value for form parameters

* fix javadoc string
2018-04-18 17:42:38 +08:00
William Cheng
08038ddc30
update haskell servant samples with oas3, oas2 (#116) 2018-04-18 01:48:49 +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
ddf10b98dc
Update NodeJS server petstore samples with OAS2, OAS3 (#113)
* update nodejs server oas2

* update nodejs server petstore with oas3

* update nodejs google cloud with oas2 petstore

* update nodejs server google function with oas3
2018-04-17 22:58:13 +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
William Cheng
0fc84687ff
update rails petstore (oas3) (#111) 2018-04-17 21:03:00 +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
Jérémie Bresson
25a6a9d444 html: fix typo in class name (#7818)
* html: fix typo in class name

* Update "html" samples
2018-03-13 00:08:48 +08:00
William Cheng
e7f4fb3c45
Fix nodejs-server path issue in windows platform (#7808)
* fix nodejs-server path issue in windows platform

* only replace character in apiPackage
2018-03-12 23:21:07 +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
Adam Conway
ff1178ad7e [Java][Spring] fix optional query params missing in generated swagger (#7607)
* Added genericModelSubstitutes if using Optional

As per https://github.com/springfox/springfox/issues/1848  Doesn't seem to fix the problem, but is what springfox recommends so might be aprt of it.

* Added config package to scans

If you have defined apiPackage and basepackage (e.g. as com.example.api) but not defined configPackage then config is still in io.swagger.config and is not included in the component scan.  This means the config is not used when generating the swagger definition from the code.  Fixed by including configPackage also in the scan.

* Ran spring-all-pestore.sh update script

* Converted tabs to spaces

* Ran spring-all-pestore.sh update script
2018-02-23 00:02:38 +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
shigeru.nakajima
dcad9ae807 [Rails5] make version of the generated Rails stub server to strict Rails 5.0 (#7700) 2018-02-22 15:57:14 +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
wing328
8ba9db67f5 remove oudated php, node server samples 2018-02-11 17:28:38 +08:00
William Cheng
854b5012be
fix NPE when host is undefined (#7633) 2018-02-10 17:11:11 +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
Jim Schubert
8668175879 [aspnetcore] Fix string enum generation (#7581)
* [aspnetcore] Fix enum strings generation regression

* [aspnetcore] Regenerate sample
2018-02-08 14:43: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
5d92717dc9 update jaxrs to listent at port 10080 2018-01-30 00:23:08 +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
7c20316755 update artifict id for jaxrs datelib j8 2018-01-29 13:51:21 +08:00
wing328
cf21ac0327 update spring petstore samples 2018-01-29 01:38:13 +08:00
wing328
87cdddcf17 add CI test for JAXRS datelibrary java8 2018-01-29 00:35:09 +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
jarlesat
88c5112f2e Adds support for returning response in jaxrs-spec interfaces (#7442)
* Issue 7440 Added support for returning response in jaxrs-spec interfaces.

* Issue-7386 Updates samples for jaxrs-spec interfaces introduced in issue 7386.
2018-01-28 15:19:30 +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
Jim Schubert
7cad47dd39 [kotlin-server] --library=ktor (barebones implementation) (#7412)
* [tools] Make sed in new.sh more cross-platform

The -r option passed to sed is a GNU sed option for extended regex
evaluation. The -E option evaluates the same option, and is part of the
POSIX standard, meaning this option is available in GNU sed as well as
Apple's BSD variant.

This commit removes the need for users to install gnu-sed on Mac.

* [ktor] Initial ktor (kotlin-server)

This adds a very barebones implementation for a ktor server generator.

This supports metrics and typed locations. All endpoins are stubbed to
return HTTP/1.1 501 Not Implemented.

* [ktor] Initial sample

* [ktor] Adding options for select feature installs

Options available:

* featureAutoHead
* featureConditionalHeaders
* featureHSTS
* featureCORS
* featureCompression

* [ktor] Start of auth functionality

* [ktor] API key auth placeholder

* Add basic support for oauth2 configurations

ktor doesn't seem to explicitly accept oauth flow properties in its
configuration object. This may be a blocker for 'implicit' flow
definitions.

* Added example response objects

* [ktor] Route for apis with bodies, some cleanup

ktor locations are only supported for routes with path/query parameters.
Routes with body or file parameters must be declared with traditional
route api.

This commit also includes lambdas for simplifying processing in
library-based server generator code. As an example, ktor requires
lowercase http methods while spring (a potential future generator)
would require an uppercase such as HttpMethod.GET. It doesn't make sense
to modify these in the operations post-process method because that
format wouldn't be universally desirable.

The lambdas included in the KotlinServerCodegen:
* lowercase: converts all text to lowercase
* uppercase: converts all text to UPPERCASE
* titlecase: converts words (with configurable delim) to Title Case
* indented|indented_8|indented_12|indented_16: these helpers apply the
  same desired indent to all lines of an included fragment's text.

* Fix some javadoc issues in lambda classes

* Update kotlin-server-petstore.bat

Change `kotlin` to `kotlin-server`

* Fix javadoc error messages in CI
2018-01-27 17:43:46 +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
William Cheng
2d898511a8
Add Play server samples to CircleCI (#7501)
* add play server samples to circle ci

* add pom.xml for java play framework
2018-01-26 09:48:51 +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
Jean-François Côté
e33b350c89 Fix an issue in Play Framework generator where a CSV is empty and transfered to the controllerImp with an empty item. (#7496) 2018-01-25 21:53:20 +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
Esteban Marin
20305139b5 [Feature][TypeScript] request param enum as literal unions (#7433)
* #7365: use enums string / number literals for request parameter if it is an enum

* #7365: use enums string / number literals for request parameter if it is an enum

* #7365: use enums string / number literals for request parameter if it is an enum

* #7365: improve docs

* #7365: move code to AbstractTypeScriptClientCodegen, remove redundant code in TypeScriptAngularClientCodegen, change type Object to Number in numericEnumValuesToEnumTypeUnion()

* #7365: move code to AbstractTypeScriptClientCodegen, remove redundant code in TypeScriptAngularClientCodegen, change type Object to Number in numericEnumValuesToEnumTypeUnion()

* #7365: allow parameter data type customizations

* #7365: re-enable disabled unit test assertions

* #7365: remove enum handling from type declaration generation

* #7365: generate all typescript samples

* #7365: re-enable disabled unit test assertion
2018-01-25 18:36:14 +08:00
Jörn Ahrens
a5e26a44ff [Dart] - Rework Dart client generator to be flutter-compatible (#7418)
* copy mustache templates from dart generator

* Start with generator by copying the DartClientCodegen for now

* at least we know this is not for a browser..

* First working version for a simple swagger configuration

* remove browserClient parameter, since it doesn't make sense for flutter

* Take care of complex types to support object hierarchies

* add null safety

* add small test for options

* add flutter-petstore scripts

* generate flutter petstore output

* Add new flutter test project

* move generated client to make it usable

* use generated swagger petstore plugin

* add support for lists of objects

* add DateTime support

* fix listFromJson implementation

* fix NPEs in DateTime operations + place order in sample

* Small readme changes

* bugfixes

* Use flutter-compatible implementation as default dart implementation

* fix generated samples

* Make lists serializable, now all dart test cases are working again

* better list implementation

* use StringBuffer

* removed FlutterClientCodegen

* fix browser client

* fix dependencies

* swagger-browser-client for browserClient testcases

* fix scripts

* removed flutter scripts

* add map support and simplify code via using .toJson contract

* remove unneeded devDependencies

* Regenerated samples

* fix call to mapFromJson, it is not a constructor

* remove pointless string serialization

* regenerated dart samples
2018-01-25 18:18:53 +08:00
Articus
60e3339aa6 [Feature][PHP] Update for ze-ph generator (#7472)
* update for ze-ph generator stub to support Zend Expressive 2.1 and Path Handler 0.3

* ze-ph: for each operation generator creates special DTO model from its query parameters

* ze-ph: generation of extra TODO's for complex container type and update for samples
2018-01-24 12:36:24 +08:00
wing328
5a3a33b3c8 update java vertx server samples 2018-01-24 12:32:45 +08:00
William Cheng
61e58d6496
Add R namespace file (#7467)
* add r namespace file

* rename NAMESPACE mustache file
2018-01-22 22:32:22 +08:00
William Cheng
cf4df630b7
Add Spring Petstore samples (async, java8-localdatetime) to CircleCI (#7468)
* add ci for spring mvc: async, localdatetime

* update artifactId for new spring samples
2018-01-22 21:35:51 +08:00
micheleISEP
43f0e86923 Ada code generator corrected: "=>" instead of "->". Fixes #7450 (#7456)
* Ada generator generates "=>" (correct syntax) instead of "->". Fixes #7450

* Updated the Ada petstore samples

* Committing "VERSION" file and the rest of the petstore samples
2018-01-22 17:40:34 +08:00
wing328
6651f6bfa1 Merge remote-tracking branch 'origin/2.4.0' 2018-01-22 14:16:55 +08:00
Jim Schubert
8724719960 [csharp] Support arrays of arrays for properties and models (#7400)
* [csharp] Support composition on toJson

Previous implementation assumed specification only supports polymorphic
associations (via discrimator), although the code didn't seem to be
setup correctly for that in the first place. That is, the parent object
must define the discriminator (see
https://github.com/OAI/OpenAPI-Specification/blob/master/versions/2.0.md#models-with-polymorphism-support),
so NOT HAS parent AND HAS discriminator doesn't make sense.

From a C# perspective, base classes should have the method marked
virtual and derived classes should override the method. This supports
both composition and polymorphic definitions.

* [csharp] this.Configuration in api template

Unprefixed Configuration property access leads to ambiguous references
when spec defines a Configuration model.

* [csharp] Models/properties support nested arrays

Previous implementation didn't support multiple levels of array with
array items as OpenAPI spec supports. This means an object defined as
type: array with items = type: array|items=double (which is common in
GIS) would not be possible.

This implementation assumes generics in the nested type definitions, so
the above would generate List<List<double?>> for model parent types as
well as property type declarations.

* [csharp] Regenerate integration test sample

* [csharp] Set "Client" case sensitive as reserved

* [csharp] Regenerate security sample

* [csharp] Regenerate samples
2018-01-22 14:14:17 +08:00
Jim Schubert
1c4e6b7d46 [csharp] Fix ToJson to work with composition and polymorphism (#7399)
* [csharp] Support composition on toJson

Previous implementation assumed specification only supports polymorphic
associations (via discrimator), although the code didn't seem to be
setup correctly for that in the first place. That is, the parent object
must define the discriminator (see
https://github.com/OAI/OpenAPI-Specification/blob/master/versions/2.0.md#models-with-polymorphism-support),
so NOT HAS parent AND HAS discriminator doesn't make sense.

From a C# perspective, base classes should have the method marked
virtual and derived classes should override the method. This supports
both composition and polymorphic definitions.

* [csharp] Regenerate integration test files

* [csharp] Regenerate samples

* [csharp] Regenerate security sample
2018-01-22 14:13:50 +08:00
Jim Schubert
ed7af73f6b [csharp] Reference this.Configuration in client api template (#7394)
* [csharp] this.Configuration in api template

Unprefixed Configuration property access leads to ambiguous references
when spec defines a Configuration model.

* [csharp] Regenerate samples
2018-01-22 14:04:19 +08:00
jarlesat
99fc272465 [JAX-RS][Spec] Removes throws Exception. (#7437)
* Issue-7435 Removes throws Exception.

* Issue-7435 Updates jaxrs-samples.
2018-01-22 13:48:59 +08:00
Stephane Carrez
7d2b49085f Fix 7457: [Ada] wrong order for generated structures in *-models.ads (#7462)
* Fix the comparison between two model types to compare them recursively
and make sure we sort the model types according to their dependencies

* Run bin/ada-petstore.sh to update the generated Ada client samples
2018-01-22 13:27:39 +08:00
Stephane Carrez
2b2b85eec7 Fix 7459: [Ada] wrong JSON in POST operations (#7460)
* Fix Ada client generated code to avoid having a spurious body name for parameters passed in the body

* Run bin/ada-petstore.sh to update the generated Ada client samples
2018-01-22 13:21:09 +08:00
Tristan Sloughter
c73118524c [erlang-client] Erlang request utils (#7257)
* [erlang-client] fix body param from being included path and base path to remove host

* [erlang-client] move request logic out of api functions to utils module

* [erlang-client] add support for passing http client configuration to requests

* [erlang-client] update auth handling

* [erlang-client] remove underscore2, replacing with original underscore + replaceAll
2018-01-22 13:18:35 +08:00
magnolia
6db63c7a1f deleted unnecessary notes (#7454)
https://github.com/swagger-api/swagger-codegen/issues/7398
2018-01-20 14:31:43 +08:00
ccozzolino
59ff4c198b [Java][library: vertx] Add default value and required parameter support to vertx server temp… (#7410)
* Add default value and required parameter support to vertx server templates. Fix for #7409.

* Added missing serviceId declaration to workaround #allParams section clearing the vendorExtensions map
2018-01-20 14:31:06 +08:00
Esteban Marin
ef832e7157 [Feature][Angular] improve docs angular import (#7363)
* #7354: improve docs about importing multiple ApiModules, prevent https://github.com/angular/angular/issues/20575#issuecomment-356261374

* #7354: prevent https://github.com/angular/angular/issues/20575#issuecomment-356261374 add error message about importing the HttpModule / HttpClientModule

* #7354: generate sample files

* #7354: generate README.md also for non-npm packages
2018-01-20 14:24:33 +08:00
Kane Lai
a61d23265d Fixed incorrect renaming of header and query param to camel cases for Kotlin Client template (#7420)
* - Fixed incorrect renaming of header and query param to camel cases

* Generated petstore code base on modified Kotlin template
2018-01-19 17:30:04 +08:00
magnolia
7853308c8e Rebuild Scalatra sample (#7431)
When creating the following PR, sample was generated without reflecting the last change.

https://github.com/swagger-api/swagger-codegen/pull/7393

With this commit, it will be synchronized
2018-01-19 16:20:41 +08:00
magnolia
1ee85de94e Added Intelli J ignore (#7423)
.idea
*.iml
2018-01-19 16:20:12 +08:00
etherealjoy
ea4b948428 [qt5cpp] Add nullptr guard to prevent crash when empty model is being serialized (#7434)
* Small fixes to prevent crash when empty json body is provided.

* Updated PetStore example for Qt5
2018-01-19 15:36:45 +08:00
William Cheng
30c1448d78
Fix build.gradle for Java RESTEasy client (#7448)
* update release 2.3.1

* add jeff9finger to java tech committee

* fix build.gradle for java resteasy
2018-01-19 13:21:39 +08:00
magnolia
7b8e409cf9 Added gitignore generation function (#7402)
Copy gitignore template from client
2018-01-15 21:00:26 +08:00
William Cheng
389344726e
Split CircleCI test into JDK7, JDK8 specified tests (#7405)
* split out circleci pom for jdk7, jdk8

* update circle config to use jdk7 pom
2018-01-15 16:46:33 +08:00