Commit Graph

5102 Commits

Author SHA1 Message Date
William Cheng
ddb0920fed
Fix C# client enum issue (#774)
* fix csharp enum issue

* fix numeric enum value

* add docstring to exlain isDataTypeString

* fix docstring by adding return

* fix ToJson in hash model

* remove BaseValidate for map model

* restore csproj file
2018-08-11 11:34:20 +08:00
Akihito Nakano
21777f2759 [JavaScript] Update vulnerable dependencies (#784)
* Update vulnerable dependencies

* Update samples: javascript-es6

* Update samples: javascript-promise

* Update samples: javascript-promise-es6

* Update samples: javascript

* Update samples: petstore-security-test/javascript

* Rename operationId if it starts with a number

* Update samples

bin/javascript-petstore.sh
bin/javascript-es6-petstore.sh
bin/javascript-promise-petstore.sh
bin/javascript-promise-es6-petstore.sh
2018-08-10 21:50:33 +08:00
Yusuke Iinuma
afdef8f890 [Ruby] Fix method split (#780)
* Fix methods split for readable

* Recreate sample
2018-08-10 17:25:22 +08:00
Dec12 | Fujigon
d019bbd2c7 [Java][jaxrs-jersey] add sample with jaxrs-jersey + openapi v3 (#778)
* create sample with "jaxrs-jersey" language & openapi v3

* circle ci setting

* fix typo. also add "jaxrs-jersey" to all samples profile

* artifactId conflicts. rename.

* generate samples with "./bin/openapi3/jaxrs-jersey-petstore.sh"
2018-08-10 17:24:24 +08:00
William Cheng
748d1d70cb
update groupId in pom (#779) 2018-08-10 15:48:19 +08:00
Daniel Miller
987fd77042 [cpp-restsdk] Support multi-line descriptions (#753)
* Update IndentedLambda to take optional prefix

* Add `multiline_comment_4` to CppRestSdkClient

* Update cpp-restsdk example
2018-08-09 19:01:15 -04:00
stkrwork
0809d8f527
[C++][Restbed/Pistache] Added fix for byte array (#752)
* Added fix for byte array

* Fix spacing

* Adapted default value for ByteArray

* Adapted default value for ByteArray in Pistache Server
2018-08-07 17:07:05 +02:00
Dec12 | Fujigon
629608c573 [jaxrs-spec*] samples should be tested. repair import and dependency. (#755)
* sample server projects "jaxrs-spec", "jaxrs-spec-interface", and "jaxrs-spec-interface-response" should be tested

* update jax-rs api to 2.1, in which @PATCH annotation is available
add jackson annotation dependency

* add joda-time to dependency

* modify mustache template to add @JsonCreate, @JsonValue import

* fix return type of enum value() method

* add InputStream import

* Attachment class is in apache cxf. spec should not depend on it

* re-generate sample jaxrs-spec, jaxrs-spec-interface, and jaxrs-spec-interface-response
2018-08-07 16:45:09 +08:00
William Cheng
90a8b81728
Prepare 3.2.1-SNAPSHOT release (#748)
* prepare 3.2.1 SNAPSHOT release

* update doc to use 3.2.0 stable version
2018-08-07 01:31:37 +08:00
Alexey Alekhin
05db32fea2 [Elm] Template improvements (#661)
* Add elm template parameter to the samples testing script

* Update elm-date-extra package; fixes #458

* Update generated elm samples

* Use Elm doc comments; remove some unneccessary newlines

* Update generated Elm samples

* Remove unnecessary parenthesis around non-optional container type
2018-08-06 18:17:59 +08:00
William Cheng
c116c8fb9b
[PHP] Decommission "packagePath", add new option "packageName" (#681)
* remove packagePath from php file location, use -o instead

* fix php symfony top folder

* restore pacakgePath

* update php laraavel samples

* remove packagePath from PHP generator

* add new silex files

* update window batch - php silex

* fix openapi3 silex script
2018-08-06 18:10:34 +08:00
William Cheng
1ab4fe43b5
fix petstore security spec to remove validation errors (#739) 2018-08-06 17:02:02 +08:00
Jon Schoning
f6c21057e1
[haskell-http-client] regen samples (#709)
* [haskell-http-client] regen samples

* ensure the haskell-http-client samples are always up-to-date
2018-08-05 15:11:52 -05:00
William Cheng
f6146b212f
[PHP] better operationId handling, add CI for PHP slim server (#723)
* better operationId handling, add CI for PHP slim

* use spaces instead of tabs

* replace tab with space

* install php
2018-08-03 10:47:54 +08:00
Akihito Nakano
2b429ee43b [PHP] [Laravel] Fix syntax errors in models (#721)
* Fix syntax errors in Models

* Update samples

./bin/php-laravel-petstore-server.sh
2018-08-03 10:44:12 +08:00
David van Laatum
a258cf3fc6 #714 prevent throwing another exception if the request fails eg connection reset (#715)
* prevent throwing another exception if the request fails eg connection reset

* prevent throwing another exception if the request fails eg connection reset
2018-08-03 00:02:09 +08:00
William Cheng
f32398a708
add dockerfile for ror, fix template issue (#718) 2018-08-02 22:07:09 +08:00
William Cheng
f0425d77ef
[Ruby] Better handling of operationID starting with a number (#719)
* better handling of operationId starting with numbers in Ruby

* update Rubocop to use Layout
2018-08-02 22:00:50 +08:00
William Cheng
375c26ccb3
add option to select db adapter in ror (#711) 2018-08-02 13:52:34 +08:00
William Cheng
40024ac72a
[Go] Prefix enum number with _ (#703)
* prefix enum number with _ in go

* reformat code, use else if
2018-08-02 10:13:01 +08:00
William Cheng
ab08dd1d26
Better handling of operationID starting with numbers (#691)
* add numeric operationid to test spec

* better handling of operationId in more generators

* fix go toOperationId

* update samples

* update java samples

* update java samples (vertx, webclient)

* update java google api client sample

* fix typo, update OAS3 test spec, update php petstore (oas3)

* defer camelize in operationid

* remove duplicated sanitizeName
2018-08-01 22:31:58 +08:00
William Cheng
21141f682f
Fix Javadoc string error in Java (rest-assured) client (#702)
* fix docstring

* trigger build failure

* Revert "trigger build failure"

This reverts commit 12cd26f0ca981db37d177a55001dac8b6afcd0bf.

* update java samples
2018-08-01 22:13:41 +08:00
Jeremie Bresson
d8ea28e147 Update "phpunit.xml.dist" 2018-08-01 14:43:34 +02:00
Victor Orlovsky
82156b6639 Added constant "httpMethod", "summary" (#697) 2018-08-01 12:02:11 +08:00
Yuriy Belenko
58e0946b1e [Slim] Add Basic authentication middleware (#606)
* [Slim] Add Basic Authentication Middleware

User needs to add own implementation to verifyCredentials method in AuthBasic.php.

* [Slim] Update README template

I'm not sure about `middlewareSrcPath` variable. I'll fix it in following PRs
if path is broken.
Hope that notice in README catches attention and most of users will read it.

* Revert "[Slim] Update README template"

This reverts commit 204ee02fd853feb3cc19db5658348c7fee6ca3f5.

* Revert "[Slim] Add Basic Authentication Middleware"

This reverts commit 6a8e03079a70213797896e660b7e7fa1894da0a6.

* [Slim] Add "tuupola/slim-basic-auth" package

Package "tuupola/slim-basic-auth" 3.1.0 requires PHP 7, that's why I
set it's version to ^3.0.0 in Composer. Minimum version will be
3.0.0-rc.1 which supports PHP 5.5. I've tested build with PHP 7, it
would be nice to check build with PHP 5.5 someday.

* [Slim] Update README template

Not sure about forward slash in path to SlimRouter class. I will fix it
in upcoming PRs if necessary.

* [Slim] Refresh samples
2018-08-01 00:55:30 +08:00
Christoph, René Pardon
f793ac25c7 feat (PHP LARAVEL) 8417: initial PHP-laravel codegen integration (#574)
* feat (PHP LARAVEL) 8417: initial PHP-laravel codegen integration

* feat (PHP LARAVEL) 8417: code review adjustments

* feat (PHP LARAVEL) 8417: fix typos; add missing files; adjust readme for those unfamilar with laravel to get started quickly

* feat (PHP LARAVEL) 8417: add sample petstore server

* feat (PHP LARAVEL) 8417: adjust route service provdider and model generation
2018-08-01 00:34:33 +08:00
René Winkelmeyer
d1fc923b66 Re-implementation of Apex client code gen (#698) 2018-07-31 23:02:25 +08:00
William Cheng
d8ec6b2003
[Apex] migrating to OpenAPI Generator project (#692)
* [apex] migrating to OpenAPITools

* migrate apex to openapi-generator
2018-07-31 15:28:54 +08:00
William Cheng
0c52fcd5ff udpate rust server samples 2018-07-31 11:33:23 +08:00
sunn
926b971497 [qt5 server] Improvement in response handling (#675)
* Remove warnings and add custom request sending

* Remove duplicate code from subclass and add missing setupRoutes

* Removed redundant override

* Add serialization of responses

* Fix CI failure

* Add inline function to duplicate code.

* Make const reference wherever possible

* Add support for Array of Primitive types.

* Add Array of Primitive support for Error response

* Update for multiple path params
2018-07-31 00:16:46 +08:00
Benjamin Gill
a3e5185e39 Ignore additional properties (#671)
* Ignore additionalProperties

rust-server doen't yet support them, and they cause quite a bit of havoc at the moment (ending up as the `HashMap` type).

* Use .equals() rather than `==`
2018-07-30 23:06:05 +08:00
Benjamin Gill
b0909ade6f [rust-server] add support for '|' in path segments (#667)
* Added encoding for vertical bar character in object IDs for client requests

* Updated sample
2018-07-30 18:38:52 +08:00
William Cheng
036fa6918c
fix operation id starting with number for python client (#682) 2018-07-30 15:42:06 +08:00
sunn
b587052de4 cpp-tizen extends AbstractCppCodegen (#676)
* cpp-tizen extends AbstractCppCodegen

* Update javadoc comment
2018-07-30 15:33:00 +08:00
Benjamin Gill
cb9a734ebb [rust-server] add support for multiple samples (#658)
* Add support for multiple rust-server samples

Though we only have the one as yet. This will make it easier to move rust-server back on to the main test spec, whilst preserving the ability to have rust-specific test specs.

* Rust samples need unique names

* Move samples to a dedicated directory

So that there is nothing else in the folder where they live so that the workspace definition in the root Cargo.toml can be simple.
2018-07-30 15:31:55 +08:00
Rubén Martínez
68d80ab67d [Java][Client][RestTemplate] Fixed invalid URL-encoding of query parameters (#646)
Fix for the #644
2018-07-30 08:38:10 +02:00
William Cheng
b33f1f945b
add stop wait to spring pom (#670) 2018-07-27 23:41:31 +08:00
sunn
534b6b5978 [cpp qt5 server] Improve qt5 server naming (#655)
* Adapted according to reviews

* Add changed files

* Update beta tag to the naming
2018-07-27 01:49:26 +08:00
Benjamin Gill
b6fc29050d Implement stack for Swagger Context (#612) 2018-07-27 01:48:43 +08:00
Benjamin Gill
7624a1ff85 Various enhancements to html2 docsgen (#643)
This commit includes the following changes:

- Fix docs not generating parameter descriptions, add rust sample.
- Add example to doc output.
- Add basic scope reporting.
- Stringify the JSON "Example" objects for response schemas.
- Prettify JSON examples in response schemas.
- Parse and present multiline response descriptions.
- Add API error details to docsgen.
- Add read only markers to read only properties.
- Fix up style document indentation.
- Add support for `x-shared-errors`, an extension to define common error types that can be shared across a microservice framework.
2018-07-26 21:57:57 +08:00
Akihito Nakano
c9b934147a [PHP] Escape media type (#615)
* Move escapeMediaType() to AbstractPhpCodegen

* Escape media type

* Update samples

- bin/php-lumen-petstore-server.sh

* Refactoring: remove unused 'import'
2018-07-26 21:26:01 +08:00
sunn
65bad61abb [Qt5 Server] Add Support for Qt5 server using QHttpEngine (#322)
* Initial wiring to get the QHttpEngine Server running for Qt5 server

* Add wiring for build environment

* Add current generated files

* Update README.md

* Solved Build for Docker and Host
Wired up main
TODO : Route API call to handlers

* Wire up routes

* Wiring up routes update

* Convert Path to QHttpEngine format

* Rename some files

* Extract query Parameters and path parameters

* Removed pri file, Qt can read CMakeLists.txt

* Initial support of deserialization

* Adding initial support for response serialization

* Setup simple signal handler to quite the server with Ctrl+C in a container and on the host

* Remove unneeded function

* Add executable permission to script and move from Debian to Alpine for Dockerfile

* Add stringValue of missing types

* Unify toJson'xxx' APIs the same way like setValue

* Rework to remove all pointer usages, pass by const references, simplify model, add emit signals to default handlers
2018-07-26 18:30:13 +08:00
Jérémie Bresson
a8e8acead7
[java] add useNullForUnknownEnumValue option (#633) 2018-07-26 11:00:45 +02:00
Jeremie Bresson
70cdd27e75 Merge remote-tracking branch 'origin/master' into 3.2.x 2018-07-25 16:51:19 +02:00
William Cheng
86d7009f4c
replace tab with spaces, fix empty spaces in new lines (#632) 2018-07-24 17:30:54 +08:00
Daniel Miller
530065137d [cpp-restsdk] Generate mockable APIs (#595)
* Port GMock feature from NativeInstruments

swagger-codegen fork:
https://github.com/NativeInstruments/swagger-codegen/pull/9

* Update petstore for Mockable APIs

* Fix shared_ptr in templates for File params

* Add guards in templates for GMock APIs

* Regenerate samples without GMocks

* Add useful constructors for GMock APIs

* Add constructors to API header interface

* Update samples with explicit monadic constructors

* Add default implementations for destructors
2018-07-24 15:31:21 +08:00
Euan Kemp
2e6bec7345 [Rust] Split out request logic, implement form parameters (#528)
* [Rust] Move request logic into standalone file

This reduces the number of variables which are used in the generated
operations, thus fixing #512.

This also fixed a TODO related to URI parsing errors.
Other than that, it is meant to be functionally identical.

* [Rust] Add support for non-file form params

Up until now, they just weren't there at all

* [Rust] Use more rustic terms in example
2018-07-23 23:10:53 +08:00
William Cheng
667e3130fe Merge remote-tracking branch 'origin/master' into 3.2.x 2018-07-23 23:04:28 +08:00
Benjamin Gill
a9961a062a [rust-server] Drop file support (#547)
* [rust-server] drop 'file' support

In swagger v2, we had 'binary', 'byte', and 'file'. OpenAPI v3 only has
the former two. This commit drops the old 'file' handling. This has the
side-effect of removing a half-complete implementation of form parameter handling.

This removes the ability to send files as streams, so will make life
harder for those wishing to send large files without running out of
memory.

* Remove all remaining uses of `hasFile`
2018-07-23 18:46:35 +08:00
William Cheng
5328f103da
Add C++ Pistache petstore server to Travis CI (#616)
* test cpp pistache petstore in travis

* make build_petstore executable

* add submodule update init

* use addExternalLibs option

* update samples

* update gcc version to 5

* fix addon, env

* restore cargo path

* trigger build failure, add cache

* undo build failure change
2018-07-22 16:41:20 +08:00
sunn
1dee3e227c [cpp-pistache] add the option to fetch dependencies (#495)
* Add the Possibility to fetch dependencies needed by the generated code

* Fix typo

* Make External Libraries default to false

* Add parameter string to the javadoc comment
2018-07-22 10:46:38 +08:00
Rubén Martínez
0da55081c9 [Java][Client][RestTemplate] Do not create new Object for empty body (#605)
#513 Fixed error that causes exception when trying to perform HTTP requests without a body and an empty Object is used as body instead. In these cases an exception is thrown indicating that it is not possible to find a message converter for java.lang.Object and application/json.
2018-07-20 17:49:12 +02:00
Tomasz Prus
8867d2b34c Support for python 3.7 by renaming async to async_req (#519)
* feat: support for python 3.7

* fix: regenerate other sample clients
2018-07-20 22:14:18 +08:00
sunn
97d6b71460 [cpp-pistache] Fix compilation of petstore for Pistache (#497)
* Fix compilation of petstore for Pistache
Add Map support

* Add support for ByteArray

* Add Support for ByteArray in cpprest

* Implement TODOs
2018-07-20 22:04:25 +08:00
William Cheng
71ef6a0a2b update petstore samples 2018-07-19 19:28:31 +08:00
William Cheng
888da52181 Merge remote-tracking branch 'origin/master' into 3.2.x 2018-07-19 18:46:18 +08:00
Benjamin Gill
bd33a333af Ensure rust-server sample is kept up to date (#600) 2018-07-19 18:16:36 +08:00
Georg Rollinger
f7617bc628 [typescript][jQuery] Fix promise resolution (#581)
* typescript-jquery: fix promise resolution

The type annotation that is generated for an API states that the
JQueryPromise<...> will be resolved with a single value.
The implementation, on the other hand resolves with two.

This changes the implementation to resolve the promise in accordance
with the type annotation.
It also adds another type specifying what will be passed if the promise
is rejected.

* Update petstore sample for typescript-jquery
2018-07-19 18:04:43 +08:00
Benjamin Gill
c5e170961f [rust-server] enhance support for middlewares (#552)
* Generate RequestParser trait to allow retrieving operation ID in middlewares

* Update function name

* Fix incomplete comment

* Add comment poitning out auotgenerated duplication

* Final generation of sample scripts

* MMORCH-913 - Allow passing wrapped hyper clients to codegen

* Deprecate old API for back-compatibility rather than removing it

* Actually test Rust-server example integrations
2018-07-19 18:03:02 +08:00
William Cheng
e02e875978
Update gradle dependency for Java RESTEasy API client (#597)
* update resteasy gradle dependency

* remove java8 option when testing resteasy (java)
2018-07-19 17:57:21 +08:00
Marvin
52cd17ecc7 [Java][RESTEasy] Fixed setting of custom headers (#599)
Fixed header generation. Previously the key was used as value parameter.
2018-07-19 11:55:01 +02:00
Dimtiriy Remerov
76160b53c7 [php-symfony] Fixed a bug with access of non-existing property in generated code (#578)
* [php-symfony] Fixed a bug where Controller accessed non-existent property

* [php-symfony] Regenerated petstore sample
2018-07-19 15:32:15 +08:00
Niklas Werner
80cf1324c5 C Generator Sample - Improvements (#558)
* Added a .gitignore to ignore the build folder

* Added a CMakeLists and a basic implementation of a double linked list

* Added the pet model

* changed the behaviour when a list gets freed - the data of each element doesn't get freed anymore

* Added the tool uncrustify in order to make code look better

* Uncrustified code

* added an implementation(constructor and deconstructor) for the category model

* Added a third party JSON library

* The pet struct now uses pointers for its members; the pet struct now has a proper constructor and a basic toJSON method

* The pet model now gets fully serialized into JSON

* Fixed the example url...

* Added third party library libcurl

* Modified category struct and added an unit test

* Added a foreach macro and added two functions

* Added a tag model and an unit test

* the pet struct now uses no double pointer for it's name anymore and no pointer for the enum status anymore; the pet struct can now be fully converted to json and parsed from json

* Added the struct APIClient and an unit test

* Uncrustified the unit test for category

* Added ifdef in pet.h to prevent errors

* Added one API endpoint to get a pet by id

* Added a "== 0" comparison that I forgot

* Added some kind of debug functionality to test-petApi.c

* Removed the DEBUG define

* Moved the c petstore example from samples/client/c to samples/client/petstore/c

* Renamed function getPetById to petApi_getPetById to avoid name collisions

* Removed unecessary method in list.c

* Added POST functionality; added petApi_addPet method and improved unit-test for petApi; cleaned up some code in apiClient

* removed two methods in list.c(string/tag to JSON) and moved their code directly in the pet_convertToJSON method

* Removed old, already commented out, puts artifact in apiClient.c

* Added a convertToJSON method to the category model

* Added a convertToJSON method to the tag model

* changed how the convertToJSON method works in the pet model

* Adjusted the unit-tests on how the convertToJSON method now works(now returns a cJSON* instead of a char*)

* apiClient_t now needs to be given to API methods as a parameter. This means apiClient_t can now be reused in multiple methods.

* Added an untested concept for how authentication could be handled

* Tested basicAuth using wireshark and added untested OAuth2 feature

* Added support for api key authentication using the http-header and tested functionality using wireshark

* Renamed the dataToPost parameter in apiClient_invoke to bodyParameters

* Renamed apiKey_t to keyValuePair_t and implemented GET queries

* Spaces are now being replaced with + in querryParameters

* Renamed assembleHeader to assembleAPIKeyAuthentication and added support to change the request type

* Implemented the option to provide custom httpHeader fields to apiClient_invoke

* Added support for form parameters to the apiClient_invoke method

* update petstore sample
2018-07-19 12:22:38 +08:00
John Wang
0f0d8a01cb [Golang][client] Add option for standard Go generated code comment (#555)
* update go generated code comment

* update samples for go petstore

* update code generation comment

* update samples for go petstore

* Trigger CI due to previous Shippable race condition

* add -DwithGoCodegenComment=true option

* reset samples

* add withGoCodegenComment=true to bin/go-petstore-withxml.sh

* update samples/.../go-petstore-withXml using -DwithGoCodegenComment=true
2018-07-19 12:21:51 +08:00
delenius
995edc0b75 Fix version incompatibility in resteasy client (#594) 2018-07-19 10:50:59 +08:00
Jean-François Côté
5344a02bbc
Multiple enhancements to typescript fetch generator (#145) 2018-07-18 13:38:47 -04:00
Jeremie Bresson
45ed374b62 Merge remote-tracking branch 'origin/master' into 3.2.x 2018-07-18 12:19:41 +02:00
Jérémie Bresson
1e596496a5
Prepare 3.1.2-SNAPSHOT (#589) 2018-07-18 11:44:23 +02:00
Daonomic
0a52f56ba4 Support for discriminator.mapping (#536) 2018-07-18 06:14:42 +02:00
William Cheng
7c9d40016f update petstore samples 2018-07-18 01:52:58 +08:00
Akihito Nakano
6d6ef0f120 [PHP] Refactor php client generator (#504)
* Extends AbstractPhpCodegen instead of DefaultCodegen

* Remove fully duplicated methods with AbstractPhpCodegen

* Remove duplicated properties with AbstractPhpCodegen

* Remove duplicated codes in constructor with AbstractPhpCodegen

* Add typeMapping "date". Moved from PhpClientCodegen

refs: 3c34c0b377 (diff-f1801ef05a7926bf394c90f44ae4ab3dL132)

* Remove duplicated codes in processOpts()

* Remove unnecessary 'implements'

* Remove unnecessary method override

* Use setter

* Merge getTypeDeclaration() into AbstractPhpCodegen

* Merge processOpts() into AbstractPhpCodegen

refs:
* 296e6d3db4 (diff-f1801ef05a7926bf394c90f44ae4ab3dL139)
* 296e6d3db4 (diff-f1801ef05a7926bf394c90f44ae4ab3dL147)
* 296e6d3db4 (diff-f1801ef05a7926bf394c90f44ae4ab3dL153)

* tweak

* Optimize IF statement

* Remove duplicated methods

* Merge setParameterExampleValue() into AbstractPhpCodegen

* Merge toEnumVarName() into AbstractPhpCodegen

* Merge toEnumName() into AbstractPhpCodegen

* Merge escapeUnsafeCharacters() into AbstractPhpCodegen

* Merge postProcessOperationsWithModels() into AbstractPhpCodegen

* tweak

* Recover missing method

refs: 2ad0f6f7d4 (diff-f1801ef05a7926bf394c90f44ae4ab3dL91)

* Tweak test case

refs: 4e7b7afc1a

* Remove unnecessary 'import'

* Update lumen and ze-ph samples

- ./bin/php-lumen-petstore-server.sh > /dev/null 2>&1
- ./bin/php-ze-ph-petstore-server.sh > /dev/null 2>&1

* Update slim samples

* Fix script name

* Update silex samples

* Update kotlin-server
2018-07-17 09:27:02 +08:00
Akihito Nakano
afb238814d [Ruby] Abstract Ruby Codegen (#562)
* Add AbstractRubyCodegen

* Refactor constructor

* Move escapeReservedWord() to AbstractRubyCodegen

* Move getTypeDeclaration() to AbstractRubyCodegen

* Move toDefaultValue() to AbstractRubyCodegen

* Move toVarName() to AbstractRubyCodegen

* Move toParamName() to AbstractRubyCodegen

* Move toOperationId() to AbstractRubyCodegen

* Move escapeQuotationMark() to AbstractRubyCodegen

* Move escapeUnsafeCharacters() to AbstractRubyCodegen

* Use super.escapeReservedWord()

* RubyClientCodegen extends AbstractRubyCodegen

* Add the differences with AbstractRubyCodegen to "reservedWords"

* cliOptions.clear() is not a language specific matter

- Rails, Sinatra requires cliOptions.clear()
- Ruby client doesn't requires that

* Remove duplicated statements with AbstractRubyCodegen

* Remove duplicated methods with AbstractRubyCodegen

* Merge toVarName() into AbstractRubyCodegen

* Merge getTypeDeclaration() into AbstractRubyCodegen

* Merge toDefaultValue() into AbstractRubyCodegen

* Update Ruby related samples

- bin/ruby-client-petstore.sh
- bin/ruby-on-rails-server-petstore.sh
- bin/ruby-sinatra-server-petstore.sh

* Remove unnecessary 'import'

* Avoid unnecessary HTML escaping
2018-07-17 09:08:42 +08:00
Matthieu Berthomé
84ef98f067 [Python][Client] pure library client package (#470)
* Python client pure library package

* check onlyPackage CLI option

* run /bin/python-petstore.sh, update the python samples for CI

* onlyPackage local variable instead of classp property

* fix CI: __future__ absolute_import must be first in file

* update samples

* generateSourceCodeOnly

* updated samples
2018-07-16 15:49:08 +08:00
Yuriy Belenko
925ae68167 [Slim] Generation of UnitTest stubs (#566)
* [Slim] Add PHPUnit4 to Composer

* [Slim] Configure PHPUnit

* [Slim] Add Model and Api test templates

* [Slim] Refresh Slim samples
2018-07-16 14:25:48 +09:00
William Cheng
d863c3e5f4
Add travis.yml to test java6 option (#568)
Add travis.yml to test java6 option, update Java (Jersey2) dependencies
2018-07-15 16:00:07 +08:00
Jérémie Bresson
5a0a8f6a87 Java6 support: fix pom and gradle files, avoid diamond notation (#560) 2018-07-14 21:13:23 +08:00
William Cheng
df815344d1
fix NPE in body parameter due to incorrect parameter/consume (#563) 2018-07-14 20:19:10 +08:00
William Cheng
478d6ced4e Merge remote-tracking branch 'origin/master' into 3.2.x 2018-07-14 01:35:54 +08:00
Akihito Nakano
26e70fe642 [Ruby] Rename files/folders (#534)
* Rename templateDir: rails5 -> ruby-on-rails-server

* Rename script: rails5-petstore-server.sh -> ruby-on-rails-server-petstore.sh

* Rename sample folder: rails5 -> ruby-on-rails

* Rename script(openapi3): rails5-petstore-server.sh -> ruby-on-rails-server-petstore.sh

* Update ruby-on-rails-server-petstore.sh

* Rename templateDir: sinatra -> ruby-sinatra-server

* Rename script: sinatra-petstore-server.sh -> ruby-sinatra-server-petstore.sh

* Rename sample folder: sinatra -> ruby-sinatra

* Update script

* Rename templateDir: ruby -> ruby-client

* Rename script: ruby-petstore.sh -> ruby-client-petstore.sh

* Update scripts

* Update samples

- bin/ruby-sinatra-server-petstore.sh
- bin/ruby-on-rails-server-petstore.sh
- bin/ruby-client-petstore.sh
- bin/security/ruby-client-petstore.sh
2018-07-13 22:28:17 +08:00
Jeremie Bresson
0cc60d39d2 Merge remote-tracking branch 'origin/master' into 3.2.x 2018-07-13 07:25:49 +02:00
Benjamin Gill
6c14b4271f Handle headers correctly (#549)
We were previously relying on some incorrect behaviour of the old
swagger-codegen mustache engine.
2018-07-13 01:55:56 +08:00
John Wang
19fd48e33b [Golang][client] fix formData file parameter name use (#506)
* support form-data file MIME `name` parameter

* update test spec and Go client for form-data file name

* update samples for ensure-up-to-date

* update mustache template

* update samples for Go client

* improve assignment location

* update samples
2018-07-13 00:53:38 +08:00
John Wang
93832340a5 add RFC-3339 formatting to parameterToString (#502) 2018-07-13 00:50:21 +08:00
Tomasz Prus
a0936bec02 feat: use local_var_params to avoid collision with api parameters (#521) 2018-07-12 21:30:57 +08:00
William Cheng
0d952b79db
Improve logging in Python client (#480)
* improve logging in python client

* update samples
2018-07-10 22:12:09 +08:00
Dennis Kieselhorst
0a2131d2d3 update CXF and Jackson to latest version (#496) 2018-07-10 18:23:18 +08:00
Tomasz Prus
96e86ac03e update and fix python samples (#489)
* fix: update petstore samples for python, fix broken tests

* chore: entries for python-asyncio/tornado in gitignore
2018-07-08 15:29:55 +08:00
sunn
6d05ea5716 Allow generated code to do cleanup of object by preventing premature loop exit (#270) 2018-07-08 12:55:27 +08:00
Jon Schoning
79fafda012 [haskell-http-client] regen samples (#492) 2018-07-08 12:46:35 +08:00
John Wang
a14e757059 fix cache-expires-ineffassign (#466) 2018-07-08 12:38:04 +08:00
Jeremie Bresson
23c04e2e66 Prepare version 3.2.0-SNAPSHOT 2018-07-07 06:14:58 +02:00
Jérémie Bresson
4b6fb504a2
Prepare version 3.1.1-SNAPSHOT (#487) 2018-07-07 06:05:19 +02:00
Yuriy Belenko
9eeedede49 [Slim] Improve codebase decouple (#438)
* [Slim] Decouple Api files into separated PHP Classes

This enhancement required for modular testing and code coverage generating.

* [Slim] Define all app routes in SlimRouter PHP Class. Generate new samples
2018-07-06 14:37:14 +08:00
Esteban Marin
3408866b79 Ensure typescript samples are up to date (#444)
See #80
2018-07-06 07:56:51 +02:00
John Wang
869b17fe29 [Golang][client] delete sample output dir before rebuild (#477)
* delete Go client sample output dir before rebuild

* purge go-petstore-withXml samples output dir before build

* update samples

* fix go-petstore-withxml.sh echo path
2018-07-06 12:20:13 +08:00
William Cheng
867aaa4c27
update petstore samples (#478) 2018-07-06 12:08:20 +08:00
John Wang
7eb2acaf71 update go client test dependencies (#468) 2018-07-05 20:34:32 +08:00
John Wang
0bffdf2463 [Golang][client] fix for schema definition name file (#433)
* fix schema/definition name as 'file'

* update samples

* Trigger CI due to previous Shippable race condition

* add fix with toModelName(openAPIType)

* update tests for file schema/definition name

* Update 3.0 test spec

* update samples

* update samples for jaxrs-cxf

* Trigger CI due to previous Shippable race condition

* add back explode
2018-07-05 20:32:24 +08:00
John Wang
33fcd28dba [Golang][client] fix file suffix for _test.go (#449)
* add file suffix fix for _test.go

* Trigger CI due to previous Shippable race condition

* Trigger CI due to previous Shippable race condition

* Trigger CI due to previous Travis CI stall

* Trigger CI due to previous Travis CI stall

* Trigger CI due to previous Shippable race condition

* add Go client test testFilenames
2018-07-05 14:02:10 +08:00
Niklas Werner
96e0814510 [C] Adding petstore sample written in C (#306)
* Added a .gitignore to ignore the build folder

* Added a CMakeLists and a basic implementation of a double linked list

* Added the pet model

* changed the behaviour when a list gets freed - the data of each element doesn't get freed anymore

* Added the tool uncrustify in order to make code look better

* Uncrustified code

* added an implementation(constructor and deconstructor) for the category model

* Added a third party JSON library

* The pet struct now uses pointers for its members; the pet struct now has a proper constructor and a basic toJSON method

* The pet model now gets fully serialized into JSON

* Fixed the example url...

* Added third party library libcurl

* Modified category struct and added an unit test

* Added a foreach macro and added two functions

* Added a tag model and an unit test

* the pet struct now uses no double pointer for it's name anymore and no pointer for the enum status anymore; the pet struct can now be fully converted to json and parsed from json

* Added the struct APIClient and an unit test

* Uncrustified the unit test for category

* Added ifdef in pet.h to prevent errors

* Added one API endpoint to get a pet by id

* Added a "== 0" comparison that I forgot

* Added some kind of debug functionality to test-petApi.c

* Removed the DEBUG define

* Moved the c petstore example from samples/client/c to samples/client/petstore/c

* Renamed function getPetById to petApi_getPetById to avoid name collisions

* Removed unecessary method in list.c

* Added POST functionality; added petApi_addPet method and improved unit-test for petApi; cleaned up some code in apiClient

* removed two methods in list.c(string/tag to JSON) and moved their code directly in the pet_convertToJSON method

* Removed old, already commented out, puts artifact in apiClient.c

* Added a convertToJSON method to the category model

* Added a convertToJSON method to the tag model

* changed how the convertToJSON method works in the pet model

* Adjusted the unit-tests on how the convertToJSON method now works(now returns a cJSON* instead of a char*)

* apiClient_t now needs to be given to API methods as a parameter. This means apiClient_t can now be reused in multiple methods.

* Added an untested concept for how authentication could be handled

* Tested basicAuth using wireshark and added untested OAuth2 feature

* Added support for api key authentication using the http-header and tested functionality using wireshark
2018-07-05 12:28:43 +08:00
Jérémie Bresson
b0cae23777 [java-client] WebClient requires java8 (#460)
* Usage of webclient library forces java8 to be true

* Run bin/java-petstore-webclient.sh
2018-07-05 12:26:02 +08:00
Akihito Nakano
ef2b372dd3 [Node.js] Add a message which notify that the generated server doesn't work (#456)
* Add message which notify that the server doesn't work

* Update samples
2018-07-05 12:25:17 +08:00
John Wang
00354d3264 [jaxrs-cfx][server] delete output dir before building sample files (#452)
bin/jaxrs-cxf-petstore-server.sh:

* delete output dir before building sample
* add comment before deleting files
2018-07-05 05:45:03 +02:00
developersteve
020883fd4d [Java] version in the generated README dependent from {{java8}} (#380) 2018-07-04 13:05:14 +02:00
Jeremie Bresson
f8e5c410a2 Run bin/java-petstore-webclient.sh 2018-07-04 09:58:52 +02:00
Daonomic
b90c53deb6 [Java-client] Add Spring 5 WebClient as new library (#435) 2018-07-04 09:40:57 +02:00
Geoff Brown
960412a9b4 Restructure TypeScript Node generation into separate files (PHNX-1041) (#363) 2018-07-03 17:03:40 +02:00
Jérémie Bresson
7a7e221210
[Java] option for the prefix of boolean getters (#432)
* Add "booleanGetterPrefix" option
* Create `docs/migration-guide.adoc`
2018-07-03 17:00:15 +02:00
Jérémie Bresson
3d64bd0c49
[java-jaxrs] Fix paths when useTags=true is used (#437)
* Add test case for the existing implementation
* Introduce {{commonPath}}
* Update samples
2018-07-03 15:31:26 +02:00
Raphael Ochsenbein
be68ef502e Inject basepath through configuration in generated service for angular, create test cases for angular 6 (#367) 2018-07-03 17:55:26 +08:00
Günther Grill
c1eda61874 Fix some Kotlin formatting issues and make source more Kotlin like (#427) 2018-07-03 08:25:48 +02:00
sunn
bece8d2a39 [aspnetcore] Add processing of Port defined in spec (#368) 2018-07-03 08:23:43 +02:00
William Cheng
862fe79f32
Minor improvement to Go client generator, move test case (#430)
* move test cases to under fake endpoint

* remove trailing spaces in the template

* update samples

* add new file

* minor fix to OAS3 spec
2018-07-02 10:23:12 +08:00
Yuriy Belenko
412923ab5f [Slim] Refactoring (#402)
* [Slim] Cleanup samples. composer.lock excluded from .gitignore

composer.lcok should be commited to SVN. Official recommendation https://getcomposer.org/doc/01-basic-usage.md#commit-your-composer-lock-file-to-version-control

* [Slim] Refactor. Extend AbstractPhpCodegen class

* [Slim] Adjust the names (script, sample folder, generator) to lang option
2018-07-02 00:16:55 +08:00
Jeremie Bresson
e172379f04 Update jersey samples 2018-07-01 17:43:19 +02:00
John Wang
e960fe9512 [Golang][client] fix undefined: localVarFile (#382)
* fix undefined: localVarFile

* add required formData file endpoints to 2.0 and 3.0 specs

* streamline api.mustache update

* update sampels

* update samples

* update samples

* update samples bin/jaxrs-cxf-client-petstore.sh

* update samples

* update samples

* update samples run-all-petstore

* update samples

* update samples

* Trigger CI due to race condition

* update samples

* update samples

* Trigger CI due to previous timeout

* Trigger CI due to previous Shippable timeout

* Trigger CI due to previous Shippable race condition
2018-07-01 16:58:45 +08:00
Akihito Nakano
8bddf12e05 [Ruby] Make rake tasks required to publish gem available (#424)
* Make tasks reuired to publish gem available

https://github.com/OpenAPITools/openapi-generator/issues/423

* Update samples

- bin/ruby-petstore.sh
- bin/security/ruby-petstore.sh
2018-07-01 14:36:48 +08:00
Akihito Nakano
8e648e4d95
[PHP] Remove unnecessary IF statement (#421)
* Delete unused IF statement

JSON_PRETTY_PRINT is available since PHP 5.4.0

* Update samples

- bin/php-petstore.sh
- bin/security/php-petstore.sh
- bin/openapi3/php-petstore.sh
2018-06-30 20:30:25 +09:00
Thomas Townsend
79856abae9 Fix subResourcePath when using tags in java-jersey (#215) 2018-06-30 10:23:04 +02:00
akihito.nakano
23571046fb Merge remote-tracking branch 'upstream/master' into prepare-310 2018-06-28 00:53:58 +09:00
Jean-François Côté
9990ddbe52
Merge pull request #385 from etherealjoy/fix_new_keyword_collection
[aspnetcore] Fix new keyword collection
2018-06-27 08:07:38 -04:00
Jeremie Bresson
66b73e906e Merge remote-tracking branch 'origin/master' into 3.1.x 2018-06-25 18:58:54 +02:00
Benjamin Gill
d3b1721da0 [rust-server] Update to error-chain 0.12 (#395)
* Update to error-chain 0.12: 0.11 doesn't work with Rust 1.27.0 (new warnings)
* Revert commit 845df89e95
2018-06-25 18:17:47 +02:00
Akihito Nakano
9e2fcda357 [JMeter] Rename codegen class, template folder (#387)
* Rename JMeter client generator class name

* Rename jmeter template folder

* Update samples
2018-06-25 13:46:52 +08:00
tomvangreen
38bb732673 Typescript Angular 2: Make service suffix configurable (#341)
* Added serviceSuffix and serviceFileSuffix parameters to control the suffixes of generated class and file names

* Updated TypeScriptAngularClientOptionsProvider to include the new serviceSuffix and serviceFileSuffix parameters

* Fixed part in generator where hardcoded 'Service' suffix was used.

* Made the . in the service file name part of the config setting

* Updated cli message
2018-06-25 12:17:32 +08:00
Jan Prieser
a0bfe2bf72 WIP: new javascript flowtyped generator (#176)
New Javascript flowtyped generator
2018-06-25 12:04:10 +08:00
etherealjoy
dd4b1aff2e Update samples 2018-06-24 00:46:23 +02:00
Yuriy Belenko
36f4452351 [Slim] Upgrade API server integration tests to use Fake Petstore spec (#354)
* [Slim] Shell script points to petstore-with-fake-endpoints-models-for-testing.yaml. Slim init and new models has been generated.

* [Slim] Bugfix. Special value */* in opperation produces escaped to avoid PHP syntax errors.

* [Slim] Add own private static final LOGGER

* [Slim] Bugfix. toModelName method copied from PHPClient codegen which handles Fake Petstore spec much better.

* [Slim] Sort operations in supporting files data to avoid shadowing static routes.

* [Slim] Mustache index.php update. Params parsing enhanced.

* [Slim] Tiny cleanup. Unnecessary empty space removed.

* [Slim] Security fix. toOperationId method copied from PhpClientCodegen.

* [Slim] Bugfix. formData params parsing restored.

* [Slim] Proper .gitignore added to PhpSlimServerCodegen. Vendor folder with all dependencies removed to keep repo more clean.

* [Slim] Slim dependency update to 3.10.0. Few test fake endpoints fixed by this upgrade.
2018-06-23 12:10:38 +09:00
stkrwork
23ab5177b3 [C++][Pistache] Fix optional error and wrong function signatures (#264)
* Added missing includes for optional

* Removed shared pointer from pistache generator

* Changed Net namespace to Pistache Namespace

* Clean up code and removed unnecessary lines in mustache files

* Removed remaining shared pointer syntax

* Code review fixes + updated samples

* Added const to all model setter functions, and reference to all params in setters that are not primitives

* Refactored modelbase

* Removed const

* Updated samples
2018-06-22 09:12:35 +08:00
William Cheng
a897feef50
Fix alias to map in the model's properties (#360)
* add test case for ref to map (boolean) in fake petstore spec

* fix alias to map in model properties

* remove logging from new method

* update samples for the new map test case

* fix javadoc string

* skip testSanitizeNestedInvalidValue in php test

* skip test in php oas3 client

* add logic to handle outer enum

* update samples

* fix alias in model's allOf

* generate models for map def

* update petstore samples

* update petstore samples
2018-06-21 22:59:02 +08:00
William Cheng
a0f71cc328
update go client, server petstore samples (#365) 2018-06-21 21:59:56 +08:00
Akihito Nakano
e23b2f6fcc [Scala][client] Rename script, sample folder, template dir (#334)
* Rename scripts akka-scala-petstore.sh -> scala-akka-petstore.sh

* Rename sample folder: akka-scala -> scala-akka

* Rename templateDir: akka-scala -> scala-akka-client

* Rename scripts: scala-petstore.sh -> scala-httpclient-petstore.sh

* Rename sample folder: scala -> scala-httpclient

* Rename templateDir: scala -> scala-httpclient

* update circle pom.xml for new scala path

* remove duplicated scala test
2018-06-21 17:28:58 +08:00
Joe Elliott
5b5fe3cad9 [Swift 4] add compatibility for unwrapRequired config option (#229)
* Added support for unwrapRequired in Swift 4

* Update petstore generators for Swift.
2018-06-21 16:52:02 +08:00
Jeremie Bresson
9509e66ae8 Merge remote-tracking branch 'origin/master' into 3.1.x 2018-06-21 07:33:59 +02:00
Mads Føhns
d19a2faf8e [php] Correctly handle multiple valid responses (#128)
* #125: Correctly handle multiple valid responses

* Fixed defaultResponses

* Fixed void-returns

* Fixed multiple return-types without an actual type

* Update the samples under openapi3 folder
2018-06-20 21:26:23 +09:00
Jérémie Bresson
3c9cf1dcd6 Restore unit test (#346)
* Restore test classes to commit 5340c35ce1

* Fix samples/client/petstore/java/feign

* Fix samples/client/petstore/java/jersey1

* Fix samples/client/petstore/java/jersey2-java8

* Fix samples/client/petstore/java/jersey2

* Fix samples/client/petstore/java/okhttp-gson

* Fix samples/client/petstore/java/resttemplate/src/test/java

* Move "StringUtilTest.java" to "samples.ci"

and add copy command in *.sh scripts

* Fix echo line

* Move tests to 'test-manual/common/'

* Move "ApiClientTest.java" to "samples.ci"

and add copy command in *.sh scripts

* Move "ConfigurationTest.java" to "samples.ci"

and add copy command in *.sh scripts

* Move "auth/ApiKeyAuthTest.java" to "samples.ci"

and add copy command in *.sh scripts

* Move "auth/HttpBasicAuthTest.java" to "samples.ci"

and add copy command in *.sh scripts

* Move "model/EnumValueTest.java" to "samples.ci"

and add copy command in *.sh scripts

* Move "JSONTest.java" to "samples.ci"

and add copy command in *.sh scripts

* Replace "cp" => "mkdir & cp"

* JSONTest.java is java8 specific

* Run bin/java-petstore-all.sh

* "$_" does not work on Shippable
2018-06-20 15:40:58 +08:00
Jeremie Bresson
478b0d6101 Merge remote-tracking branch 'origin/master' into 3.1.x 2018-06-19 07:32:52 +02:00
Jérémie Bresson
9511586f07
Prepare 3.0.3-SNAPSHOT (#338) 2018-06-18 09:32:11 +02:00
Ben Wells
c51986d657 Go server clean up (#328) 2018-06-18 01:09:48 +08:00
shigeru.nakajima
86a82d103e Eliminate MySQL dependency of Rails 5 stub server (#279)
* [rails] In order to set up the Ruby on Rails stub server easily, remove the dependency on MySQL

* [rails] Update sample codes of Ruby on Rails stub server
2018-06-17 12:44:25 +08:00
delenius
c607ea8b31 Add fixes for es6 generator (#180)
Various fixes for JS (ES6) generator
2018-06-17 01:59:23 +08:00
William Cheng
53d9878cf2
Update Petstore samples (#331)
* Grammar and spelling fixes

* update petstore samples
2018-06-17 01:33:36 +08:00
William Cheng
cb28ada0aa Merge remote-tracking branch 'origin/master' into 3.1.x 2018-06-16 19:02:17 +08:00
John Wang
a20f93b42f [Golang][client] fix RFC-3339 date-time query param (#325) 2018-06-16 00:29:24 +08:00
William Cheng
6c996a7d1a
Various improvement to CI (#326)
* Various improvement to CI

* trigger a failure

* disable ensure up-to-date script

* move ensure-up-to-date under bin/utils, pipe update to /dev/null
2018-06-15 16:18:31 +08:00
Jeremie Bresson
dbb44a153d Merge remote-tracking branch 'origin/master' into 3.1.x 2018-06-14 13:29:52 +02:00
Stian Liknes
680a2bc3ec Configuration option to disable HTML escaping when using Gson (#298)
* Configuration option to disable HTML escaping when using Gson

The default implementation of Gson will escape certain characters by default. This
includes the `=` character, which is used in base64 encoding and cause problems when
deserializing the value to a base64 encoded string in a service.

Adding an option for disabling this feature makes it easier to generate client code
with sane defaults.

* Update Petstore sample
2018-06-14 19:27:52 +08:00
Stian Liknes
24104dac35 Add option modelPropertyNaming to javascript generator (#299)
* Add option modelPropertyNaming to javascript generator

Fixes 6530

* Update Petstore sample
2018-06-14 19:19:23 +08:00
John Wang
7126074f49 add Go client test - TestPlaceOrder (#321) 2018-06-14 14:24:16 +08:00
Benjamin Gill
91d6d77a09 [rust-server] Add rust-server to travis CI (#308)
* Add rust-server to travis CI

* Install rust correctly (and only once)
2018-06-14 00:05:49 +08:00
Benjamin Gill
6f6a4a1013 [rust-server] (Re-)Adding support for rust-server (#290)
* First attempt at getting rust-server working

* Solve the problem of spurious 'object's

* We've found the missing models

* Catch some single-var objects correctly

* Get single-param models 'working'

* Got files working

* Remove surplus logging

* Disable some things to get it compiling

* `cargo test` now passes as well

* Create rust-server-specific petstore.yaml

We've commented out a few bits that rust-server doesn't yet support

* Remove commented-out code

And finally get rid of the generation date in the sample
2018-06-13 18:53:03 +08:00
sunn
299527370e [go-server] Add dockerfile for building and run petstore service (#274)
* Add possibility to build and run go service in a container

* Remove tabs

* Update Pet Store server sample

* Add {{{packageName}}} instead of petstore
2018-06-13 16:55:04 +08:00
Jeremie Bresson
a878749f6c Merge remote-tracking branch 'origin/master' into 3.1.x 2018-06-12 16:26:44 +02:00
Christophe Bornet
d2016d8e0a Fix spring controller validation (#225) 2018-06-12 20:45:17 +08:00
Jeremie Bresson
c223f28171 Initial commit for 3.1.0-SNAPSHOT 2018-06-12 06:27:26 +02:00
Jérémie Bresson
8ae1c814d5 Prepare 3.0.2-SNAPSHOT (#285)
Set version `3.0.2-SNAPSHOT`.

Follow up from #280
2018-06-11 13:22:03 -04:00
Esteban Marin
0a479f77f6 [typescript-angular] strict type checking (#218)
* strict type checking

* strict type checking

* generate samples for angular-typescript
2018-06-11 21:31:23 +08:00
Akihito Nakano
2392a09eeb [C++ server] Adjust the names (script, sample folder, generator) to lang option (#250)
* Renamce C++ server scripts

* Change output folder

* Rename sample folder: pistache-server -> cpp-pistache

* Rename sample folder: restbed -> cpp-restbed
2018-06-10 22:48:30 +08:00
sunn
f5f00069bd Removed warnings for packages included in SDK for Net Core 2.0 (#269)
Microsoft.Extensions.SecretManager.Tools
Microsoft.DotNet.Watcher.Tools

For docker containerized apps, avoiding restore again is important for image size
2018-06-10 08:29:13 -04:00
SiMing Weng
43b60e667e [Java][RestTemplate] Fix query parameter URL encoding (#260)
* add URL encoding to the query parameters in case they have unsafe characters

* add comment

* update generated samples
2018-06-10 17:48:26 +08:00
sunn
a2c27ba8a6 [cpp-qt5] Remove std::shared_ptr from Qt5 (#267)
* Remove std::shared_ptr from Qt5
Updated Petstore
Update Object Template to be able to store the json body

* Remove tabs
2018-06-10 17:39:38 +08:00
Jérémie Bresson
8de5c62cf2
Add JaxRS to bin/ensure-up-to-date (#248)
* Create bin/java-jaxrs-petstore-server-all.sh
* Run bin/java-jaxrs-petstore-server-all.sh
* Add 'bin/java-jaxrs-petstore-server-all.sh' to 'bin/ensure-up-to-date'
2018-06-09 08:54:27 +02:00
William Cheng
fbe9626b7e [jaxrs-spec] generate spec file (yaml) correctly (#243)
Fix #235
2018-06-07 11:08:52 +02:00
Akihito Nakano
cf657f1c7b [C++] Adjust the names (script, sample folder, generator) to lang option (#220)
* Rename script: qt5-petstore.sh -> cpp-qt5-petstore.sh

* Rename sample folder: qt5cpp -> cpp-qt5

* Rename script: cpprest-petstore.sh -> cpp-restsdk-petstore.sh

* Rename sample folder: cpprest -> cpp-restsdk

* Rename generator: CppRestClientCodegen -> CppRestSdkClientCodegen

* Rename script: tizen-petstore.sh -> cpp-tizen-petstore.sh

* Rename sample folder: tizen -> cpp-tizen

* Rename script(security): qt5cpp-petstore.sh -> cpp-qt5-petstore.sh

* Rename sample folder(security): qt5cpp -> cpp-qt5

* Rename script(windows): qt5cpp-petstore.bat -> cpp-qt5-petstore.bat

* Change sample folder

* Rename script(windows): cpprest-petstore.bat -> cpp-restsdk-petstore.bat

* Change sample folder

* Rename script(windows): tizen-petstore.bat -> cpp-tizen-petstore.bat

* Change sample folder

* Change output folder: tizen -> cpp-tizen

* Rename the scripts under bin/openapi3

cpp-restsdk is not exist under bin/openapi3

* Change sample folder
2018-06-07 16:55:43 +08:00
Christophe Bornet
7a1945e154 [Spring] Add apiFirst option (#184)
* [Spring] Add apiFirst option

* Git diff to see what's wrong

* Git diff to see what's wrong

* Update bin/ensure-up-to-date

* Run bin/ensure-up-to-date
2018-06-07 13:55:12 +08:00
Ben Mordue
0fb1ffa88b [JAVA][Client] New object instead of null for empty POST request (#98)
new Object() for empty request body
2018-06-07 06:37:37 +02:00
Jérémie Bresson
69a3852ef7
Make yaml serialization deterministic (#233) 2018-06-06 11:47:13 +02:00
Jérémie Bresson
1e5e1d4458 Prepare 3.0.1-SNAPSHOT (#195)
* Restore version to 3.0.0-SNAPSHOT

* Set version to 3.0.1-SNAPSHOT

* Run ensure-up-to-date

* Remove duplicated version declaration
2018-06-02 10:57:33 +08:00
William Cheng
0fadea9986
update php samples (#169) 2018-05-28 23:59:44 +08:00
Mads Føhns
3beeb4e777 #126: Not-required properties now shows as nullable (#129) 2018-05-28 21:33:55 +08:00
William Cheng
c30afdf775
add php server batch files (#165) 2018-05-28 19:35:04 +08:00
Geoff Brown
9b8602311e [TypeScript] Make OpenAPI Generator serialize subclasses properly (#102)
* Make SwaggerCodeGen serialize subclasses properly (PHNX-859) (#1)

Motivation
----
Previously, when serializing as subclass of a property, generated swagger clients would only serialize properties of the parent class causing some values to not be pass through

Modifications
----
Before serializing attributes of a given type, we check to see if there is a specific type to be serialized so that we don't miss any properties.

* Fix improper whitespace in mustache template (PHNX-859) (#2)

Motivation
----
OpenAPI Generator upstream requested whitespace fixes (from tabs to 4 spaces)

Modifications
----
Fixed whitespace
2018-05-28 17:22:14 +08:00
Christophe Bornet
71b5de3ed5 Do not set contextPath for spring-boot (#104) 2018-05-28 16:29:09 +08:00
Akihito Nakano
37df59d6f0 [PHP] Adjust the names (script, sample folder, generator) to lang option (#159)
* Prefix slim-petstore-server.sh with 'php-'

* Prefix slim sample folder

* Prefix ze-ph-petstore-server.sh with 'php-'

* Prefix ze-ph sample folder

* Prefix lumen-petstore-server.sh with 'php-'

* Prefix lumen sample folder
2018-05-28 13:49:47 +08:00
delenius
4d7ff8cfbd JavaDoc fixes for Java/RESTEasy client (#151) 2018-05-26 06:34:38 +02:00
Akihito Nakano
6f23b5061a
Add PHP scripts to bin/ensure-up-to-date (#155)
* Add PHP scripts

* Run php-petstore.sh (OAS2,3)
2018-05-26 12:46:47 +09:00
Jérémie Bresson
caef014e04
Update 'springboot-reactive' in samples folder (#147) 2018-05-24 22:11:46 +02:00
topce
4bc5ffe867 [typescript-angular] add provided in support (#120)
* add provided in root support

* fix unit test to pass test generation of new options

* set default for providedInRoot to be true
2018-05-24 09:20:16 -07:00
Tomasz Prus
7184f1ec68 [python] asyncio supports _preload_content; remove unsed imports (#107)
* chore: update python samples

* feat: python/asyncio support for _preload_content

* feat: remove unused imports from python clients; fix discriminator
2018-05-24 08:10:07 -07:00
Christophe Bornet
a3aabd3908 Create a default implementation of delegate if none could be autowired (#92) 2018-05-24 07:50:05 -07:00
Jérémie Bresson
00f176ad95 Add 'bin/ensure-up-to-date' script and update Shippable CI (#136)
* Create 'bin/ensure-up-to-date' script

* Update shippable config

* Do no longer copy 'CI/pom.xml.shippable' to 'pom.xml'
* Fix paths in CI/pom.xml.shippable

* shippable: remove write to file

* shippable: move order

* Run 'bin/ruby-petstore.sh' to update 'samples/'

* Add Kotlin scripts to the list
2018-05-24 10:18:35 -04:00
Jérémie Bresson
3f81378d72
[java resteasy] fix string comparison (#134)
* Fix StringUtils.isEmpty(..)
* Update all JaxRS samples
2018-05-23 08:38:18 +02:00
Jim Schubert
27426f7b52 Cli generator name option, replaces 'language' options in CLI and Maven Plugin (#57) 2018-05-23 05:41:19 +02:00
Jérémie Bresson
b73ab0260e jaxrs-cxf-cdi: fix outer enum (#131)
* jaxrs-cxf-cdi: fix model enum

* Fix script 'bin/jaxrs-cxf-cdi-petstore-server.sh'

See https://github.com/OpenAPITools/openapi-generator/pull/124

* Run 'bin/jaxrs-cxf-cdi-petstore-server.sh'
2018-05-22 17:55:19 -04:00
Matthias Baer
f22224574b Download elm dependencies without prompting user. (#118) 2018-05-21 16:23:01 +08:00
Matthias Baer
d9d6530161 [aspnetcore] Make the use of Swashbuckle optional (#110)
* Respect the sourceFolder option correctly

* Add an option to disable the use of Swashbuckle (useSwashbuckle)
2018-05-20 09:28:24 -04:00
Jérémie Bresson
82ee8656fd
[java] Enum in array of array (#66) 2018-05-18 19:01:11 +02:00
William Cheng
9b05bd60d5
update elm test to compile all elm files (#95) 2018-05-18 19:29:18 +08:00
Erik Timmers
a5cf27b60e Fix Petstore example for Elm (#96)
* Add support for `additionalProperties` in operations;
* Add reserved module names.
2018-05-18 19:14:55 +08:00
Victor Orlovsky
3b9a2a7c36 CaseFormatLambda has been added, params for Rest-assured client has been refactored (#91) 2018-05-18 12:49:34 +02:00
Fabrizio Ferrai
d7e374504f [Clojure] Add util method to set the api-context globally (#93) 2018-05-18 11:22:02 +08:00
Antoine Reilles
d890d733f8 [JaxRS-Java] issue with implFolder on windows, and required fields generation for containers (#88)
* Fix implFolder issue with jaxrs-cxf-cdi generator

This fix is for the issue:
https://github.com/swagger-api/swagger-codegen/issues/8113

When using jaxrs-cxf-cdi and other JaxRS generators, the implFolder
config is not honored by hte generator on windows.

* jaxrs-cxf-cdi: containers with no default init

Change similar to
https://github.com/swagger-api/swagger-codegen/pull/5363/files for
jax-rs-cdi generator.
When a property that is a contained is not declared as required, it is
initialized to `null`, and not to the empty container.
This makes apio mich more easy to use, since one can differentiate when
an input list in json has been set to the empty array or simply not set.
2018-05-17 19:28:05 +02:00
Jérémie Bresson
2821f18b95 Meta: set version for "build-helper-maven-plugin" (#89)
* Set "build-helper-maven-plugin" in template

* Run bin/meta-codegen.sh
2018-05-17 23:21:32 +08:00
Jon Schoning
34db79b9ba [haskell-http-client] update dependency versions + readme (#81) 2018-05-17 18:40:58 +08:00
Kaito Watanabe
c30fb3ff0b Remove examples comment from swift3 and swift4 client (#61) 2018-05-16 17:58:36 +08:00
Jim Schubert
9a8183ab05 [aspnetcore] Fix openapi.json location rename (#56)
Swashbuckle generation was missing the configuration to rename from
default swagger.json to openapi.json (expected by change in SwaggerUI's
configuration for the endpoint).

This generates to the appropriate location and updates the sample to
load the Swagger UI properly on run.
2018-05-16 11:16:55 +08:00
Matthias Baer
de5260a7ce Update the aspnetcore generation (#53)
This change resolves an issue I had with opening the aspnetcore Solution (Visual Studio could not load the project). The *.sln file contained an old GUID for ASP.NET 5.
Also removed the obsolete NuGet.Config file and updated the package references to the newest versions.
2018-05-15 21:41:44 -04:00
Jérémie Bresson
673f2bc469
Add CodegenProperty.nameInSnakeCase (#42) 2018-05-15 13:17:04 +02:00
William Cheng
7d9fb9f51e
Add CI test for Elm in travis (#40)
* test elm in travis

* install elm
2018-05-15 09:58:37 +08:00
William Cheng
67ebe17dd6
Fix isPrimitiveType flag for array of form parameters (#38)
* fix isprimitivetype for array of form parameters

* setup snapshot deployment
2018-05-14 23:28:03 +08:00