Commit Graph

9842 Commits

Author SHA1 Message Date
William Cheng
a4531b695e
use python client toOperationId logic (#7035) 2017-11-23 17:41:50 +08:00
Oliver Hoffmann
10107ac7ec Upgrade to resteasy-jackson2-provider (#7017)
* Upgrade to resteasy-jackson2-provider

* Upgrade to resteasy-jackson2-provider
2017-11-23 17:35:49 +08:00
Ramzi Maalej
ebfdc05199 [Akka-Scala] Add readme file (#7027)
* Add readme file

* Add readme file to Scala generator
2017-11-23 16:46:35 +08:00
Ken Geis
5ea3499188 fix swager typo (#7028) 2017-11-23 12:03:52 +08:00
Lukasz Konopski
0f92baeb04 Inheritance support java client okhttp gson (#6636)
* #6636 inheritance support for java client okhttp with gson parser

* #6636 generate samples
2017-11-22 21:28:13 +08:00
Daiki Matsudate
ed705e9d70 add link to d-date's presentation (#7021) 2017-11-22 17:06:22 +08:00
Guillermo Pastor
65bb761952 Fix: Resolve problem with UUID class not found if there is almost one parameter with format as uuid (#6617)
* feat: java.util.UUID if parameter is UUID

* solve git problem
2017-11-22 16:54:11 +08:00
François Rosé
acefe3f385 [CppRest] Add Object and fix modelbase includes (#6905)
* Objects are represented by `ModelBase.h`, not `Object.h` which does not exist.

* Use correct relative imports for files in the `model` and `api` folders.

* [CppRest] Update cpprest petstore client sample.

* Implement `Object` class to support arbitrary types.

* [CppRest] Update cpprest petstore client sample.

* [CppRest] Add newly generated files to petstore client sample.

* [CppRest] Add `Object` to CMakeLists.
2017-11-22 12:19:13 +08:00
François Rosé
d9cea0f97e [CppRest] Support optional parameters (#6959)
* Use boost::optional for parameters that are not required.

* Update sample petstore client.
2017-11-22 12:13:05 +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
William Cheng
5e76b22ae8
add gmkumar2005 as scala lagom template creator 2017-11-21 16:37:42 +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
Kenny Jones
63fce58931 [Java][Spring] Resolve serialization warning from RFC3339DateFormat (#6960)
Adds `serialVersionUID` to RFC3339DateFormat.java to avoid Java warning.
2017-11-21 12:14:02 +08:00
Daiki Matsudate
a5e4abe5ec [Swift4]Update templates for swift 4 (#6921)
* update versions of dependencies on swift4 and swift3

* change syntax for swift4

* run petstore script

* change enum case from UpperCamel to lowerCamel

* remove unneeded break statements

* avoid wrapping conditionals in parentheses

* avoid force casting

* run pod update on petstore/swift4/rxswift

* update project for swift 4

* run swift4-petstore-all.sh

* fix compile error

* avoid use iso8601 date strategy for encoder / decoder

* resolve file references
2017-11-21 11:33:52 +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
Hidenori Maehara
0c3688227a add my slide to README.md (#7006) 2017-11-21 10:30:25 +08:00
Jim Schubert
ebb96cbfb6 [docker] Update root Dockerfile (#6870) 2017-11-21 01:29:09 +08:00
topce
04ee374328 [TypeScript][Angular] fix problem with strict compilation (#6978)
* fix probelme with strict compilation

* commit generated files
2017-11-21 01:21:45 +08:00
wing328
404b526dbe update resttempalte java petstore samples 2017-11-21 00:48:39 +08:00
JacC510
181680b0af - fix duplicate problem (#6981)
* - fix duplicate problem

* style guide adjustment

* replace tab with 4-space

* replace tab with 4 -space
2017-11-21 00:42:19 +08:00
William Cheng
6476c0aa18
add @tsloughter to erlang tech committee 2017-11-19 00:04:37 +08:00
William Cheng
ec0da35b6c
regenerate package.json, tsconfig.json for ts node (#6987) 2017-11-18 21:05:19 +08:00
Peter Stuart
79bac2ca04 Fix typo. (#6991) 2017-11-18 15:48:02 +08:00
wing328
da1702db03 update petstore sample 2017-11-17 23:39:12 +08:00
Alex Goldring
9be12f9d03 Removed harmful content-type check (#6977)
https://github.com/swagger-api/swagger-codegen/issues/6226
2017-11-17 23:33:59 +08:00
shashank734
18e0b67903 Added Company using Sawgger in Readme.md (#6988)
Added company Thirdwatch.ai in Readme.md which is using swagger.
2017-11-17 20:52:37 +08:00
William Cheng
15bbb52b22
check for dot in path and throw exception if found (#6986) 2017-11-17 20:18:06 +08:00
Tomasz Prus
73cb68ee7b [python] fix tests, tornado ssl fix (#6968)
* fix: non-zero exit code if tests fail

* tests: use local petserver to run tests

* fix: non-zero exit code if tests fail

* tests: use local petserver to run tests

* fix: creating ssl context in old version of Python

* chore: remove unused target from Makefile

* doc: changes from upstream

* fix: tornado client raises NotImplementedError in older version of Python
2017-11-17 17:33:39 +08:00
wing328
c6ffbd38ad Merge branch 'master' of https://github.com/swagger-api/swagger-codegen 2017-11-16 17:10:16 +08:00
wing328
d04d280d1b update java petstore samples 2017-11-16 17:09:59 +08:00
William Cheng
0c0da42d33
Better instruction for Windows users 2017-11-16 17:08:16 +08:00
wing328
17bbb25ce4 Merge branch 'master' of https://github.com/swagger-api/swagger-codegen 2017-11-16 17:00:59 +08:00
Shuma Yoshioka
85b0d0ff78 [TypeScript][Node] Resolve errors for strict compile (#6933)
* [TypeScript][Node] Resolve TS7017 error

* Run `bin/typescript-node-petstore-all.sh`

* Run `bin/security/typescript-node.sh`

* Add `strict` option to ts-node config

* Run `bin/typescript-node-petstore-all.sh`

* Fix `strict` option syntax in typescript-node/tsconfig.mustache

* Sync tsconfig.json

* Sync package.json

* Delete typings.json

* Sync tsconfig.json

* Resolve TS2345 error

* Resolve TS2322 in integration-test (Delete non-effective codes)

* Add @types/rewire to test

* Resolve TS7017 errors

* Run `bin/typescript-node-petstore-all.sh`

* Run `bin/security/typescript-node.sh`
2017-11-16 17:00:48 +08:00
Ben Mordue
818ff8f245 Add readTimeout field (#6961) 2017-11-16 16:59:02 +08:00
William Cheng
372f16d28b
Revert "Docker image tags" (#6973)
* Revert "[csharp] clean boolean additional properties 6784 (#6899)"

This reverts commit 2c9f98ce38.

* Revert "[Swift4] Add throw to reserved words (#6952)"

This reverts commit 970de01bdf.

* Revert "add a docker build tag for pushing docker image instead of just latest (#6837)"

This reverts commit 4e482eef17.
2017-11-16 14:33:30 +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
d676cd12c9 Merge branch 'master' of https://github.com/swagger-api/swagger-codegen 2017-11-15 21:46:08 +08:00
Atanas Bozhkov
970de01bdf [Swift4] Add throw to reserved words (#6952)
* * Added `throw` to Swift4 Reserved words.

* * Regenerating Swift4 Petstore project
2017-11-15 21:45:30 +08:00
James Ebentier
4e482eef17 add a docker build tag for pushing docker image instead of just latest (#6837) 2017-11-15 21:37:26 +08:00
William Cheng
744c7d904a
remove spaces, empty lines from qt5cpp client (#6956) 2017-11-14 23:28:06 +08:00
Charles Capps
47f1865e69 [Java][google-api-client] Fix minor bugs in google api client (#6951)
* Fix minor bugs in google-api-client templates

* Update samples
2017-11-14 12:02:59 +08:00
Keni Steward
d719daab22 Updated swagger-ui wget url to https (#6954) 2017-11-14 11:24:50 +08:00
Dawid van Graan
5af788cb9f [Swift4] Allow for custom dateformatter to be used (#6672)
* Add a custom dateformat to be set

* Samples updated

* Update CodableHelper.swift

Change to correct format: decoder.dataDecodingStrategy = .base64

* Update CodableHelper.mustache

Add `decoder.dataDecodingStrategy = .base64` back

* Update CodableHelper.swift

Fix `decoder.dataDecodingStrategy = .base64`

* Update CodableHelper.swift

Fix `decoder.dataDecodingStrategy = .base64`
2017-11-13 22:15:43 +08:00
Jon Schoning
b3133a2d74 [haskell-http-client] fix bug when generating models-only (#6931) 2017-11-13 20:44:46 +08:00
wing328
473dfded21 fix typo: crediential => credential 2017-11-13 18:42:23 +08:00
William Cheng
dff463f2fc
minor typo fix 2017-11-13 18:35:47 +08:00
Jim Schubert
28e2fcee78 [csharp] fix enum serialization of first value (#6873)
* [csharp] Treat enum models consistently

C# works differently from most languages in that enums are not
considered objects. This means default(EnumType) will choose a default
of the first enum option. This isn't desirable because it breaks the
required = false functionality of swagger specs, which defines a
property which isn't required to exist in the message body.

Rather than force consumers to use enum values such as UNSPECIFIED, UNKNOWN,
NOT_SET, etc... we can treat enums as primitives. This means any
non-required enum will become Nullable<EnumType> regardless of whether
it is defined as an inline enum or a referenced enum model.

* Categorizing C# integration test for enums as general

* [csharp] Remove enum-ref integration test

* [csharp] Clean up general enum support integration test, validate different enum usage cases.

* [csharp][all] Assign one-based int to string enums

The EmitDefaultValue=false for string based enums will prevent the first
enum value from being serialized, because as 0 it is considered the
default.

This commit assigns an explicit numerical value to all non-integer
enums. This assignment has no effect on the
serialization/deserialization values, and only assigns the compiled
integer.

NOTE: This will have an effect of requiring recompilation of any code
that references the client/server models. This is because:

    public enum Pet { Available }

Source files referencing Pet.Available as defined above will have a
constant 0 in place of the enum value.

    public enum Pet { Available = 1 }

Source files referencing Pet.Available as defined above will have a
constant 1 in place of the enum value.

After compilation, Pet.Available in both instances lose their semantic
values and refer to the byte representation of their integral values.

For more info, see
https://docs.microsoft.com/en-us/dotnet/csharp/language-reference/keywords/enum
2017-11-13 16:02:03 +08:00
Akihito Nakano
9ca9887de4 [PHP] Improve docs and README (#6935)
* Fix wrong client class, add details about client

* Improve example for Configuration

* camelcase

* Improve README like api doc

* Update samples
2017-11-13 13:56:45 +08:00
Gabriele Bonetti
62444a7aaf Binary mode for file deserialization in python (#6936)
* use wb mode in file deserialization

* add auto generated files from security/python-petstore.sh
2017-11-13 12:50:10 +08:00