Commit Graph

3289 Commits

Author SHA1 Message Date
wing328
2e50a65a1c better handling of reserved words in models, operationId (#4620) 2017-01-22 17:41:35 +08:00
Tony Tam
7936cfc206 Merge pull request #4619 from swagger-api/issue-4618
Fix name mangling for JSON processing with QT5
2017-01-21 20:31:18 -08:00
wing328
5306b11b4a [java] Improve pom.xml to qualify for publishing to Maven central (#4616)
* [java] Attach Javadoc to artifact generation.

* [java] Attach source to artifact generation.

* [java] Add gpg signing to artifact publishing.

* [java] Add artifact URL to pom.xml .

* [java] Add artifact description to pom.xml .

* [java] Add artifact URL and description params to Jax RSS.

* [java] Add developer info to pom.xml .

* [java] Parameterise SCM info in generated pom.xml .

* [java] Move GPG signing to verify phase so that .asc files are uploaded during deploy phase.

* [java] Change GPG signing to be an optional via Maven profile. Can't assume all users will perform a release/deploy from an environment with correct GPG key/pass.

* update java petstore smaples

* camelize tag name, remove invalid file

* add back missing files for okhttp-gson

* fix docstring in java feign client

* fix docstring with various java api clients
2017-01-22 11:40:59 +08:00
Tony Tam
62caf7dac5 rebuilt samples 2017-01-21 16:33:14 -08:00
wing328
4d19fb6b2f hide generation timestamp for perl (#4614) 2017-01-21 19:12:51 +08:00
Damien Pontifex
1f0ecb5180 Updating typescript-angular to export api classes (#4589)
* Updating typescript-angular to export api classes

* Fixing tsconfig for typescript-angular test case
2017-01-21 17:02:11 +08:00
wing328
9a8ede4189 update php sample 2017-01-19 21:22:20 +08:00
Albert Morlan
ccb3385081 Set embedded templates directory when generating Javascript code (#4585) 2017-01-19 18:07:58 +08:00
Jonathan Leitschuh
36c3fa05e0 Allows for generation of spring controller code using the delegate pattern (#4439)
* Allows for generation of spring conroller code using the decorator pattern

* Change Decorator to Delegate in spring codegen
2017-01-19 17:58:39 +08:00
jfiala
6f4e82dc03 [Jaxrs-Resteasy] Add beanvalidation annotations (#4506)
* add beanvalidation to jaxrs-resteasy #4091

* replace tabs
2017-01-19 17:45:17 +08:00
wing328
157fcbc4aa fix invalid spec, update petstore samples (jaxrs, ruby) 2017-01-19 16:54:16 +08:00
wing328
a8afaa8f77 remove /r from templates 2017-01-19 15:53:51 +08:00
wing328
ccecc2aac0 new file for jaxrs jersey1 2017-01-19 15:31:24 +08:00
wing328
1ae60b1f61 Merge branch 'jaxrs_jersey_beanval2' of https://github.com/jfiala/swagger-codegen into jfiala-jaxrs_jersey_beanval2 2017-01-19 15:30:54 +08:00
jfiala
ee7f9fc56c [Jaxrs] Add beanvalidation annotations and fix outer Enums (#4492)
* add beanvalidation to jaxrs and add support for outer Enums #4091

* cleanup Codegen #4091

* cleanup samples #4091

* cleanup tabs

* updated samples to petstore.yaml (before petstore.json)

* add support for DecimalMin/DecimalMax/Min/Max #4091

* add check for hideGenerationTimestamp #4091

* replace tabs

* correct line endings to lf
2017-01-19 15:13:11 +08:00
Jim Schubert
da6b57f3fc [aspnetcore] use default in model constructors, supports enums (#4573)
* [aspnetcore] Use default rather than null in ctor

See original issue #3608

This adds same model constructor logic to aspnetcore as what was added
to csharp generator by PR #4145.

This doesn't include NancyFX because model construction relies more on
object initialization in that generator.

* [aspnetcore] ctor defaults + enum support

This follows up to #4145, and modifies model constructors to use
default(x) instead of initializing to nulls. default(x) works in all
cases using intuitive default values it is intended to support.

Example:

  csharp> public enum Color { RED = -1, BLUE = 0, GREEN }
  csharp> var color = default(Color)
  csharp> color
  BLUE

In the above example, The default of BLUE=0 is expected. For nullable
enums, this would be null as a default.

The aspnetcore generated code is also updated to support enums and
nested enums to account for changed to the petstore.yaml used to
generate the sample.

* [aspnetcore] Regenerate sample
2017-01-18 16:43:12 +08:00
Dan Mikita
0a559f0dd2 Add support for modifier within the Jaxb XMLElement annotation (#4433)
* fixes #4432 Adding support for the  modifier within the Jaxb XMLElement annotation. Updated README with JaxbAnnotations configuration option.

* #4432 Running the Petstore files
2017-01-17 15:26:30 +08:00
Damien Pontifex
55443daebc Extends obj using Object.assign (#4562) 2017-01-17 10:52:33 +08:00
Brian Shamblen
713e6bba24 [html2] Add python and perl examples (#4575)
Fixes #4358
2017-01-17 10:35:55 +08:00
Articus
4001503e63 PHP server generator ze-ph (Zend Expressive + Path Handler) (#4559)
* Server generator ze-ph (Zend Expressive + Path Handler)

* Command line scripts for new ze-ph generator
2017-01-16 01:05:04 +08:00
Tomek Cejner
f0cddd21fd Swift3 Clener template of client methods (#4552)
* Swift3 template properly uploads files, making mustache template little cleaner

* [swift3] moved URL parameter encoder helper function to APIHelper.swift

* Swift3 - regenerated sample
2017-01-16 01:01:50 +08:00
Gene Chang
95987fc132 Added support for datetime query parameters in cpprest (#4556)
* Added support for datetime query parameters in cpprest

Signed-off-by: Gene Chang <gene.chang@anyconnect.com>

* Update petstore sample app for cpprest using bin/cpprest-petstore.sh

Signed-off-by: Gene Chang <gene.chang@anyconnect.com>
2017-01-14 00:07:06 +08:00
Richard Naeve
2e7e25801d Issue 4531 (#4539)
* ISSUE-4531
Arrays are now serialized according to the different collection formats. All api classes are also exported in a const array to make handling of large api libraries easier.

* Added petstore samples

* Fixed indentations and coding style
2017-01-13 23:41:54 +08:00
Bartek Kryza
0fb154e9a2 [Bash] Bash client script generator (#4541)
* Initial commit

* Remormatted petstore tests

* Added Bash codegen to main README.md

* Added bash to integration tests

* Fixed stdin detection in generated script

* Added back ruby module
2017-01-12 16:48:25 +08:00
Pete Holiday
2e4de0ca1e Remove unnecessary call to setHost() in the constructor (#4525)
* Remove unnecessary call to setHost() in the constructor

The default host will be automatically set on the client by the ApiClient constructor.

* Updated PHP API Classes corresponding to template updates in #4525.

* Additional changes generated by the petstore update unrelated to #4525, but seem to have not been included yet.

* Add test to prevent regressions of #4525
2017-01-12 16:17:17 +08:00
Krisztian Lachata
c1f854f7da Overriden objectmapper wasn't used in deserialisation (Scala) issue #4532 (#4534)
* Overriden objectmapper wasn't used in deserialisation

Use previously provided apiInvoker instead of creating a instance at deserialision stage

* update scala sample
2017-01-11 00:27:48 +08:00
Yuta HIGUCHI
de5ea8a9d6 [JAX-RS/jersey2] Fix for incorrect JSON field name capitalization (#4458)
* Fix for all capital field name

* Cosmetic: remove trailing spaces

* Adding ./bin/jaxrs-petstore-server.sh output.
2017-01-10 23:37:25 +08:00
Tomek Cejner
1e8c7180c5 [swift3] allow POST with both body and query parameters (#4490)
* [swift3] allow POST with both body and query parameters

* Correctly support non-string and optional query parameters.
2017-01-07 22:40:07 +08:00
Kevin Locke
409e1a504c Fix Gson parsing of Joda DateTime without millis (#4473)
* Fix Gson parsing of Joda DateTime without millis

The DateTimeFormatter returned by ISODateTimeFormat.dateTime() only
parses dates with millisecond values, and throws
IllegalArgumentException when milliseconds are not present.  The
date-time construct from RFC 3339 Section 5.6 referenced by the
Swagger/OpenAPI spec allows fractional second values to be omitted.
This results in valid date-time values being rejected by the generated
code.

This commit fixes the problem by using .dateOptionalTimeParser() for
parsing, which correctly handles date-time values without fractional
seconds.  A previous version of this commit used .dateTimeParser(),
which accepted a time without a date and was considered too liberal.
Note that .dateTime() must still be used for printing, which is not
supported by .dateTimeParser().

Signed-off-by: Kevin Locke <kevin@kevinlocke.name>

* Fix akka-scala date-time parser with Joda

As in the previous commit, which fixed Java generators,
ISOISODateTimeFormat.dateOptionalTimeParser() should be used for
date-time parsing and ISOISODateTimeFormat.dateTime() for printing.
Apply the same change to akka-scala.

Signed-off-by: Kevin Locke <kevin@kevinlocke.name>
2017-01-07 21:56:14 +08:00
J. Fiala
6b17b92bb6 add check for isInteger (integer/decimal) 2017-01-06 16:46:59 +01:00
J. Fiala
5b532fd10e update language jaxrs (Jersey2) and samples 2017-01-06 15:16:39 +01:00
J. Fiala
dde24eb9c2 update jaxrs jersey1 templates and sample output #4091 2017-01-06 15:10:40 +01:00
Frédéric Rodrigo
c0f1716fe7 [html2] Open the description field that contains the description and required switch, in place of only show the field type by default (#4489) 2017-01-06 19:40:06 +08:00
Kevin Locke
df0c54d043 Support the empty string as an enumeration value (#4450)
When a string enumeration has the empty string as one of its available
values, the generated code for many languages is invalid because the
empty string can not be used as an identifier.  As with numbers and
symbols, provide a mapping to an English name which can be used as a
replacement.  In this case, "empty" for the empty string/empty value.

Signed-off-by: Kevin Locke <kevin@kevinlocke.name>
2017-01-06 19:30:47 +08:00
Simon Morris
aa1dc0fdd2 Updated Nancy from 1.4.1 to 1.4.3 (#4482) 2017-01-06 01:09:32 +08:00
Brian Shamblen
b224474a43 Fixes #4481 (#4493) 2017-01-06 01:03:18 +08:00
Takuro Wada
6a080d3a0c add safe argument to quote method in python template to avoid unquoted parameter in path parameter (#4457)
Closes #4391
2017-01-06 00:55:55 +08:00
Johannes Fiala
1a1d0aebc8 add beanvalidation to jersey1 and jersey2 #4091 2017-01-04 17:36:28 +01:00
wing328
aed21bba73 better code format for nodejs server (#4411) 2016-12-23 02:05:10 +08:00
Jun Mukai
27f1b6ee98 Introduce NodeJS codegen for Google Cloud Functions. (#4406)
* Another approach: extending NodeJS server to support GCF.

This does not add a new language, but adding some client options
to support Google Cloud Functions (GCF).

* Add URLs for how to deploy the generated code.

Adds the client options help message and the README.md file.
2016-12-22 23:11:52 +08:00
Anton Vasin
41701a15b0 Fix typo. Creactor -> Creator (#4443) 2016-12-22 23:08:06 +08:00
Ezekiel Templin
e189388371 [Ruby] Add Rakefile and Gemfile (#4448)
* Add Rakefile, Gemfile, and update client generator

* Update sample
2016-12-22 21:37:12 +08:00
wing328
204c05442d [ObjC] minor code style enhancement to ObjC API client (#4437)
* minor code style enhancement to objc api client

* update petstore sample

* remove datatype from docstring (objc)
2016-12-20 19:13:03 +08:00
wing328
4870cf4ab1 Merge branch 'Ignore_Javatypes_On_ModelPre_and_Suffixes' of https://github.com/d0x/swagger-codegen into d0x-Ignore_Javatypes_On_ModelPre_and_Suffixes 2016-12-20 17:46:52 +08:00
Vincent Giersch
7f980cd9dd fix(swift3): lowercase enum value before checking reserved words (#4357)
Signed-off-by: Vincent Giersch <vincent@giersch.fr>
2016-12-20 16:35:03 +08:00
Greg Rashkevitch
36b97c22af Fix warning docs return type (#4429)
* Objective C: Fix compilation warnings

If returnType is not provided, set the @return as void

* Run the `./bin/objc-petstore.sh`

* OBJECTIVE C SDK: Remove the return line for methods that return nothing all together

* obj-c sdk: Updated petstore sample
2016-12-20 16:10:47 +08:00
Johan Nystrom
ff70105484 Fix CSV collection parameter issues for scalatra server (#4426)
* Fix scalatra handling of CSV query parameters

* Ran petstore for scalatra server
2016-12-20 16:02:45 +08:00
wing328
43ff85db76 Merge pull request #4421 from wing328/fix_isfile_boolean
Fix `isPrimitiveType` for file property
2016-12-20 15:48:55 +08:00
wing328
7fd895b37d fix isPrimitiveType for file 2016-12-18 19:02:26 +08:00
wing328
8ccf9828e4 [Python] add hasConsumes/hasProduces to Python API template (#4419)
* add hasConsumes/hasProduces to python api template

* remove unused code in python

* fix isFile in the api doc (python)
2016-12-18 17:20:10 +08:00