18059 Commits

Author SHA1 Message Date
val
ca944542e0
Added support for msvc builds in cpp-qt5-client generator (#5468)
* Added support for msvc builds

Moved GCC-specific compile flags to non msvc builds, and added equivalent flags for msvc.

* CMakeLists condition cleanup
2020-02-28 14:43:37 +08:00
Alexey Makhrov
0edb628633
[typescript] Clean up modelPropertyNaming across generators (#5427)
* [typescript] Clean up modelPropertyNaming across generators
Fixes https://github.com/OpenAPITools/openapi-generator/issues/2976

Generators without runtime models conversion use "original" property naming by default. It's still possible to change it via cli options

Generators with runtime conversion keep using "camelCase"

* Refactoring: use enum instead of string for modelPropertyNaming

* Restore the original camelCase for var names, decouple it from property names

* Swap toParamName and toVarName logic (looks like I've mistaken them)

* Regenerate docs

* Remove a no longer used private method
2020-02-28 07:31:19 +01:00
Nikita
a4fc319502
Fix #5420 add headers from configuration object (#5422)
* Fix #5420 add headers from configuration object

* Add baseOptions undefined checking #5420

* Update the samples and replace array to object #5420

* Update sample
2020-02-28 07:27:41 +01:00
Jim Schubert
ea2acf0cc1
[docs] Enable Algolia search (#5472) 2020-02-28 11:33:40 +08:00
Michele Albano
b0b46d57e0
Support for additionalProperties in the C generator "Client: C" solves #5395 (#5440)
* Support for additionalProperties in the C generator.

* Support for additionalProperties in the C generator.
2020-02-28 09:22:50 +08:00
William Cheng
50d21cb0d1
fix issue with online service (#5461) 2020-02-27 22:03:35 +08:00
William Cheng
5f547b821f
[Java][WebClient] better code format (#5433)
* better code format for java webclient

* prefix local varaible with localVar
2020-02-27 12:05:03 +08:00
William Cheng
ba0d673eaa
fix NPE for enum (#5445) 2020-02-27 12:04:38 +08:00
Richard Whitehouse
ca9376fdbb
[Rust Server] Support RFC 7807 (#5407)
* Support RFC 7807 - Problem Details for HTTP APIs
* Add test for RFC 7807
* Update samples
2020-02-26 18:18:01 +00:00
Johnny Peck
6ad9fbc9a6
Update usage.md (#5443) 2020-02-26 14:25:00 +08:00
Akihito Nakano
427adc74f2
[Ruby] Add error output (#5428)
* Add error output to the log so that we can make sure why the error occurred

* Fix forbidden method invocation using default charsets
2020-02-26 12:57:48 +09:00
William Cheng
875ff05f30
include kotlin jackson in CI tests (#5438) 2020-02-26 11:39:09 +08:00
Herve DARRITCHON
f6ef4fbec7
[kotlin][client] Add Jackson as serialization library (#5236)
* [kotlin][client] Add Jackson as serialization library

* [kotlin][client] Add kotlin-client-jackson.sh to kotlin-client-all.sh

* update kotlin client samples

* update doc

Co-authored-by: William Cheng <wing328hk@gmail.com>
2020-02-25 23:41:09 +08:00
William Cheng
8b64f4d03e update java webclient sample 2020-02-25 18:22:29 +08:00
dwlabcube
ece48d0bbc
Removal of Encoding in the Query-Params in order to prevent double Encoding. (#5255)
This way letting WebClient do its Job in encoding the URL.
2020-02-25 18:10:40 +08:00
William Cheng
dbd89d5de4
Add a link to Xero blog post (#5426) 2020-02-25 17:38:20 +08:00
sunn
2d6311cbdc
Change the Model template (#5222) 2020-02-25 17:21:44 +08:00
William Cheng
54c2956461
[Erlang][Server] fix import for multiple API key auth (#5424)
* fix multi api key import in erlang server

* update samples

* better code format for cpp server generator
2020-02-25 16:43:01 +08:00
Sem Schilder
c0fcffdfe4
Add return types to getter and fluent setter (#5348)
* Add return types to getter and fluent setter

* Add build example output
2020-02-25 11:46:43 +08:00
Alexej
b05df5d3ef
[Java] Error generating java due to a default for a date #5086 (#5333)
* Fix OpenAPITools#5086 handling date examples in openapi 3.0

* Fix OpenAPITools#5086
created test for handling date value
renamed variable p to schema
created field birthday in test yaml

* Fix OpenAPITools#5086
reverted birthday, because breaking tests

* Fix OpenAPITools#5086
create String in ISO format for date default. That can be converted to LocalDate
fixed Test
2020-02-25 11:24:14 +08:00
Çağdaş
8f738a9b41
[erlang] Do not export function if not defined. (#5394)
Logic added to logic_handler.mustache so that it does not export authorize_api_key/3 when the function is not defined, leading to compilation error.
2020-02-25 10:45:16 +08:00
Alexander Weaver
04cad77caa
Add reserved word option to Pistache and Restbed generators (#5418)
* Add reserved word option to Pistache and Restbed generators

* Regenerate docs
2020-02-25 10:37:43 +08:00
Alexander Weaver
231ec6bcac
[BUG][C++] Avoid using plain underscore when escaping reserved words (#5269)
* Don't use plain underscore when escaping reserved words

* Regenerate petstore output

* Add CLI option for reserved word prefix

* Ensure CLI option isn't cleared in cpprest client codegen

* Regenerate docs
2020-02-24 21:24:43 +08:00
Åsmund Grammeltvedt
23e76f2a50
[typescript] Add ReadonlyArray to native types (#5399)
* [typescript] Add ReadonlyArray to native types

This allows mapping the array type to TypeScript's ReadonlyArray

* Update docs

* restart travis
2020-02-24 11:13:13 +01:00
William Cheng
93ff976102
Add mailslurp to the user list (#5412) 2020-02-24 10:05:34 +08:00
Hector Jusforgues
2b1a64159d
kotlin-server: fix features' imports (#5404)
make the import conditional, and add a few that were missing

without this, setting `featureCORS` or `featureConditionalHeaders` to true produces invalid code
2020-02-23 17:44:50 -05:00
Jim Schubert
ef008549b3
[handlebars] Honor supporting files when applying bundles (#5364)
* [handlebars] Honor supporting files when applying bundles
2020-02-23 16:59:37 -05:00
Tomasz Prus
3f0c163f0c
[python] add method to set/get default configuration (#5315)
* [python] add method to set/get default configuration

* [python] change method name and fix handling api_key

* python: using modified deepcopy to set/get default configuration

* python: update samples

* python: update samples
2020-02-23 14:10:44 -06:00
Jim Schubert
e4823cf4e6
[go][java] Document new parameterized server support (#5380)
* [go][java] Document new parameterized server support

* [java] Regenerate samples
2020-02-22 20:06:38 -05:00
Richard Whitehouse
1b3094be87
[Rust Server] Add support for untyped properties and models (#5339)
* [Rust Server] Add support for untyped properties
* [Rust Server] Improve support for untyped data
* Update samples
2020-02-22 20:29:51 +00:00
Richard Whitehouse
71aef72bbd
[Rust Server] Support objects as query parameters (#5338)
- Support objects as query parameters
- Update samples
2020-02-22 18:25:57 +00:00
Richard Whitehouse
71f532072b
[Rust Server] Support header objects (#5337)
[Rust Server] Support header objects

Support operations with objects in the header
2020-02-22 15:55:26 +00:00
Sebastien Rosset
e08e05a2c7
[Python] add discard_unknown_keys parameter (#5362)
* add discard_unknown_key parameter

* add discard_unknown_key parameter

* add discard_unknown_key parameter

* discard unknown keys in composed schema if configuration.discard_unknown_keys is set

* discard unknown keys in composed schema if configuration.discard_unknown_keys is set

* discard unknown keys in composed schema if configuration.discard_unknown_keys is set

* discard unknown keys in composed schema if configuration.discard_unknown_keys is set

* discard unknown keys in composed schema if configuration.discard_unknown_keys is set

* discard unknown keys in composed schema if configuration.discard_unknown_keys is set

* discard unknown keys in composed schema if configuration.discard_unknown_keys is set

* discard unknown keys in composed schema if configuration.discard_unknown_keys is set

* discard unknown keys in composed schema if configuration.discard_unknown_keys is set

* discard unknown keys in composed schema if configuration.discard_unknown_keys is set

* discard unknown keys in composed schema if configuration.discard_unknown_keys is set

* discard unknown keys in composed schema if configuration.discard_unknown_keys is set

* discard unknown keys in composed schema if configuration.discard_unknown_keys is set

* discard unknown keys in composed schema if configuration.discard_unknown_keys is set

* discard unknown keys in composed schema if configuration.discard_unknown_keys is set

* discard unknown keys in composed schema if configuration.discard_unknown_keys is set

* discard unknown keys in composed schema if configuration.discard_unknown_keys is set

* discard unknown keys in composed schema if configuration.discard_unknown_keys is set

* discard unknown keys in composed schema if configuration.discard_unknown_keys is set

* discard unknown keys in composed schema if configuration.discard_unknown_keys is set

* discard unknown keys in composed schema if configuration.discard_unknown_keys is set

* discard unknown keys in composed schema if configuration.discard_unknown_keys is set

* discard unknown keys in composed schema if configuration.discard_unknown_keys is set

* discard unknown keys in composed schema if configuration.discard_unknown_keys is set

* run sample scripts for python

* code reformatting

* execute script in bin directory

* improve unit tests for discarding properties
2020-02-21 16:51:24 -06:00
Hinrik Örn Sigurðsson
972ba18e6a
[PHP] Remove model prefix/suffix from inline enum var names (#4489)
* [PHP] Remove model prefix/suffix from inline enum var names

This resolves issue #4403.

On a model `Foo` with an inline enum `Bar` which has a possible string
value `baz`. we should generate a `FooDTO::BAR_BAZ` constant, not
`FooDTO::BAR_DTO_BAZ`.

* Empty commit for another CI run
2020-02-21 16:37:17 +09:00
Artem
78cc5dae6c
[PHP] Fix additionalProperties annotation in models. (#5318)
* Fix additionaVariables in php-symfony model

* Fix additionaVariables in php-symfony model (second try, tested)
2020-02-21 16:34:16 +09:00
Jiri Kuncar
222393123b
[go] Fix filenames with $GOOS and $GOARCH sufixes (#5283)
* [go] Fix filenames with $GOOS and $GOARCH sufixes

* Too early commit

* Use suffix instead of name
2020-02-21 09:30:11 +08:00
William Cheng
fcf6a8e550
use new k6 logo (#5383) 2020-02-21 09:17:29 +08:00
Slavek Kabrda
010dad209a
[go-experimental] Add model constructors to initialize non-container vars with defaults (#5175)
* [go-experimental] Add model constructors to initialize non-container vars with defaults

* Add docstring and extend model_doc to include the constructor

* Make variable names in constructor follow Go naming guidelines

* Provide 2 different constructurs as suggested + couple fixes to generate constructors right under all circumstances

* Fix defaults for enums

* Properly escape vars that have reserved names
2020-02-20 10:13:53 -05:00
LoveIsGrief
33483b2f20
Respect usenose for Python CI (#5376)
* python: Respect useNose option in generated CI templates

Travis and Gitlab CI now use nosetests or pytests depending on the "useNose" option that is passed.

* python: Update CI samples

They now respect the "useNose" option
2020-02-20 21:47:13 +08:00
topce
fa5beeecd0
typescript-angular: support angular 9 (#5370)
* fix code to support ng9
also render in tempate module with providers

* execute script .\bin\windows\typescript-angular-petstore-all.bat
and commit result

* re-generate samples

* remove whitespace, re-generate samples

* re-generate samples

* code cleanup

Co-authored-by: Esteban Gehring <esteban.gehring@gmail.com>
2020-02-20 13:50:26 +01:00
jornhd
28f649a078
Issue 5306 support for client certificates (#5328)
* Issue #5306: Added support for client certificates for csharp-netcore

* Added missing windows petstore scripts

* Updated sample client

* Added missing openapi3 samples

* Added missing images causing openapi3 test projects to fail
2020-02-20 09:49:49 +08:00
William Cheng
bb113eb4db
add k6.io to the user list (#5379) 2020-02-20 09:40:54 +08:00
William Cheng
056a3ec0f6
[K6] minor improvements (#5368)
* update readme

* minor improvement

* add windows batch file for k6

* update template to reference openapi-generator

* update samples

* update doc
2020-02-20 09:25:11 +08:00
William Cheng
b16e07cff4
add post processing to nodejs express server (#5369) 2020-02-20 00:30:08 +08:00
Igor Savin
734a35a45a
Update maven-javadoc-plugin for Java 11 support (#5361)
* Resolves `An error has occurred in Javadoc report generation: [ERROR] Exit code: 1 - javadoc: error - The code being documented uses modules but the packages defined in https://docs.oracle.com/javase/8/docs/api/ are in the unnamed module` error that happens when using Java 11

* Resolves `An error has occurred in Javadoc report generation: [ERROR] Exit code: 1 - javadoc: error - The code being documented uses modules but the packages defined in https://docs.oracle.com/javase/8/docs/api/ are in the unnamed module` error that happens when using Java 11

* Fix duplicate configuration entries

* Fix okhttp poms

* Remove letter that shouldn't be there
2020-02-20 00:28:21 +08:00
Jiri Kuncar
a09271e76d
[java] Support templated servers (#4998)
* [java] Support templated servers

* Deprecate old signature of invokeAPI method

* throw ArrayIndexOutOfBoundsException

* Update modules/openapi-generator/src/main/resources/Java/ServerConfiguration.mustache

* [java] Regenerate samples

Co-authored-by: Jim Schubert <james.schubert@gmail.com>
2020-02-19 09:27:45 -05:00
William Cheng
6cd3fc5429 add new doc for k6 2020-02-19 16:21:02 +08:00
William Cheng
ce53f43771 update generators doc 2020-02-19 16:13:12 +08:00
Mostafa Moradian
79caba8d84
[k6] OpenAPI code generator for k6 API load-testing tool (ES5.1+) (#5300)
* Add generator for converting OpenAPI spec to k6 script

* Fixed names and URL

* Add @wing328's proposed changes to fix the builds
2020-02-19 16:04:39 +08:00
Akihito Nakano
37556c2d96
Fix: "isAlias" of CodegenModel (#2758)
* Add test case to reproduce the issue

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

* Fix: an alias of "an alias of simple OAS type" has an incorrect property `isAlias: false`

* Use ModelUtils instead of referring the "type" value directly

* Delete an unnecessary condition

* Tweak: the order of conditions

* Fix wrong "isAlias" value on ComposedSchema
2020-02-19 14:54:54 +08:00