Commit Graph

899 Commits

Author SHA1 Message Date
topce
4bc5ffe867 [typescript-angular] add provided in support (#120)
* add provided in root support

* fix unit test to pass test generation of new options

* set default for providedInRoot to be true
2018-05-24 09:20:16 -07:00
Jérémie Bresson
00f176ad95 Add 'bin/ensure-up-to-date' script and update Shippable CI (#136)
* Create 'bin/ensure-up-to-date' script

* Update shippable config

* Do no longer copy 'CI/pom.xml.shippable' to 'pom.xml'
* Fix paths in CI/pom.xml.shippable

* shippable: remove write to file

* shippable: move order

* Run 'bin/ruby-petstore.sh' to update 'samples/'

* Add Kotlin scripts to the list
2018-05-24 10:18:35 -04:00
Jérémie Bresson
9040f49311
Improve 'bin/run-all-petstore' (#133) 2018-05-23 13:49:09 +02:00
Jim Schubert
27426f7b52 Cli generator name option, replaces 'language' options in CLI and Maven Plugin (#57) 2018-05-23 05:41:19 +02:00
Jérémie Bresson
b73ab0260e jaxrs-cxf-cdi: fix outer enum (#131)
* jaxrs-cxf-cdi: fix model enum

* Fix script 'bin/jaxrs-cxf-cdi-petstore-server.sh'

See https://github.com/OpenAPITools/openapi-generator/pull/124

* Run 'bin/jaxrs-cxf-cdi-petstore-server.sh'
2018-05-22 17:55:19 -04:00
Jim Schubert
8df3e54873 Move bash argv opt to end of ags line in scripts (#124)
The $@ option in bash doesn't make sense to come before `generate`
because the only option we can pass before generate cli usage is `help`.

System properties can be passed via JAVA_OPTS, so there's not really a
need for any intermediaries in the command line construction.

Having $@ at the end of the arguments list allows maintainers and users
inspecting options to quickly pass new options to a script. For example,

```
./bin/aspnetcore-petstore.sh --additional-properties sourceFolder=asdf
```

For command line arguments that may appear more than once in the
arguments list, this change doesn't provide any rules about overwriting
values that may exist (hard-coded) in the script. That is, in the
example above, if aspnetcore-petstore.sh already includes the
sourceFolder set to a different value, the "winning" value is up to the
options parser and openapi-generator-cli implementation.
2018-05-22 15:18:52 +08:00
Ben Mordue
0d82971b0c Use maven batch-mode (#70) 2018-05-16 21:39:52 +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
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
7d75c66180
Various updates (#419)
* various updates

* update pom.xml

* update ci config with new location

* Change "swagger-codegen" to "openapi-generator" in a comment

* fix pom.xml for bash client

* minor fix to github ID

* fix pom for ios
2018-05-11 15:28:32 +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
Jérémie Bresson
90b7c89443 Implement hideGenerationTimestamp for kotlin-server ktor (#416) 2018-05-11 11:24:56 +08:00
William Cheng
064418ed12
update finch generator's default value (#394) 2018-05-11 09:18:49 +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
Jérémie Bresson
a00261d3da Change default package name value for kotlin server (#387)
* Update default package

* Regenerate samples/server/petstore/kotlin-server/ktor

* Update git ignore

* Add CI
2018-05-09 16:38:16 +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
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
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
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
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
d74b4cdf8d
fix map type and collection format for form parameter (array) (#356) 2018-05-07 18:22:30 +08: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
Jérémie Bresson
d8fd560d64
Rename default packages for 'jaxrs-spec' (#333) 2018-05-06 12:34:36 +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
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
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
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
Jérémie Bresson
0435910da8
Renamings (#252) 2018-05-04 04:50:17 +02: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
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
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
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
23fc7a8cee
rearrange how map, array, model are checked in body request (#277) 2018-05-01 12:39:56 +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
8730f910b2
Merge pull request #261 from wing328/fix_go
Various fix for Go petstore client
2018-04-30 09:49:49 +08:00
wing328
73cb1cd016 fix parameter naming in go 2018-04-28 23:21:17 +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
Jérémie Bresson
3f976afca8
Generate vertx OAS2 (#226) 2018-04-27 10:19:48 +02:00
William Cheng
44aaccb108
update erlang server with oas3, no diff (#238) 2018-04-26 17:46:12 +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
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
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
William Cheng
1f64646dc3 Rename Scala generators (#206) 2018-04-23 16:15:40 +02:00
William Cheng
450cbb8250
update groovy with oas3 petstore, no diff (#205) 2018-04-23 18:50:59 +08: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
Jérémie Bresson
019b0dca1c
Add echo line at the beginning of each sh script (#202) 2018-04-23 09:58:45 +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
35f0cc221d
update erlang client with oas3 (#182) 2018-04-22 10:25:30 +08:00
William Cheng
e1fe9a3b60
update clojure petstore with oas3 (#118) 2018-04-21 23:35:21 +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
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
William Cheng
b67364e713
fix scalaz-petstore.sh oas3 script (#167) 2018-04-20 23:52:46 +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
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
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
f9bc1aec9d
update scalatra petstore with oas3 (#132) 2018-04-19 09:17:44 +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
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
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
wing328
0c3fc84f52 minor enhancemnt to swift3 bin scripts 2018-02-08 15:14:49 +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
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
wing328
87cdddcf17 add CI test for JAXRS datelibrary java8 2018-01-29 00:35:09 +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
magiepooh
914275fe79 [kotlin] support selection of datelibrary (#7054)
* [kotlin] support selection of datelibrary

* remove additional property from string

* replace string with boolean
2018-01-28 17:16:01 +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
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
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
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
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
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
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
wing328
73c338be58 Merge remote-tracking branch 'origin/master' into 2.4.0 2018-01-13 15:54:41 +08:00
wing328
50b599719d add tests for java vertx petstore 2018-01-11 16:36:23 +08:00
Jean-François Côté
ebf4efe3ea Fix issue #6867 : The apiPackage option was ignored (#7316)
* Fix issue #6867 : The apiPackage option is ignored in the template for Java Play Framework.

* use openjdk7 in travis to ensure it works with jdk7
2018-01-10 13:15:49 +08:00
wing328
0469975632 minor enhancement to scala gatling 2018-01-07 17:38:55 +08:00
ryandavis84
6d2d4298df Gatling generator2 issue #6927 (#6934)
* Initial commit, Generates everything necessary to run a performnace test against a swagger api.  Just have to fill out the CSV feeder files with your data.

* adding samples and gatling-petstore.sh file

* Extending the AbstractScalaCodeGen

* Checking in the CodegenConfig file as it is needed to generate

* removing escaped reserved words

* Changed model to be able to make all variables utilize an underscore while json fields are still just the variable name

* Changing underscore to var as interpolation can not start with a _ in scala

* Fixing path params

* allow you to pass in a system property to define which config to use as a workload profile, use rate and instance multipliers to scale up and down your test, added ramp down after the test is completed, added global assertions.

* Addressing PR feedback

* missed semi-colon

* Bringing everything up to date with the renames that were suggested
2018-01-07 17:18:36 +08:00
manuc66
a050907d1f fix net35 with JsonSubTypes (#7043)
* upgrade JsonSubTypes to 1.2.0

* update samples

* add SwaggerClientNet35

* re-generate

* fix the linux build script
2017-12-22 00:31:44 +08:00
Erik Timmers
d6539ba3c8 Add Elm language - BETA (#6947)
This is the initial Codegen for Elm 0.18.
Please try it out and provide feedback.

Not yet supported:

* path variables;
* additionalProperties;
* authentication;
* recursive types.
2017-12-20 22:26:46 +08:00
Ben Wells
83fb107749 Create abstract go codegen base class (#7197)
Remove tabs
2017-12-19 23:41:02 +08:00
William Cheng
bd19111ff0
[Java][PKMST] Move resource folder (#7213)
* comment out pkmst test for the time being

* move pkmst resource folder
2017-12-19 22:16:16 +08:00
William Cheng
37cd8b52d0
[Java][PKMST] rename pkmst to java-pkmst, update scripts/batch files (#7209)
* rename pkmst to java-pkmst, update scripts/batch files

* update pkmst batch file
2017-12-19 17:25:48 +08:00
sanshuman
cb59591eff pkmst- Prokarma microservice toolkit for java (#7023)
* Added pkmst-microservice toolkit

* formatted

* replaces tab with blank spaces

* adding documentation folder

* adding documentation folder

* Update readme.mustache

Added feature set offered by pkmst

* updated readme

* Update io.swagger.codegen.CodegenConfig

Arranged pkmstServerCodeGen and SymfonyServerCodegen in aphabatical order

* Update readme.mustache

* renamed according to convention and added typeinfoannotation

* removed tabs

* updated codegen which extends abstractjavacodegen

* Added the script files and rectified the errors

* folder name changed and commons -lang3 version upgraded

* updated readme.mustache

* updated logging filter

* Added petstore to samples and updated the pom for the same

* Added java-pkmst sample to pom.xml.circleci

* updated readme.mustache
2017-12-19 16:12:44 +08:00
Ben Wells
2e348b27f7 [Go-server] Fix formatting of go-server generated code (#7162)
* Add missing go-server petstore batch script

* Make go-server confirm to gofmt
2017-12-15 00:04:48 +08:00
Ben Wells
3c8293bbcf Add missing go-server petstore batch script (#7145) 2017-12-11 12:19:25 +08:00
wing328
8c92d3a27e add erlang petstore server batch file 2017-12-10 10:52:07 +08:00
ehyche
d2a2292d20 Update samples using latest codegen and templates (#7071) 2017-11-29 14:49:45 +08:00
Maxim Zinchenko
a8642dbdfc [Java][Spring][Server] Issue #4680 (#6890)
* Issue #4680 correct values for enum with escaped double quotes

* Issue #4680 regenerate samples

* Issue #4680 remove new lines

* Issue #4680 fixed scripts

* Issue #4680 update samples under CentOS
2017-11-27 18:30:39 +08:00
William Cheng
803f337d24
[Scala][Lagom] rename generator from scala-lagom to scala-lagom-server (#7014)
* rename scala-lagom to scala-lagom-server

* add back pom.xml and shell script

* update scala-lagom-server path in circleci pom.xml

* make shell script executable

* rename batch file
2017-11-21 23:24:02 +08:00
William Cheng
573b5518be
[Scala][Lagom] minor enhancements (#7011)
* rename lagom scala, minor enhancements

* add scala lagom to circle ci

* test sala lagom with jdk8 only
2017-11-21 17:34:09 +08:00
gmkumar2005
32abb72769 [LagomScala] Add Scala API generator for lagomframework #6900 (#6901)
* Initial Commit

* Removed unneeded class, Updated names as per naming conventions, Removed licensing info from  generated code

* Moved samples from client folder to server

* Fixed naming issue with scripts in the bin

* improved code format for api

* fixed compile issue and improved formatting

* fixed compile issue and improved formatting
2017-11-21 15:40:04 +08:00
manuc66
b06ccec11e [csharp] Update JsonSubTypes to 1.1.3 and use nuget dependency (#6969)
* the result I want to obtain

* add csharp-petstore-net-40.bat for windows

* just ran bin\windows\csharp-petstore-all.bat

* Removed those directories:
- samples\client\petstore\csharp
- samples\client\petstore\csharp-dotnet2

then ran :
bin\windows\csharp-petstore-all.bat

* - update JsonSubTypes to 1.1.3 by using nuget dependency (the package is compatible with net40)
- allign all version of Newtonsoft.Json to 10.0.3

* the result of bin\windows\csharp-petstore-all.bat

* ran bin\security\windows\csharp-petstore.bat
2017-11-21 11:26:58 +08:00
Jim Schubert
2c9f98ce38 [csharp] clean boolean additional properties 6784 (#6899)
* [csharp] Convert "false" properties to booleans

It appears as though "false" strings in additionalProperties are no
longer treated as false booleans. This may be an issue elsewhere, but a
simple fix is to always explicitly set the boolean value in a generator
class back to the additionalProperties map to convert boolean Strings to
boolean Objects.

* [nancyfx] Clean up async default option handling

* [nancyfx] Include asyncServer=false in sample script

* [csharp] Regenerate samples

* [csharp] Resolve .net 4 generation issues

Some functionality is missing from .NET 4.0, such as IReadonlyDictionary
and Type.GetTypeInfo().

This commit resolves compilation of generated .NET 4.0 code, requiring
no conditional versioning of Newtonsoft.Json.

* [csharp] Regenerate .net 4.0 sample

* [csharp] Resolve .NET 4.0 sample compile

Sample build.sh wasn't accounting for targeting different FCL correctly.
That is, when passing "net40" to the -sdk option, it would use the
default -sdk:4 and -langversion:6. These don't necessarily match with
what is installed on a machine with only .NET 4.0 (which is our targeted
use case here).

To resolve, we need to define another version-specific value for passing
to the mcs -sdk option (see man mcs for details).

This option currently isn't overridable in the client codegen class.
Also, langversion is set specifically to the version of C# available to
the targeted SDK version. If there is need, we may extend this to
something like:

langversion=${MCS_LANG_VERSION:-6}

To allow users to run as:

   env MCS_LANG_VERSION=5 sh build.sh

I haven't done this because I doubt there's much of a use case via this
script. I'm assuming most consumers will build via IDE or MSBuild.

* [csharp] Revert bin/csharp-petstore.sh to 3.5

* [csharp] Regenerate .NET 3.5 sample

* [csharp] Resolve nuget issue with existing files

* [csharp] Update -all.sh, regenerate samples
2017-11-15 22:36:37 +08:00
wing328
f34aca62f6 skip "all" shell script 2017-11-12 22:42:02 +08:00
Tristan Sloughter
b9651e5775 WIP: initial commit for Erlang client generator (#6502)
* WIP: initial commit for Erlang client generator

* add models types and function type specs

* fix type specs when models are the type and support QS lists

* make method lowercase in postprocessoperations

* add model encode function

* add erlang client sample

* add windows client sample script

* proper return type spec and handle return error messages
2017-11-12 22:02:05 +08:00
afrolovsky
9a44512d03 @JsonProperty annotation for jaxrs-spec server model classes (#6911) (#6916) 2017-11-09 21:46:26 +08:00
Charles Capps
c2eb53ab1d [Java] Templates to support google-api-client library (#6838)
* Add support for the google-api-client

* When there's no return type, just return (no parsing the response)

* Update the deserialization to use a Jackson typeref.

* Delete the auth mustache files as we don't need them

* Stop generating unneeded auth files; get SBT/gradle working with the generated module

* Add builder-style methods to the google-api-client ApiClient for getting API instances

* Update the README to reflect the new client library option

* Generated overloaded methods to send query params as a Map<String, Object>

* Add files for Sample codes

* Add type in angle brackets to support Java 6

* Required query params must be added to the Map of params. Update sample code.

* Use explicit types instead of diamonds to support Java6 in one more place.

* Clean up javadoc warnings in generated code / remove pointless return statements

* Clean up extra newlines in generated code
2017-11-03 18:46:07 +08:00
wing328
1c19891db3 make nancyfx-petstore-server-async.sh executable 2017-11-02 14:04:12 +08:00
craffael
8fec429158 [NancyFx] Support Async (#6755)
* add support for async routes/endpoints

you can now set --optional-properties async=true to generate
a nancyfx server stub that uses asynchronous programming.

(cherry picked from commit 126869cb0b967e8063417e11993cf6326ce8ffd4)

* add nancyfx-petstore-server-async.sh to generate sample of async nancyfx.

* Rename async => asyncServer

* update bin/nancyfx-petstore-server-async.sh

* rename async => asyncServer in api.mustache + small bugfix

* run ./bin/nancyfx-petstore-server.sh and ./bin/nancyfx-petstore-server-async.sh

* remove additional new line in api.mustache + add space after if

* run ./bin/nancyfx-petstore-server.sh and ./bin/nancyfx-petstore-server-async.sh
2017-11-01 22:50:49 +08:00
ehyche
95ef1bf62e Swift3: properly percent-escape path parameters (#6705)
* Add addiitional files from upstream

* Remove mis-added files

* Swift3: Properly percent-escape path parameters

This change fixes the following issue:

https://github.com/swagger-api/swagger-codegen/issues/6400

The problem was that path parameters were not properly percent-escaped before being placed into the URL path. This leads to creation of an invalid URL, which then fails.

So therefore, in the API template where path parameters are handled, we propertly percent escape them, using the characters which are allowed in URL paths.

In addition to this template change, then this PR includes the following changes:

1. Resulting changes in all generated code due to the above template change.
2. I added the objcCompatible run to the swift3-petstore-all.sh so that I could re-generated all of the generated code with a single script.
3. I added a unit test in UserAPITests.swift which verifies that paths are properly escaped.
4. In order to make the unit test work, then I needed access to RequestBuilder<T>.URLString to verify that the path was properly escaped. However, RequestBuilder<T>.URLString had "internal" access control so it was inaccessible from the unit test. So therefore, I made four contants in RequestBuilder<T> to be public. This should not harm anything, since they are constants ("let's") and cannot be changed from the outside of the class after initialization.
5. There were also some stray changes which look like they were caused by having not run bin/swift3-petstore-all.sh in a while.
2017-10-30 15:40:00 +08:00
wing328
cab4fc0fed add support for csharp net40 (#6792) 2017-10-27 22:47:02 +08:00
Keni Steward
f7471add70 Fixed spacing in model.mustache (#6788)
* Added v4/v4.3 to typescript-angular-petsotre-all and renamed from angular2 to angular

* refactored typescript-angular-petstore-all.sh

* changed profile id for typescript-angularjs to properly have angularjs instead of just angular.

* Spacing at end of model template

* Corrected backwards compatible enum typing
2017-10-24 10:42:03 +08:00
naelrashdeen
b034e4446a [PHP][Symfony] Enhancements (#6615)
* Removed commented code

* Input validation is now supported as strict JSON validation

* [PHP][Symfony] Improve the implementation
Closes #6614

* Generated code is tested to assure it compiles and updated README to dynamically load dependencies via composer

* Updated shell script because shippable tests were failing
2017-10-23 22:50:56 +08:00
wing328
f0b7daeec6 [Rust] rename rust2 to rust-server (#6747)
* rename rust2 to rust-server

* update rust-server batch file to use petstore test spec
2017-10-19 20:17:08 +08:00
Benjamin Gill
1d89ab6e08 [New Generator] Rust API client/server generator (#6613)
* Rust API client/server generator

* `Future::boxed()` has been deprecated - replace with `Box::new(...)`

* rebasing to rust

* MMMLS211 use empty vec over none

* MMMLS211 rebuild after merge from rust

* MMMLS211 YAML array examples not wrapped in Some()

* MMMLS211 Array parameters bad mustache fix

* MMMLS211 don't parse map containers

* MMMLS211 Tidy container types

* MMMLS-211 rebuild example

* MMMLS211 mvn rebuild

* Percent-decode parameters contained in the path

* Produce warnings when unknown fields are present

We still accept unknown fields and discard them. However, to improve
diagnosability, we now write a warning log and return a `Warning`
header.

Note that this is server-only

* Markup

* MMMLS211: Make optional arrays Options again

* 211 markups

* Temporary attempt at tweaking Cow ownership tweak while merging changes from rust branch

* Remove to_string call while parsing path parameters, which requires definining a temporary var in a block because rust can't tell where a Cow reference gets dropped

* Fix rustfmt to the correct version

* Fix rustfmt to the correct version

* Add more response information to ApiError in client

* Re-add missing brace

* Code review markups

* Allow converting out of wrapper types

* Store arrays in new-types too

* Use a new hyper_client every request

* Add vec-like traits to array types

* Xml support - new branch

* Moved conversion from serde_xml_rs::Error to ApiError from swagger-rs to client code until upstream PR is accepted

* MMSUB-172 Don't set Content-Type when there's no body.

If we don't have a body we've serialized, then don't declare
any content type for the nonexistent body.

This is really important for 204 No Content responses, but it's
also morally important for all other non-bodied responses.

* MMSUB-172 Move to swagger 0.6.

* Manually implement debug for the client

* Allow `Context` to be bound to `Api`, and not passed on every function call

* Support "." in parameter names

* Support generate's "--reserved-words-mappings" option

* Support "." in parameter names

* Support generate's "--reserved-words-mappings" option
2017-10-19 17:37:02 +08:00
wing328
7f9ae63880 add resteasy-all shell script 2017-10-18 10:39:34 +08:00
wing328
c783ec1d41 update all petstore security samples 2017-10-18 10:10:44 +08:00
Taylor Brown
488aa989bf Adding a new Scala client codegen (#6572)
* Adding a Scalaz codegen client

* Fixing imports and removing commented code

* Adding the bash file and updating the Pet store samples for Scalaz.

* Finalizing Scalaz generation so that it works for the Petstore.yaml

* Removing some unnecessary files and comments

* Removing some files that were accidentally generated for the wrong Scala
2017-10-16 22:07:57 +08:00
wing328
619c391be9 update python flask petstore samples 2017-10-16 11:48:13 +08:00
Esteban Marin
dc88ed99ae [angular-typescript] fix using form data (#6574)
* #6457: fix sending form params

* #6457: fix sending form params using files

* #6457: fix sending form params with files for angular 4.3

* #6457: generate samples

* #6457: [typescript-angular] fix form data submission in IE/Edge

* re-apply [typescript-angular] add customized encoder to use '+' char in query parameter #6306 (#6334)

* adapt for HttpClient: [typescript-angular] add customized encoder to use '+' char in query parameter #6306 (#6334)

* generate samples

* #6457: fix url parameter encoder imports for angular <4.3

* #6457: generate samples
2017-10-10 22:55:50 +08:00
Graham Johnson
1bdb104738 Add Serializable import to JaxRS-spec models if serializableModel is set (#6651) 2017-10-10 22:45:47 +08:00
jarlesat
8a7940f199 Issue 5431 Support jaxrs client api interfaces (#6412)
* Adds the ability to create code for an interface-based jaxrs client.

* Adds shell script and sample files for jaxrs-spec-interface

* rebase into adds shell

* Fixes bug in creation of Produces/Consumes in method annotation. Allows for instance "application/json; charset=utf-8"

* Fixes generated pom.xml

* Generate pom.xml by default

* Prettier output from api.mustache

* Fixes bug in mediatype, allowing charset-specification in swagger.yaml.

* Merges generation of interface-based jaxrs client/api into jaxrs-spec.

* Moves jaxrs-spec server interface to match location of jaxrs-spec server

* Makes Generated-annotation in genereated classes slightly prettier.
2017-10-08 15:28:12 +08:00