Commit Graph

12022 Commits

Author SHA1 Message Date
Gocha Ossinkine
d87a3b90da Validate input objects (#2144) 2019-02-14 19:32:21 +09:00
Esteban Marin
e01a786bc9 #2147: fix compiler error in angular typescript codegen (#2149)
* #2147: fix compiler error in angular typescript codegen

* #2147: generate samples
2019-02-14 16:39:08 +08:00
Esteban Marin
804b589f5f Revert "Don't escape [ and ] in query param keys (#2107)" (#2128)
This reverts commit ba9c12f2e0.
2019-02-13 18:17:42 +08:00
Michael van Niekerk
550774a6e2 Typescript+Axios: multipart/form-data correctly handled (#2002)
* Typescript 3.2

* Typescript spread operator

* Add vendor extension to the operation

* Remove url.URLSearchParams

* Generate form data in API

* Make axios scripts executable

* Reran generator

* Generate sample code

* Revert to 2.4 Typescript

* COLLECTION_FORMAT.{{collectionFormat}} everywhere for consistency

* Consistency on the CollectionFormats, comment on the vendor extension

* fix compilation error
2019-02-13 16:29:46 +08:00
Jérémie Bresson
598bf0cd09 [core] consider schema in headers when computing unused schemas (#2138) 2019-02-13 16:19:05 +08:00
Benoît Courtine
b6c2266a14 [Rust][Client] Code format (#2042)
Rust clients code format cleanup (with some breaking changes for model structures):

* Application of Rust style in client files (4 spaces padding). Remove useless blank lines.
* Replace getters/setters in models by public fields.
* Add a trailing comma in struct fields.
* Sample Rust clients regeneration.
2019-02-13 00:51:16 +00:00
Jérémie Bresson
ea08106c80 [core] Fix NullPointer when schema is not set in header (#2133) 2019-02-13 02:27:20 +08:00
karismann
de33360883 [typescript-angular] Incorrect OperationId Generated (starting with number) (#2130)
append _ at the beginning, as reserved keyword
2019-02-13 02:26:45 +08:00
Julian
add63cb981 [PHP] Replace File.seperator with slashes in PHP projects #2004 (#2007)
* [FIX] Replace File.seperator with slashes in PHP projects.

* Replaced 'File.separator' with slashes in AbstractPhpCodegen.
2019-02-13 02:26:15 +08:00
Jérémie Bresson
f1fa0a80ad
[clean-up] Centralize Swagger-Parser calls in the unit tests (#2110) 2019-02-12 06:09:21 +01:00
Sven Panne
fd0847864a Fixed handling of dotted module names in python generator. (#2016)
Previously, if you used a packageName of the form "foo.bar.baz", half of the
generated files of the python generator went into a subdirectory
"foo/bar/baz" (correct), the other half went into a subdirectory
"foo.bar.baz" (incorrect).
2019-02-12 12:20:34 +08:00
William Cheng
4e85993490 Merge branch 'master' of https://github.com/OpenAPITools/openapi-generator 2019-02-12 02:39:39 +08:00
William Cheng
8707f943c0 update ts angular 2 samples 2019-02-12 01:34:15 +08:00
Akira Tanimura
33a8939bd5 [Ruby] Fix enum expansion in Ruby client (#2081) (#2104)
* use double-quote string for enum value (#2081)

* use enumVars in templates for Ruby client (#2081)

* delete unnecessary line in enum model of Ruby client (#2081)

* update samples of Ruby client (#2081)
2019-02-12 00:32:36 +08:00
Gocha Ossinkine
5c64b58bae Fix JMSSerializerBundle version (#2057) 2019-02-12 00:17:43 +08:00
BastiOfBerlin
ba9c12f2e0 Don't escape [ and ] in query param keys (#2107)
rails' default naming for arrays is name[]=...&name[]=...
It doesn't recognize the escaped forms %5B + %5D but fails silently
2019-02-12 00:17:04 +08:00
Gocha Ossinkine
73d309b9ba Catch serializer exception (#2074) 2019-02-10 15:41:09 +08:00
john lilley
f76dca84f5 Fix Bug 1433 decimal literal in C# maybe other languages (#1436)
* Trivial change to kick PR again

* Fix issue 1433 (default decimal literal broken for C#)

* Replace tab with space

* update samples
2019-02-10 15:28:40 +08:00
William Cheng
302922b8a4 update php oas3 samples 2019-02-10 12:41:38 +08:00
Akihito Nakano
773aa269ae Add @autopp to Ruby technical committee (#2103) 2019-02-10 11:34:46 +08:00
Akira Tanimura
7dcffff20b [Ruby] Fix Ruby client to prevent Rubocop's rule violations (#2100) (#2102)
* [Ruby] Delete empty lines and trailing newline in template to prevent Rubocop's rule violation (#2100)

* [Ruby] update samples of Ruby client (#2100)
2019-02-10 09:29:34 +09:00
William Cheng
20d5adcdd5 [PHP] remove deprecated options (#2083)
* php remove deprecated options

* update php doc

* clean up composerVendorName in code, templates

* update samples
2019-02-10 09:25:20 +09:00
William Cheng
e0ed6719a0 Add "servers" support to the operation, path in PHP API client (#2072)
* add servers support to path, operation in php client

* remove servers from spec

* update based on feedback
2019-02-10 08:27:41 +09:00
davidwcarlson
ef7b28de00 fix 457 Support for Bearer Auth (#1930)
* fix #457 by introducing an HttpBearerAuth object

See https://github.com/OpenAPITools/openapi-generator/issues/457
Also https://github.com/OpenAPITools/openapi-generator/issues/1446 for typescript, https://github.com/OpenAPITools/openapi-generator/issues/1577 for python

Specs defined as follows currently generate BasicAuth and send an "Authorization: Basic [base64Encode(username + ":" + password)]" header
    components:
      securitySchemes:
        bearer:
          type: http
          scheme: bearer

This change will generate code which uses a new HttpBearerAuth class, which will send a "Authorization: [scheme] [accessToken]" header.
This change is slightly larger and more impactful than simply using OAuth for bearerBearer, but it allows for scheme values other than bearer.

This fix was enabled by the recent commit of 80ca67cfda

This PR is an alternative to https://github.com/OpenAPITools/openapi-generator/pull/1972

* update petstore samples

* Update HttpBearerAuth mustache templates and samples

* correct the expected number of generated java client files

* update the retrofit2 HttpBearerAuth template and samples

* Add resttemplate-specific HttpBearerAuth mustache and samples

* add vertx-specific HttpBearerAuth template and samples

* add java webclient-specific HttpBearerAuth template and samples
2019-02-09 22:51:44 +08:00
William Cheng
348c22c883
Add "servers" support to operation, path in the JS client (#2060)
* add operation, path servers to js es6 client

* add servers support to operation, path in js es5

* fix null check
2019-02-09 22:25:01 +08:00
Gocha Ossinkine
8f5fa4df83 Add controller.service_arguments tag to controllers to make them public (#2059) 2019-02-09 22:19:42 +08:00
Matthieu Berthomé
cf6f10252d [Python] handle nullable parameters with None added to allowed_values (#2034)
* handle nullable parameters with None added to allowed_values

* update samples

* spec for testing enum with null/nullable
2019-02-09 22:08:47 +08:00
Sven Panne
0b10092262 [python-flask] [python-aiohttp] [bug] Fixed handling of dotted module names (#2041)
Previously, if you used a packageName of the form "foo.bar.baz", half of the
generated files of the python generator went into a subdirectory
"foo/bar/baz" (correct), the other half went into a subdirectory
"foo.bar.baz" (incorrect).
2019-02-09 02:51:36 +08:00
karismann
cd2ff0b041 [angular-typescript] Wrong Typescript Version for Angular 6 with Npm (#2097)
The Angular Compiler 6 requires TypeScript >=2.7.2 and <2.10.0
2019-02-09 02:44:48 +08:00
William Cheng
0a2fb8db8f
Remove localVarPrefix from Java client (#2045)
* remove localVarPrefix from java client

* rename local varaible

* update samples
2019-02-08 11:51:26 +08:00
William Cheng
36fa7102dd
[Python] Add "servers" support in path, operation (#2052)
* add servers to path, operation

* add path/operation server support to python client

* update python samples

* fix index

* fix python code style
2019-02-08 11:48:37 +08:00
William Cheng
7cee2b62e4
fix JS default ot ES6 (#2084) 2019-02-08 11:47:33 +08:00
karismann
5281ea8bef [JAVA] fix outdated windows script for test templates (#2091) 2019-02-08 10:11:06 +08:00
Pablo Lázaro
aa24f07433 [TypescriptAngular] gets package npm version from API specification (#2019) 2019-02-07 15:53:01 +08:00
Morten Hekkvang
aa15882e2b Update openapi-generator-cli.sh (#2065)
* `jq` executable is a much cleaner way to get version number
* Using `jq` and getting `releases` instead of `tags` allows us to get latest stable release
2019-02-07 14:56:53 +08:00
autopp
f1a56447ba Request to run ./bin/openapi3/{LANG}-petstore.sh and ./bin/openapi3/security/{LANG}-petstore.sh before submitting new PR. (#2071) 2019-02-07 12:14:11 +08:00
Sven Panne
dd3e6c6a3b Use actual value of generateSourceCodeOnly in python generator. (#2015) 2019-02-06 15:04:53 +08:00
autopp
28768244d6 [Ruby] Use double-quote string to enable string interpolation (#2067) (#2068) 2019-02-06 14:59:54 +08:00
Mike Ralphson
532743b4f9 Add .gitattributes file to 'vendor' mustache templates (#1980)
This has the effect of making GitHub attribute the language of the project correctly (e.g. as Java). This is useful for sites which list projects by assigned language.
2019-02-06 14:58:49 +08:00
William Cheng
0b66fa5c82
add servers to path, operation (#2048) 2019-02-05 17:07:52 +08:00
William Cheng
454adec32d
Fix isFreeFormObject check for allOf, oneOf, anyOf (#2044)
* fix free form object detection

* refator
2019-02-04 22:12:59 +08:00
William Cheng
931c03beca
add methods to name interface (#2046) 2019-02-04 17:34:55 +08:00
Matej Vehar
f4088f8ee8 Enable serialization of non-null negative values (array, false, etc) (#2032) 2019-02-04 15:25:16 +09:00
Akihito Nakano
f56bc79db6 Add a link to the presentation by @ackintosh at Gunma.web (#2047) 2019-02-04 00:30:32 +08:00
Dj Padzensky
6f4ba25cd8 Making completion work with openapi-generator-cli or openapi-generator (#2027)
Homebrew installs openapi-generator-cli as openapi-generator.  This will make bash completion work with either.
2019-02-02 11:34:27 +08:00
Benoît Courtine
888068d122 Rust reqwest improve (#1890)
* Resolves #525 for Rust client generator with reqwest library.

* Use Reqwest "query" method to generate query URL.

* urlencode URL string parameters.

* Generate rust-reqwest client, and verify it compiles and work as intended.

* Map file params (to "&std::path::Path") and support multipart operations (with file params) in Reqwest library.

* Cleanup: template compression to remove unecessary blank lines in generated code.
2019-02-01 15:02:16 +08:00
Jeremie Bresson
16f52cf2ad Set version to 4.0.0-SNAPSHOT
This reverts commit 6a414af13f.
2019-02-01 00:03:51 +01:00
Jérémie Bresson
6a414af13f
4.0.0-beta2 release (#2036) 2019-02-01 00:00:22 +01:00
William Cheng
453eeb9e40
Add Bearer authentication to PHP API client (#2013)
* add php bearer auth support

* add partial mustache

* add bearer format

* update php ze-ph samples
2019-01-31 17:54:10 +08:00
William Cheng
6801741592
Add Bearer authentication support to JS client (#2020)
* add bearer authentication support to js client

* add bearer format to js client

* fix test case

* update php ze-ph samples
2019-01-31 15:27:24 +08:00