Commit Graph

8009 Commits

Author SHA1 Message Date
wing328
3b3ded0290 fix bash test package name (#4566) 2017-01-16 19:09:25 +08:00
wing328
410f6d74c8 add Articus as php expressive creator 2017-01-16 16:16:14 +08:00
wing328
0ea506e970 Add http://htc-cs.com 2017-01-16 13:22:53 +08:00
Jim Schubert
d97b1da90c [csharp] Support internal access of generated code (#4560)
Allows users to specify 'nonPublicApi' additional property (and C#
client CLI switch) to reduce visibility of classes created by the
generator. This includes API and Models as well as supporting code like
ApiClient and other infrastructure.

The requirement is to support codegen generated code to be embedded
within other applications where the generated code is not intended to be
publicly consumable or publicy exposed. An example would be an SDK which
internally consumes an API via the generated code; we wouldn't want the
internal API implementation exposed as part of that SDK.

Reducing visibility of the classes effectively makes the entire
implementation internal, regardless of the public modifier on methods or
static members. To fully make all members internal it would require
explicit interface implementation, which is not ideal.

see #4401
2017-01-16 01:19:10 +08:00
Jim Schubert
23c5376ed6 [csharp] Fix interfacePrefix sensitivity + default (#4561)
After merging the fix with another C# change, noticed case sensitivity
issue for the true/false checks. Also noticed my original implementation
wasn't setting the default I- prefix as intended. This commit resolves
those three issues.
2017-01-16 01:12:03 +08:00
wing328
2d8715f42c Minor update to ze-ph batch script
- use petstore-with-fake-endpoints-models-for-testing.yaml
- output to samples\server\petstore\ze-ph
2017-01-16 01:10:35 +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
Jim Schubert
663b471d1a [nancyfx/csharp] Customize interface prefix (#4557)
Per #4486, this allows user to specify the use of a standard or custom
prefix for interfaces. For C# based languages, this follows Microsoft's
Framework Design Guidelines and uses an I- prefix. However, to avoid
breaking changes with existing nancyfx generated code, the default is
unset.

The option supports true, false, or a custom prefix.
2017-01-15 23:35:43 +08:00
eamon316
d7e6a3da6a Add a useTags flag to allow tags to be used to generate interface / controller classnames (#4396) 2017-01-15 23:25:30 +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
Joseph Moore
d40f7a41b6 Add triple-mustache to all instances of vendorExtensions.extraAnnotation. (#4553)
This covers the usages that weren't fixed in #3825

Triple mustache is required because annotations may contain chars like
"=" that would be mistakenly encoded.
2017-01-13 23:01:15 +08:00
wing328
39b76ece22 add space before C# in readme 2017-01-13 00:30:56 +08:00
eblis
af4319015e When reading mustache template files assume UTF-8 encoding, fixes #4544. (#4545) 2017-01-13 00:11:07 +08:00
wing328
9bb58d2040 add git tip 2017-01-12 23:36:43 +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
wing328
d7eeb069f2 update 2016 to 2017 2017-01-11 15:55:51 +08:00
J. Fiala
a6b0518bf0 replace tabs 2017-01-10 18:03:51 +01: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
wing328
4d4af71446 [CI] Add scripts to detect carriage return and tab (#4526)
* add script to detect carriage return

* add check for generator as well

* add fail fast to travis config

* remove tab

* move scripts under bin/utils

* remove carriage return

* move scripts to bin/utils
2017-01-09 18:29:41 +08:00
Jeff Haynes
380bed15d3 Issue 4244 - Add x-discriminator-value (#4252)
* Fixes for issue 4226. Detects and warns about more than one inline object; sets discriminator on CodegenModel; Adds templates to other Java languages
Changes to be committed:
	modified:   modules/swagger-codegen/src/main/java/io/swagger/codegen/DefaultCodegen.java
	modified:   modules/swagger-codegen/src/main/resources/Java/typeInfoAnnotation.mustache
	new file:   modules/swagger-codegen/src/main/resources/JavaInflector/typeInfoAnnotation.mustache
	new file:   modules/swagger-codegen/src/main/resources/JavaJaxRS/typeInfoAnnotation.mustache
	new file:   modules/swagger-codegen/src/main/resources/JavaSpring/typeInfoAnnotation.mustache

* Add vendor extension for x-discriminator-value
Changes to be committed:
	modified:   modules/swagger-codegen/src/main/resources/Java/typeInfoAnnotation.mustache
	modified:   modules/swagger-codegen/src/main/resources/JavaInflector/typeInfoAnnotation.mustache
	modified:   modules/swagger-codegen/src/main/resources/JavaJaxRS/typeInfoAnnotation.mustache
	modified:   modules/swagger-codegen/src/main/resources/JavaSpring/typeInfoAnnotation.mustache

* Add "visible = true" to @JsonTypeInfo jackson annotations for Java languages
Changes to be committed:
modified:   modules/swagger-codegen/src/main/resources/Java/typeInfoAnnotation.mustache
modified:   modules/swagger-codegen/src/main/resources/JavaInflector/typeInfoAnnotation.mustache
modified:   modules/swagger-codegen/src/main/resources/JavaJaxRS/typeInfoAnnotation.mustache
modified:   modules/swagger-codegen/src/main/resources/JavaSpring/typeInfoAnnotation.mustache
2017-01-09 18:28:27 +08:00
Alex Nolasco
26ead9b58f Issue 4416 (Assist escapeReservedWord with custom mappings) (#4480)
* Preliminary implementation for issue-4416

* Updated README.md with  reserved-words-mappings  parameter.
2017-01-09 18:22:25 +08:00
Sreenidhi Sreesha
81b5b78fc2 Enable support for vendor extensions in CodegenResponse. (#4517) 2017-01-08 17:58:07 +08:00
Tony Tam
ccf6f020d9 Merge pull request #4521 from swagger-api/issue-4478
updated version
2017-01-07 17:37:07 -08:00
Tony Tam
69b1e50a95 updated version 2017-01-07 17:08:04 -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
24f486164a add test for options #4091 2017-01-06 16:18:14 +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
JasonNorth
5686109cc9 Allow templates to use maxItems and minItems for Arrays (#4309)
Issue 3925
2017-01-06 19:57:28 +08: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
Brian Voss
43ab14b200 Adding Curl connect timeout configuration to PHP generation templates (#4500) 2017-01-06 19:14:39 +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
wing328
42a0491696 add https://www.fastly.com/ 2017-01-05 16:30:04 +08:00
Johannes Fiala
1a1d0aebc8 add beanvalidation to jersey1 and jersey2 #4091 2017-01-04 17:36:28 +01:00
Ashish Jain
3f66e27a92 Only updated README.md file (#4485)
Added reference to snapcx website, as we provide swagger 2.0 specs public APIs.
2017-01-04 22:47:14 +08:00
weiyang
6b0b7a1587 [dockerfile] Replace 'maven:3.3-jdk-7' with 'maven:3-jdk-7-alpine'
Signed-off-by: weiyang <weiyang.ones@gmail.com>
2017-01-04 15:06:08 +08:00
Jim Schubert
cb9a1b3b53 [csharp] Use default rather than null in ctor (#4145) 2017-01-03 18:31:26 +08:00
Jim Schubert
c94e18abd8 [codegen ignore] normalize path separator for Windows, add *.ext tests (#4476)
* [codegen ignore] Fix windows paths for ignore processing

* [codegen ignore] Add missing glob rule tests
2017-01-03 16:56:50 +08:00
Tony Tam
0252d1a534 Update to latest swagger-core, parser versions (#4472)
* updated to release versions

* fixed defaultValue objects to strings

* added top-level jackson version

* added missing dependency, removed from swagger-core
2017-01-03 16:41:16 +08:00
wing328
fb3d4e61bb roll back to latest working version of swagger paresr for codegen 2016-12-29 23:45:59 +08:00
mkarnik
45002ec1fd [JAX-RS RESTEasy][issue #4447] Updated RESTEasy petstore samples 2016-12-23 10:37:17 +01:00