8767 Commits

Author SHA1 Message Date
Richard Whitehouse
f32b1463bc
[Rust Server] Support numeric operation IDs (#5453)
* [Rust Server] Support operation IDs which begin with a number
* [Rust Server] Add test for a numeric operation ID
* Update samples
2020-02-29 19:23:54 +00:00
Jiri Kuncar
165ad45797
[go] Add Ptr method to const enum values (#5257) 2020-02-29 14:05:14 -05:00
Richard Whitehouse
a6e96b4971
[Rust Server] Handle numeric response description (#5452)
* [Rust Server] Handle response descriptions which start with a number.
* [Rust Server] Add test for numeric response descriptions
* Update samples
2020-02-29 14:54:47 +00:00
Richard Whitehouse
f5c5b91f83
[Rust Server] Nullable fixes (#5408)
* [Rust Server] Nullable fixes
* [Rust Server] Add tests for nullable cases
* Update samples
2020-02-29 13:37:12 +00:00
William Cheng
0ed1b83593
fix CVE-2020-8130 (#5483) 2020-02-29 20:04:34 +09:00
Justin Black
9e596697a9
[python] Adds python oneOf/anyOf models + tests (#5341)
* Adds oneOf + anyOf schemas, models and tests to python-experimental

* Adds setUpClass and tearDownClass

* Removes newline in method_init_shared.mustache

* Regenerated v3 spec sample for python-experimental

* Fxes test for discard_unknown_keys

* Moves new models into existing spec, regen python-exp and go-exp

* Also fix python-exp windows file
2020-02-28 14:21:08 -08:00
Justin
857a4bf5d9
Use the dataType if the baseType is not set (#5372)
* Use the dataType if the baseType is not set

* add tests for passing enum as parameter

* updated requirements file in samples

* Update spec to explicitly name objects and prevent `inline_object`

* use the correct scripts to generate samples (`bin/openapi3/python-flask*`)
2020-02-28 09:46:57 -08:00
William Cheng
4603061c17
[Scala][sttp] various improvements (#5475)
* various improvements to scala sttp

* update ScalaSttpClientCodegen.java

* add windows batch file

* test scala sttp in jdk8

* fix tempalte directory
2020-02-29 00:34:46 +08:00
Aleksandr Nekrasov
84250973be
[scala] strip model class name for all scala generators (#5439)
* stripped parameter enabled for all scala based generators

* scala samples updated

* docs generators updated

* fix scalatra. regenerated by openapi3 script.
manually removed enum default value from scalatra example due bug in schema extraction
2020-02-28 20:44:02 +08:00
Akira Tanimura
cc20eb8109
[Ruby] Fix obsolete configuration of Rubocop and Rubocop's warns (#5417) (#5474)
* fix obsolute configuration in generated .rubocop.yml

* fix style of `expect` with block in generated ruby client's test code

* update sample of ruby client
2020-02-28 20:36:25 +08:00
Aleksandr Nekrasov
40cbbbfefd
[scala] [template] scala sttp client (#5429)
* scala-sttp-client template

* invoker for sttp fixed and tests added

* clean up pet api test from redunant comments

* docs updated

* fix artefact name, model comments and redunant generic

* code optimization

* cross scala versions 2.11 2.12 2.13

* date serializers extracted and joda enabled as default

* basic and bearer authorization added, apikey in query supported
2020-02-28 15:48:55 +08:00
Bruno Coelho
d325e8c618
[Swift5] small improvements to Objc compatibility (#5410)
* [swift] make some small improvements

* [swift][client] revert model to use allVars

* PostProcessModelProperty with allVars

* PostProcessModelProperty with vars

* [swift] improve objc interoperability

* [swift] fix swift4 for CI to pass

* [swift] improve objc interoperability

* [swift] improve objc interoperability

* Swift - try to fix build

* [swift] remove pods from git
2020-02-28 14:47:18 +08:00
Jim Schubert
36b1a61b70
[all] Move feature set setter (#5460)
When I originally implemented the feature set code, I added the
getter/setter on DefaultCodegen and CodegenConfig as well as on
GeneratorMetadata. GeneratorMetadata also includes the library variation
features. When I went to add library-specific features, I realized the
discrepancy.

This removes the public setter from DefaultCodegen/CodegenConfig, and
adds a protected modifyFeatureSet which accepts a lambda and hides the
builder logic away in the method.

This will be a breaking change for anyone who's created a custom
generator in 4.2.3, so the impact is very limited.
2020-02-28 14:45:06 +08:00
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
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
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
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
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
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
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
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
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