Commit Graph

3659 Commits

Author SHA1 Message Date
Euan Kemp
3029b7b0fb [Rust] Format example with rustfmt (#7339)
This was handled via 'cargo fmt' on the current nightly rust. I also
moved a few lines around and deleted an old comment.
2018-01-14 18:03:12 +08:00
etherealjoy
0bf430a803 Qt5cpp Add support for nested containers (#7340)
* Disable creation of empty json fields and fields for primitives which were not set, but using default values
modelnamePrefix will be the one passed from command line or SWG if none

* Updates after review
Also common http files are splitted
Update Petstore examples

* Small Fixes for cleaning up arrays of arrays/maps

* Changes
- Api Body pass by Reference, avoid seg fault due to deletion of auto constructed object passed as parameter.
- Support Maps and Arrays upto a depth of 2
- Refactor Helpers to handle Maps and simplify code

* Remove size check due to possible incorrect type

* Update PetStore Examples for Qt5 C++ and small fixes for QDate/QDateTime

* Updates after review. Fixes typo and remove usage of auto keyword.

* Restored usage of auto keyword.
2018-01-14 17:47:54 +08:00
Akihito Nakano
809e1f4c93 [PHP] Cleanup tests (#7333)
* Regenerate test/UserApiTest.php

The same implementation as testLoginUser() is in tests/UserApiTest.php

* Delete test/Client/ObjectSerializerTest.php

The same implementation is in tests/ObjectSerializerTest.php

* Update Petstore sample

- bin/php-petstore.sh
- bin/security/php-petstore.sh
2018-01-14 17:47:08 +08:00
Ben Mordue
429b96ae7e [JAVA] equals and hashCode for models with byte[] and binary strings (#7341)
* equals and hashCode methods for POJOs with byte array vars

* Also fix equals and hashCode for binary vars

* Ran script to update samples
2018-01-14 17:39:32 +08:00
wing328
fb73b8c4de update r petstore samples 2018-01-14 17:18:40 +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
Euan Kemp
0f6696089f [Go] Use consistent indentation in readme (#7336)
* [Go] Use consistent indentation in readme

* [Go] Regenerate petstore sample
2018-01-14 17:05:18 +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
SergeyLyakhov
4241b11d97 [Java][jersey2] Fix logging for jersey2 + java6 (#6715). (#7348)
* [Java][jersey2] Fix logging for jersey2 + java6 (#6715).

* Fix formatting according to comments.
2018-01-12 21:16:23 +08:00
Jim Schubert
75c0180c71 [scala] Escape reserved words, support Array[Byte] (#7378)
* [scala] Escape reserved words, support Array[Byte]

Previously, Array[Byte] was compiling to ArrayByte. This provides a type
mapping to output the correct type.

This also escapes reserved words with grave accents, as is most common
in Scala. Escaping with an underscore prefix breaks serialization (in
Jackson, for example) unless templates are modified manually. Escaping
using grave accent should unblock most serializers from requiring
template modifications.

* [scala] Regenerate integration test outputs

* [scala] Regenerate samples

* [scala] Remove unused imports in related codegen files
2018-01-12 21:14:30 +08:00
wing328
3930b5b0a1 Merge remote-tracking branch 'origin/master' into 2.4.0 2018-01-11 13:40:35 +08:00
Jim Schubert
65bda3e7b6 [scala] updates for client default values, required attributes (#7286)
* [scala] Fix default values in scala client

This uses consistent logic for optional types with default values in the
scala client. Also, uses Option(default) instead of Some(default) to
guard against people defining defaultValue = null. Option(null) becomes
None while Some(null) defines a null value explicitly and will break
maplike operations.

* [scala] Regenerate client sample

* [scala] Add missing json4s import, which will be added by another PR but allows current samples to generate

* [scala] Include integration tests for required attributes support

* [scala] Support string types with formats

This adds support for better support of type=string and
format={date,date-time,binary,byte}. Previously, binary and byte were
inconsistently defined as strings rather than byte arrays, while
date/date-time were parsing default values into formats that did not
match OpenAPI/Swagger 2.0 specifications for full-date and date-time.

We may want to consider pulling in json4s-ext to support wider date
formats and moving to date=LocalDate and date-time=ZonedDateTime.

This will have breaking changes for consumers expecting binary/byte to
be strings rather than byte arrays.

* [scala] Unique parameter names in integration test, to avoid seemingly conflicting names

* [scala] Regenerate client sample

* Sort file listings in AssertFile.java

Per File#list() javadocs:

There is no guarantee that the name strings in the resulting array
will appear in any specific order; they are not, in particular,
guaranteed to appear in alphabetical order.

I'm unable to repro directory listing failures on OS X High Sierra or
Ubuntu 16.04 under Parallels, so it's not clear to me if listing order
is indeterminate per-platform or the behavior is just not defined and
up to the platform's installed runtime. Sorting the array of strings
prior to comparison should resolve this issue on every platform/runtime.

* [scala] exclude api tests for integration test gen script

Script should match options in the integration test class

* [scala] Temporarily disable client integration tests

CI doesn't seem to pick up template changes in integration tests.
Disabling scala client integration tests, pending investigation of the
issue.

* [scala] Remove redundant json4s import

* [scala] Regenerate integration test

* [scala] Regenerate sample
2018-01-10 13:24:57 +08:00
Joseph Elliott
673be4e88f exclude commons package from org.apache.oltu.oauth2 to provide a more long-term fix. 2018-01-08 14:41:57 +01:00
Joseph Elliott
c642d8a89b Roll back oltu_version to 1.0.0 to fix #7044 2018-01-08 14:25:32 +01: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
William Cheng
f7779c545e
refactor abstract scala codegen (#7334) 2018-01-08 00:20:38 +08:00
Jean-François Côté
193432ef52 Added optional extra JQueryAjaxSettings at the class and function level (#7238) 2018-01-07 23:21:43 +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
Greg Marzouka
14e7158164 [Scala] Fix missing json4s import (#7271)
* [Scala] Fix missing json4s import

Closes #7270

* Update petstore sample
2018-01-07 22:50:30 +08:00
Stephane Carrez
362625bfa9 [Ada] Add Ada support for server code generator #6680 (#7256)
* Add Ada client petstore samples
- Add script to generate Ada client support with swagger-codegen
- Add files to build the Ada sample
- Add main program to use the generated client samples API
  and connect to the server to perform some operations

* Add some description for the samples

* Update the documentation to explain how to build, how to use the generated Ada client code

* Add server support for path parameters
- Update postProcessOperations to scan each path parameter and emit a x-path-index
  vendor attribute to tell the index of the path parameter

* Add and fix Ada server code package declaration
- fix declaration of operations
- generate a generic package that must be instantiated with the target server implementation
  and which provides the skeleton (deserialization and serialization of data)

* Implement the Ada server side operations
- extract body, query parameters, path parameters
- serialize the result
- register operations to the server according to the path/routes

* Update the code generation to generate server Ada implementation code

* Improvement of Ada server support: generate the swagger.json template file

* Define toModelName operation to the creation of a model identifier

* Add support for server permission generation
- collect the security scopes in postProcessAuthMethod() method and make sure
  these scopes have unique identifiers.  Some scopes correspond to URLs
  but others correspond to pseudo identifiers.

* Use the #lambdaAdaComment filter to indent correctly a multi-line description

* Fix model generation to support arrays

* Update the generated GNAT project file

* Refactoring and improvement of server code generation
- Change the server generated code to pass a Context_Type object
  to allow the server implementation to get/set headers in the request/response
  and control what is put in some responses
- Generate the security permissions based on the scopes that have been collected

* Server code generation improvement
- Fix generation of GNAT project
- Generate the intermediate Ada packages if necessary
- Generate the server main

* Ada server main template

* Ada server code improvement
- Add support to generate server permission verification
- Fix the GNAT project definition
- Templates for Ada intermediate packages

* Skeleton for the server side implementation

* Generate an empty Ada server implementation

* Templates for the Ada server implementation

* Add a README.md file and a GNAT config.gpr file

* New templates to document the generated Ada server

* Add server configuration file for the Ada server

* Fix the log message in the Ada server to report the correct URI to connect to

* Generate the Ada server configuration file

* Improvement of Ada code model to support nullable types

* Update the Ada server templates

* Refactor the Ada code generator
- separate the Ada client and Ada server code generators
- register the Ada server code generator under the name 'ada-server'
  keep 'ada' for the client Ada code generator
- moved the common Ada code operation supports to the AbstractAdaCodegen

* Improvement and cleanup of Ada client and server code
- new template for the client main program
- fix the GNAT project template for client or server programs
- remove unused options to better use the --model-package option

* Fix the GNAT project file name to use a lower case name
Fix the default GNAT config
Fix the headers of intermediate Ada package files

* Regenerate the model and client Ada files

* Update the Ada client sample to take into account the Nullable types

* Regenerate some files with Ada Swagger Codegen

* Ignore generation of petstore.gpr
2018-01-07 18:44:20 +08:00
etherealjoy
c7ff303779 [qt5cpp] Disable creation of empty json fields and handle prefix in model generation (#7206)
* Disable creation of empty json fields and fields for primitives which were not set, but using default values
modelnamePrefix will be the one passed from command line or SWG if none

* Updates after review
Also common http files are splitted
Update Petstore examples
2018-01-07 17:50:44 +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
Jon Schoning
bca2b9fb5b [haskell-http-client] handle */* mimetype correctly & split api modules & allowNonUniqueOperationIds (#7254)
* [haskell-http-client] handle */* mimetype correctly

* [haskell-http-client] generate separate api modules, for each child api

* [haskell-http-client] add cliOption "allowNonUniqueOperationIds"

When cli option "allowNonUniqueOperationIds" is true,
allows *different* API modules to contain the same operationId,
and then each API must be imported qualified.
2018-01-07 11:59:55 +08:00
Oleksandr Slynko
919f867eba [go] Fix go client formatting (#7283)
* Fix some go client formatting issues

* Fix go client go imports

* Run `goimports -w .` on examples directory

* Sort imports in api

* Add new line between each property

Before secret feature was used to add new line using two property
declaration in the same line. There should be no new line before
first property. The easiest way is to use `-first` special
property
https://github.com/samskivert/jmustache#-first-and--last

New line are required so `goimports` won't reformat  whitespaces between
property name and type.

* Change whitespaces to tabs

* Fix whitespaces in api_client

There is a new line between each service to prevent `goimports` from
adding whitespaces between types and names

* Fix more whitespaces

There was a need to set special delimeter for formatting in the commit.
Go slices use curly braces and `jmustache` got confused when found
triple curly braces.

* Fix whitespaces in configuration.mustache

* Fix whitespaces for api response

* Support for optional description

Do not add whitespace if description is missing

* Add new lines between enum values to prevent formatting

* Generate go code from current code

- imports are not sorted :(
- there are extra whitespaces for different languages. I don't know why

* Run generate for security tests
2018-01-07 11:53:55 +08:00
Akihito Nakano
4e5ec4c71c [PHP] Cleanup StoreApiTest (#7248)
* Move test codes in "test" to "tests".

* Simplify class name specification

* Regenerate test/Api/StoreApiTest.php

testGetInventory already exists in tests/StoreApiTest.php
2018-01-07 11:46:31 +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
Akihito Nakano
50d217894c [PHP] Cleanup EnumTest (#7282)
* Move test codes in "test" to "tests"

- EnumClassTest
- EnumTestTest

* Regenerate test/Model/Enum(Class|Test)Test.php
2018-01-07 11:42:44 +08:00
Bernat Ràfales
9b5bba0193 Correct minor typo in Ruby gemspec files (#7263)
[Ruby] Correct minor typo in Ruby gemspec files
2018-01-07 11:41:14 +08:00
Ben Wells
7479fc5361 Generate swagger yaml for go client (#7281) 2018-01-07 11:37:40 +08:00
Akihito Nakano
fa9fc4b45b Delete ApiClient (#7305) 2018-01-07 11:34:17 +08:00
Akihito Nakano
fa3e72e6e3 [PHP] Cleanup AnimalFarmTest (#7279)
* Move test codes in "test" to "tests"

* Regenerate test/Model/AnimalFarmTest.php
2018-01-07 11:21:53 +08:00
Jinkui Shi
30bd6f680d [akka-scala] License info add in template header #7321 (#7322)
* [akka-scala] License info add in template header #7321

* generate petstore by akka-scala teplate
2018-01-07 11:00:57 +08:00
Jean-François Côté
0a9c6f56c8 Fix issue #7262 with the parameter name in the path. The problem was that camelCase naming was forced only in this part of the code when everywhere else it is configurable. (#7313) 2018-01-07 10:33:46 +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
William Cheng
587dc20e06
[Javascript] Set ES5 as default (#7239)
* default js client to es5

* update js option wording
2017-12-22 00:08:30 +08:00
Ramzi Maalej
9dde8525ec [Akka-Scala] This is a fix to a bug introduced by this PR #7172 (#7228)
* Add missing import

* Update petstore app
2017-12-21 10:56:36 +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
Jon Schoning
538f28e568 bump stack resolver to lts-10.0 (#7221) 2017-12-20 21:55:23 +08:00
William Cheng
350a97095b
[Go] rename local variable "file" to "localVarFile" (#7214)
* comment out pkmst test for the time being

* rename file to localVarFile
2017-12-19 23:12:12 +08:00
Asad Saeeduddin
a3ca8d55e2 [TypeScript-Fetch] Support for non-JSON body params (#6994)
* Commit leftover snapshot changes

* Add logic to deal with non-JSON body params

If the spec specifies a list of consumes MIME types, default to the
first MIME type in the list instead of "application/json" (the user may
still override this by passing "Content-Type" in options.headers).

Additionally, only perform explicit JSON serialization if the data type
of the body parameter is not "string", or if it is string, only when the
content type is "application/json".

* Update snapshots
2017-12-19 17:20:16 +08:00
antihax
dc69138de5 Go: Return error body with >= 300 errors (#7192)
* Report better errors

* update tests
2017-12-18 23:03:47 +08:00
Ben Wells
6349e79a59 Fix typo in Petstore yaml (#7195) 2017-12-18 12:30:57 +08:00
wing328
1d44bb8141 update spring petstore samples 2017-12-15 00:02:43 +08:00
Jean-François Côté
e70bdf17f2 [Typescript All] Prevent usage of reserved keyword for model fields (#7112)
* Prevent usage of reserved keyword for model fields

* Changes from code review to follow JS convention of using toParamName and toVarName

* Another small change from code review. Removing from postProcess because it is already called from somewhere else.
2017-12-14 12:47:02 +08:00
William Cheng
c774e98464
update swagger parser, core version the latest (#7163) 2017-12-13 18:08:26 +08:00
Bartek Kryza
8b61b1d466 #7047 - Added Bash syntax check to tests (#7155) 2017-12-13 11:14:07 +08:00
Ville Skyttä
794bb07cf7 Spelling fixes (#7142) 2017-12-10 10:48:30 +08:00
wing328
e7b97383d1 update php petstore samples 2017-12-09 17:32:45 +08:00
Krzysztof Karol
d43e9c8be2 Fix wrong params indentation (#7136) 2017-12-09 17:22:24 +08:00
Akihito Nakano
cfa5a55a28 [PHP] Improve StoreApiTest (#7141)
* Move the test code to the appropriate test case

* currently, InvalidArgumentException will be thrown

* Remove unnecessary tests at this time

* Unify into single quotes
2017-12-09 17:01:25 +08:00
Benjamin Gill
1a831f73f3 [rust-server] Plaintext support; encode params (#7082)
* MMORCH-428: Export the Authorization struct

This is needed so that code can check that the version of Authorization
in the auto-generated code is the same as the version it is using. If
the versions are not exactly the same then the lookup into the TypeMap
will not work.

* Add Rust as a supported language for client and server.

Clarify that there are two Rust client implementations, and one Rust server implementation.

* Percent-encode path and query parameters in client URLs
Fixes #122

Also don't include a question mark at the end of the path when there are no query paramters.
Fixes #121

* Rust2 client: add --host and --port parameters to example client.

Allows the example command-line client to override the default host and port.

* Extract default host and port from Swagger file.

* Derive 'Eq' and 'Ord' on enums

* Rust2: improve server code structure.

    server.rs (main.rs) - main entry point for binary; starts the web server and points it at the server code within the library.
    server_lib/mod.rs (lib.rs) - root of library; creates the server.
    server_lib/server.rs (server.rs) - actual server code

The old server_lib/mod.rs is now server_lib/server.rs; server_lib/mod.rs is new.

This structure is easy to map onto a server implementation; unfortunately we can't get it exactly right here because of the limitations of cargo's examples/ folder.

* Rust2: Explain fully how to use the example code in your project.

* Added plaintext support

* Linting

* MGJ Markups
2017-12-08 18:42:14 +08:00
Oliver Hoffmann
20f48b04fc Make efficient use of entrySet iterator. (#7105) 2017-12-08 00:35:11 +08:00
wing328
365f3a923b update php petstore samples 2017-12-08 00:32:53 +08:00
Jinkui Shi
01b6330202 [Scala] [ISSUE-7085] Scala template code format refactor (#7086)
* [Scala] [ISSUE-7085] Scala template code format refactor

* upgrade scala version to 2.11.12 and upgrade dependency version
2017-12-08 00:20:19 +08:00
Akihito Nakano
1ff3b00ac5 [PHP] Add generator version (#7124)
* Add generator version

* Update samples

- bin/php-petstore.sh
- bin/security/php-petstore.sh
2017-12-08 00:02:52 +08:00
wing328
fb69703fe0 update ruby petstore samples 2017-12-07 23:55:51 +08:00
topce
b0f61f394c fix issue 7048 (#7108) 2017-12-07 23:50:26 +08:00
Jean-François Côté
40f1de8a58 [Typescript jQuery] Add README.md (#7113)
* Add README.md to the typescript jquery client generator

* Fix from code reviews about the addition of README.md. Made the fix in fetch too since it was a copy paste
2017-12-06 10:34:29 +08:00
Ramzi Maalej
61e706ba6f [Akka-Scala] Add build.sbt to Akka-scala (#7076)
* Add build.sbt to Akka-scala

* Add readme.md and build.sbt to petstore sample
2017-12-01 12:03:10 +08:00
antihax
831e8d7c87 [Go] Add context to all requests for tracing, logging, cancellations, etc. (#6997)
* Add context to all requests for tracing, logging, cancellations, etc.

* Fix compile error with when call has no parameters.
2017-11-30 00:30:35 +08:00
ehyche
d2a2292d20 Update samples using latest codegen and templates (#7071) 2017-11-29 14:49:45 +08:00
wing328
80cc90c7c1 update spring petstore samples 2017-11-29 11:19:46 +08:00
wing328
9a95f2f36b update swift petstore samples 2017-11-28 23:44:49 +08:00
Tomasz Prus
efe16fda8c [python/tornado] ssl improvements (#7061) 2017-11-28 10:06:29 +08:00
wing328
55410a3d4a update spring petstore sample 2017-11-27 22:12:46 +08:00
Ben Mordue
02bcc55e23 Do not apply content-type header if no request body (#6648)
* Do not apply content-type header if no request body

* Set content-type header if there are form params

* Add tests

* Run update script

* Regenerated sample clients
2017-11-27 18:33:28 +08:00
wing328
088eef5927 update petstore samples 2017-11-27 17:16:44 +08:00
Greg Marzouka
75c2d5ed4c [Scala] Default Option parameters to None (#6538)
* Add sensible defaults for not required params in scala

* Also default to None for async methods
2017-11-27 17:06:28 +08:00
Tristan Sloughter
3d3a30a533 [Erlang] erlang client: properly handle optional parameters (#7042)
* erlang client: properly handle optional parameters

* [Erlang Client] handle multiple path params in the same path
2017-11-27 16:11:14 +08:00
topce
8a0de971e4 Remove rxjs operators (#6989)
* do not import rxjs-operators if using HttpClinet

* generate code

* do not import operators if they are not needed
2017-11-24 13:24:46 +08:00
Keni Steward
8eb33f9d1b [Typescript][Angular]Issue #6902 Return Client Response for Angular 4.3 and above with Observe string (#6955)
* Updated swagger-ui wget url to https

* Issue #6902 Add Observe/ReportProgress pass through variables to the response for each api call for angular 4.3 and above

* Issue #6902 Fixed problem where extra comma as generated and should
not have been.

* Issue #6902 Fixed compiltion issue for Angular 4.3
2017-11-24 01:50:07 +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
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
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
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
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
William Cheng
ec0da35b6c
regenerate package.json, tsconfig.json for ts node (#6987) 2017-11-18 21:05:19 +08:00
wing328
da1702db03 update petstore sample 2017-11-17 23:39:12 +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
d04d280d1b update java petstore samples 2017-11-16 17:09: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
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
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
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
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
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
wing328
90a0b7a7e2 add python tornado test to travis 2017-11-13 12:05:18 +08:00
Tomasz Prus
4e967e696c [Python/tornado] add integration tests and fix bugs (#6925)
* tests: add integration test for python-tornado

* [python-tornado-client] tests: increase timeout for test_upload_file

* [python-tornado-client] fix: tornado client passes tests
2017-11-13 12:03:55 +08:00
Alexandre Demode
63d28cf75b Fix PHP passes response body to ApiException (#6923) 2017-11-13 11:30:46 +08:00
Shuma Yoshioka
053061ec9f [TypeScript][Node] Resolve TS2532 error (#6932)
* [TypeScript][Node] Resolve TS2532 error

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

* Run `bin/security/typescript-node.sh`
2017-11-13 11:23:56 +08:00
wing328
444a05ce21 minor formatting change 2017-11-12 22:21:54 +08:00