Commit Graph

725 Commits

Author SHA1 Message Date
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
William Cheng
854b5012be
fix NPE when host is undefined (#7633) 2018-02-10 17:11:11 +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
wing328
5d92717dc9 update jaxrs to listent at port 10080 2018-01-30 00:23:08 +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
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
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
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
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
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
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
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
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
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
Euan Kemp
027df610b1 [Rust] Handle error response statuses (#6865)
* [Rust] Consider error statuscodes to be errors

* [Rust] Introduce 'ApiError' type for 4xx/5xx resp

This updates the previous commit which added an 'ErrorStatus' variant to
an 'ApiError' variant.

It does not specialize the error to the specific possible error
responses yet, rather returning a 'serde_json::Value' for any case.

This will lose any error messages which cannot be parsed as json and
instead return a json-parse error.

A future change should update the generated signatures such that the
returned future's error type is specialized to the specific errors that
may be returned by that api (and possibly a catchall json::Value still).

* [Rust] Regenerate petstore samples

* [Rust] Add error example to petstore sample
2018-01-15 11:38:11 +08:00
magnolia
d5c355a596 [Scalatra] Updated the version of Scalatra to the latest (2.6.2) (#7393)
* Updated the version of Scalatra to the latest (2.6.2)

 - Updated Scalatra 2.6.2 (latest)
 - Updated Scala 2.12.4
 - Updated sbt 1.1.0
 - Reduced dependent artifacts to a minimum
 - Cleaned up build.sbt
 - Changed the package name from client to server
 - Set log output (logback)
 - Updated web.xml for servlet 3.1

* rename package 'com.wordnik' -> 'io.swagger'

* Added rolling file appender to logback.xml
2018-01-14 18:11:37 +08:00
wing328
97298bdb03 Merge branch '2.4.0' of https://github.com/swagger-api/swagger-codegen into 2.4.0 2018-01-14 17:14:43 +08:00
sneumann
9e06f7063f Fix assignment of new object instance to variable (#7379)
* #7359 Fix - use reflection to instantiate non-generated class (#7360)

* add tests for java vertx petstore

* add swagger example to README.md (#7368)

* Fix assignment of new object instance to variable

Fixes `Error in foobar$fromJSONString(s) : object 'CategoryObject' not found`
Discussion in https://github.com/swagger-api/swagger-codegen/issues/6520#issuecomment-357132746 ,
thanks @wing328 for encouraging.
2018-01-14 17:14:35 +08:00
antihax
72abb20f2e [Go] Fix operation files clobbering model files. [2.4.0] (#7337)
* Prevent operation files clobbering model files.

* Update Tests
2018-01-14 17:00:17 +08:00
wing328
73c338be58 Merge remote-tracking branch 'origin/master' into 2.4.0 2018-01-13 15:54:41 +08:00
William Cheng
8aef689d1b
[Java] allow setting boolean getter (is, has, get) in templates (#7344)
* allow setting java boolean getter (is, has, get) in templates

* update msf4j boolean getter

* update jaxrs-spec boolean handler

* update jaxrs boolean getter

* update reasteasy, spring, cxf boolean getter

* update inflector boolean getter

* update java play boolean getter

* update java boolean getter

* update spring samples
2018-01-13 15:19:02 +08:00
wing328
50b599719d add tests for java vertx petstore 2018-01-11 16:36:23 +08:00
ccozzolino
247fbd4435 #7359 Fix - use reflection to instantiate non-generated class (#7360) 2018-01-11 16:31:37 +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
16e3226c8a Merge remote-tracking branch 'origin/master' into 2.4.0 2018-01-08 18:01:20 +08:00
Mehdi Jouan
c7f12d6c2d [Spring][Java] fix support of long values for @Max and @Min annotations (#7227)
* add support of long values for @Max and @Min annotations

* run shell scripts for java and spring

* fix import issue after running shell script
2018-01-08 00:22:06 +08:00
Sunrin SHIMURA
f5adbec1ff [Rust-Server] Use string literal based mime initialization (#7212)
* Use string literal based mime initialization to avoid invalid token error

* canonicalize mimetypes before checking
2018-01-08 00:00:12 +08:00
ccozzolino
d9745962be [Java:vertx] Initialize router in init method and re-use router member to create S… (#7234)
* Initialize router in init method and re-use router member to create SwaggerRouter

* Added generated samples for 7320 fix

* Fixed alignment to 4 spaces for 7320 fix
2018-01-07 23:37:37 +08:00
wing328
007974e3de Merge remote-tracking branch 'origin/master' into 2.4.0 2018-01-07 23:13:24 +08:00
craffael
9a284776d8 [Java] Fix serialization of the discriminator field when using GSON (#7075)
* set discriminator on object construction...

* regenerate all java samples

* run bin/java-msf4j-petstore-server.sh

* remove extra newline
2018-01-07 23:10:32 +08:00
Dennis Kieselhorst
ee5709177a [Java] update CXF to latest release (3.2.1) (#7284)
* update CXF to latest release (3.2.1)

* update CXF to latest release (3.2.1) - samples update
2018-01-07 11:43:34 +08:00
Ben Wells
7479fc5361 Generate swagger yaml for go client (#7281) 2018-01-07 11:37:40 +08:00
Jean-François Côté
3465f2918e Fix a regression bug that was introduce in a recent commit. Removed the tabs that were causing error in Play Framework (#7241) 2018-01-07 10:48:49 +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
Sunrin SHIMURA
7d96f61e5d [Rust-Server] use status codes as the variants of the response enums instead of descriptions (#7125)
* use status codes in the variants of the responses instead of message

* samples

* add missing {{code}}

* use human friendly idents if possible

* generate samples

* salvage an oversight
2017-12-19 14:40:35 +08:00
Ben Wells
6349e79a59 Fix typo in Petstore yaml (#7195) 2017-12-18 12:30:57 +08:00
Ben Wells
d25341d58d Output models for go-server #3851 (#7188)
* Output swagger models.

Fix route verbs and formatting

* Remove backup files

* Make postProcessOperations consistent with go client
2017-12-17 21:55:20 +08:00
Christophe Bornet
79326399ef Fix starting springboot server from IDE (#7184) 2017-12-16 11:19:31 +08:00
elion
20ace869b7 Issue 7151 2.3.0 (#7181)
* Removed redundant version declaration. Upgraded Spring boot dependency version.

* Update samples
2017-12-15 21:04:00 +08:00