12694 Commits

Author SHA1 Message Date
Alessio Zurru
1fe7d703d7
Provides a default nil value for optional init parameters (#6827)
The following change can be helpful to create Swift model objects more simply, in particular when they have many parameters.
In addition, projects switching from swagger-codegen to OpenAPI will not encounter compilation errors and will not need to refactor old code
2020-07-02 00:13:08 +08:00
William Cheng
fa97333a5c
[Java] Deprecate feignVersion option (#6824)
* deprecate feign option

* update doc

* udpate samples
2020-07-02 00:12:32 +08:00
Marcel Ramos
8e95298653
[R] Enum R6Class Support, closes #3367 (#5728)
* wip: fix documentation tags

* update model.mustache

* update template for documentation

* update mustache templates

* update mustache templates

* run ./bin/r-petstore and update R pkg docs

* use loadNamespace instead of package:pkgName string

* update R package code

* wip: enum

* update enum function

* use httr::content to unwrap response

* update enum table and functions

* include simplifyVector and auto_unbox arguments

* remove mapping and return strings

* use triple stash values and update enum class methods

* remove extra comma

* minor: formatting

* update and run ./bin/r-petstore.sh

* move helper for template

- export tag does not coincide with original model function
- move helper down so it does

* update tests based on generator

* Revert "update tests based on generator"

This reverts commit b6314c8927a8411561577c0dfd100018947de42e.

* Update tests with engine

- preserve test_petstore.R

* restore apiResponse

* restore simplifyVector to TRUE value

* update api.mustache templates

* fix and add tests to package

Co-authored-by: William Cheng <wing328hk@gmail.com>
2020-07-01 15:48:09 +08:00
Benoît Courtine
fa72c63b62
[Rust][Client] Unify sync/async client structure (#6753)
* Unify sync/async client structure (configuration as first param instead of a struct).

* Fix: Hyper client requires the client.rs file.

Co-authored-by: Henning Holm <git@henningholm.de>

* Add API method comments (description and/or notes when available).

Co-authored-by: Henning Holm <git@henningholm.de>
2020-07-01 15:24:20 +08:00
Yuriy Belenko
6224f5e397
[php-ze-ph] Set required PHP version to ^7.2 (#6763)
* Bump required PHP version to ^7.2

* Update required PHP version in readme

* Change samples input spec to OAS 3.0

* Refresh samples
2020-07-01 15:11:34 +08:00
Jochen Schalanda
d9957ad0a9
[Java][client][native][Gradle] Add missing jackson-databind-nullable (#6802)
* Add missing jackson-databind-nullable to java-native Gradle build

Closes #6801

* Regenerate java-native samples

* update samples

Co-authored-by: William Cheng <wing328hk@gmail.com>
2020-07-01 15:08:28 +08:00
Kasper Kondzielski
323cd38b5c
Improve sttpOpenApiClient generator (#6684)
Co-authored-by: eugeniyk <keatrance@gmail.com>
2020-06-30 21:14:34 -04:00
Chris Tankersley
d433c2d42f
[php-laravel] Upgrade php-laravel to 7.x (#6346)
* Update laravel from 5.6 to 7.0

* Updated petstore example, removed missing files

* Updated PHP version to match composer.json

* Add samples generation config with OAS3 input spec

* Fixed gitignore compile errors, updated to newest petstore example

* Add composer.lock to .gitignore

* Fix generator gitignore location

* Add integration tests

* Refresh samples

Co-authored-by: Yuriy Belenko <yura-bely@mail.ru>
2020-06-30 12:22:32 +03:00
William Cheng
f05aa8e80d
Prepare 5.0.0-SNAPSHOT (#6812)
* Revert "Prepare 5.0.0-beta release (#6803)"

This reverts commit a77fd443ad9c5fcd85186b76a15abd1b02887576.

* prepare 5.0.0 snapshot

* update non-java-invalid-spec.xml
2020-06-30 01:19:46 +08:00
William Cheng
a77fd443ad
Prepare 5.0.0-beta release (#6803)
* prepare 5.0.0-beta release

* fix java-client pom
2020-06-29 23:06:47 +08:00
Bernd Hacker
156c4bfb70
[typescript-rxjs] add support for raw response and progressSubscriber (#5465)
* feat(typescript-rxjs): add support for returning statusCode and progressSubscriber via function overloading

* feat(typescript-rxjs): use ?? instead of || to support relative basePath of "", upgrade to typescript 3.7

* feat(typescript-rxjs): regenerate samples

* refactor(typescript-rxjs): change explicit undefined checks to shorthand return

* feat(typescript-rxjs): add missing progressSubscriber key when building RequestArgs

* feat(typescript-rxjs): regenerate samples

* style(typescript-rxjs): remove whitespace, add colons

* feat(typescript-rxjs): regenerate samples

* refactor(typescript-rxjs): destructure configuration in BaseApi

* fix(typescript-rxjs): returning empty string for apiKey and accessToken

* feat(typescript-rxjs): replace withStatusCode option with response = raw option, reuse rxjs AjaxRequest and AjaxResponse types

* feat(typescript-rxjs): regenerate samples

* Prints out the parameter name in throwIfNullOrUndefined

* Fixed misspelling

* feat(typescript-rxjs): add withProgressSubscriber additional-properties flag to cli, remove unused withInterfaces flag

* refactor(typescript-rxjs): use backticks instead of String constructor in encodeURI

* feat(typescript-rxjs): replace Object.keys() with Object.entries() in queryString helper

* style(typescript-rxjs): improve indentation of new withProgressSubscriber checks within templates

* feat(typescript-rxjs): use entire es2017 lib in tsconfig.json for building with target es6

* feat(typescript-rxjs): regenerate samples

* feat(typescript-rxjs): adjust sample generation, regenerate samples

* docs(typescript-rxjs): regenerate docs

Co-authored-by: Justin Van Dort <justinvandort@gmail.com>
2020-06-29 16:01:15 +02:00
Mathias Lykkegaard Lorenzen
d9a6f4d726
typescript-fetch: Fix compile error (#6538)
* Fix annoying compile error

Fixes an annoying compile error that happens when a .NET Core 3.1 Swashbuckle generated `swagger.json` has a Controller with a request class.

> Type 'ApproveBrandRequest[]' is not assignable to type 'string | number | boolean | HTTPQuery | (string | number | boolean)[]'.
  Type 'ApproveBrandRequest[]' is not assignable to type '(string | number | boolean)[]'.
    Type 'ApproveBrandRequest' is not assignable to type 'string | number | boolean'.
      Type 'ApproveBrandRequest' is not assignable to type 'true'.

* generated template files.

* update samples

Co-authored-by: Mathias Lorenzen <mathias.lorenzen@broelstaerk.dk>
Co-authored-by: William Cheng <wing328hk@gmail.com>
2020-06-29 15:08:28 +02:00
ngp-star
6a61910df1
fix for operation defination containing ref schema (#6676) 2020-06-29 16:13:28 +08:00
William Cheng
e3cdb4c328
[Java][jersey2] Add nullable body support (#6784)
* add nullable body support

* update serializeToString with nullable body

* add nullable support to body parameter

* minor code format change

* Revert "minor code format change"

This reverts commit 3af1838a9bf421e633165dbd8e62bb7740b539ef.

* code format fix
2020-06-29 16:08:42 +08:00
Sebastien Rosset
6dfd029c63
[java][jersey2] Add support for (expires) and (created) fields in HTTP signature (#6632)
* Add support for (expires) and (created) fields in HTTP signature

* Add support for (expires) and (created) fields in HTTP signature
2020-06-28 23:14:22 +08:00
William Cheng
6041acd225
[PowerShell] fix hardcode method name in test files (#6794)
* fix hardcode test

* update FILES
2020-06-28 10:49:16 +08:00
Jan Gassen
a69fcddbe2
Copy vendor extensions from request body (#6766) 2020-06-27 15:14:53 +08:00
agilob
1798fea3e7
Dart - generate constructor with named params (#6751)
* Dart - generate constructor with names params

* Test if constructor exists
2020-06-27 15:11:36 +08:00
Tomofumi Chiba
1f277002a1
Add Deno support to typescript(experimental) generator (#6732)
* add 'deno' to typescript platforms

* add Deno support to typescript generator

* add Deno support to typescript generator

* add Deno support to typescript generator

* add Deno support to typescript generator

* add Deno support to typescript generator

* add extensionForDeno property for typescript generator

* add URLParse Deno wrapper for typescript generator

* update deno version in .travis.yml
2020-06-27 08:32:43 +02:00
Ghufz
f1142948c0
fix the json depth for nested object (#6787)
Co-authored-by: Author <>
2020-06-27 10:12:26 +08:00
William Cheng
5cce9dc7d3 replace tab with spaces in swift 5 codegen 2020-06-26 16:55:35 +08:00
Seth
933b285568
Add Ability to use isSet when Array is uniqueItems (#6773) 2020-06-26 16:37:29 +08:00
William Cheng
919b3b6bef
[Java][jersey2] Add debugging to OAuth (#6757)
* add debugging to oauth

* use fine instead
2020-06-26 16:25:55 +08:00
Jiri Kuncar
8b9c070e5d
[Python] Support for per-operation servers (#6557)
* Dynamic server support

* regenerated

* Apply suggestions from code review

Co-authored-by: Thomas Hervé <thomas.herve@datadoghq.com>

* regenerated

* Add ParameterizedServer feature to Python experimental

* Fix lookup of server variables

* Add tests and change default value for servers

* Fix server variables

* Return base path when index is None

* Use HOST

* Apply suggestions from code review

* Apply suggestions from code review

* regenerated

* Add specific tests for dynamic servers

* regenerated

* add docstring

* regenerated

* Fix wrong merge resolution

Co-authored-by: Thomas Hervé <thomas.herve@datadoghq.com>
2020-06-25 21:28:54 -07:00
agilob
50071aed11
Protect from NPE when paths aren't provided (#6734)
* Protect from NPE when paths aren't provided

* Add regression test for NPE when paths aren't provided

* Replace logger.debug with logger.error
2020-06-25 23:32:26 +08:00
William Cheng
36930fe5cc
[PS] better code format, vendor extension naming (#6778)
* better code format, extension

* show php version

* set php version to 7.2.15
2020-06-25 18:09:44 +08:00
Ghufz
13fe079901
[PowerShell] discard readonly properties in Initialize cmdlets (#6754)
* ValidatePattern having double quote(") throws exception on running Build.ps1

* fix tab with space

* [powershell-experimental] : http signature auth

* fix the tab issue

* merge cnflict fix for powershell experimental

* Htpp signing : added support for ecdsa

* Update modules/openapi-generator/src/main/resources/powershell/configuration.mustache

Co-authored-by: Sebastien Rosset <serosset@cisco.com>

* Update modules/openapi-generator/src/main/resources/powershell/configuration.mustache

Co-authored-by: Sebastien Rosset <serosset@cisco.com>

* Update modules/openapi-generator/src/main/resources/powershell/configuration.mustache

Co-authored-by: Sebastien Rosset <serosset@cisco.com>

* Update modules/openapi-generator/src/main/resources/powershell/configuration.mustache

Co-authored-by: Sebastien Rosset <serosset@cisco.com>

* Update modules/openapi-generator/src/main/resources/powershell/configuration.mustache

Co-authored-by: Sebastien Rosset <serosset@cisco.com>

* HttpSigningHeader accepts any header available in request to calculate the signature.

* Update modules/openapi-generator/src/main/resources/powershell/http_signature_auth.mustache

Co-authored-by: Sebastien Rosset <serosset@cisco.com>

* Incorporated the review comments

* addressed the merge conflict

* discard readonly property in initialize cmdlets

* update doc

* update powershell sample

Co-authored-by: Ghufran Zahidi <gzahidi@cisco.com>
Co-authored-by: Sebastien Rosset <serosset@cisco.com>
Co-authored-by: William Cheng <wing328hk@gmail.com>
2020-06-25 16:34:38 +08:00
William Cheng
6b877efe1f
[Java][jersey2] fix oneOf, anyOf documentation (#6695)
* fix oneOf doc in Java jersey2

* fix sample code

* add new files

* minor tweat to the doc
2020-06-23 21:58:16 +08:00
Jiri Kuncar
33328977d1
[Python] enum serialization (#6746)
* [Python] enum serialization

* Fix serialization of nested enum
2020-06-22 11:07:18 -07:00
Nalaxon
cb87e341d1
typescript-jquery: create empty array to prevent pushing to undefined (#6743)
Co-authored-by: Rapp Bernhard <bernhard.rapp@lec.tugraz.at>
2020-06-22 14:23:25 +02:00
bgong-mdsol
8400d4c6f9
java-native added WithHttpInfo (#6704)
remove /t
2020-06-22 16:15:11 +08:00
Jiri Kuncar
b47f3fadee
[go] Required fields are not pointers (#6698)
* [go] Required fields are not pointers

* regenerated
2020-06-21 23:19:26 +02:00
sunn
ec4e44a5f4
[C++]Enable forward declaration for C++ (#6654)
* Enable forward declaration for C++

* Change local var name for readability and remove newline char

* Rename variables and refactor if statements
2020-06-21 23:17:03 +02:00
Yuriy Belenko
e49804fd7f
[php-slim4] Move Data Mocker to external repo (#5930)
* Remove package from sources

* Add Mocker package

* Add BaseModel

Beside setters and getters this class implements three methods required
for mocking: getOpenApiSchema, createFromData and jsonSerialize.

BaseModel keeps all data values in $dataContainer like PHP client does.
I don't see other way to support scalar models(enum for instance).
That's why I've removed class variables generation.

* Update documentation

* Update PHPUnit section in readme

* Add constant with models namespace

This constant will be required for data deserialization when handling
refs.

* Refresh samples

* Add samples generation config
2020-06-21 22:16:44 +08:00
Falko Modler
313d205f56
[maven] Avoid "Schema unaliasing" INFO-spam on the Maven console (#6687) 2020-06-21 19:19:35 +08:00
Michał Cichoń
195b376f48
Fix objc template (#6725)
- A static set needs a static lock or we get multiple locks if the class is inherited
- If this fix is not included and SWGObject is accessed from a second thread then we get EXC_BAD_ACCESS error (crash)
2020-06-21 19:12:46 +08:00
Ravisankar-Challa
4bb5afdefb
[Java][Microprofile] JSON enum processing fix (#6700)
* When withXml=false we shouldn't add the jaxb imports

When users are just dealing with json and set withXml=false jaxb (Java Api XML binding) imports are not needed.

* Updated the microprodile-rest-client samples

* Removed cxf-rt-rs-extension-providers dependency

* Fix processing of enum values

* Remove unwanted changes

* Remove spaces
2020-06-21 19:02:44 +08:00
sunn
efafc58170
The templateDir for aspnet is not set correctly (#6724) 2020-06-21 18:52:29 +08:00
William Cheng
177bd52957
map AnyType to mixed in php generators (#6710) 2020-06-21 14:56:19 +08:00
William Cheng
979dfd131a
Mark typescript-angularjs as deprecated (#6723)
* mark angularjs as deprecated

* add new files
2020-06-21 14:35:12 +08:00
William Cheng
06327da4f0
better logic when using useOneOfDiscriminatorLookup (#6707) 2020-06-19 23:52:51 +08:00
YishTish
5cdc9e9e35
Pass body to service (#6041)
* Fixed a bug where request body names were not being transferred appropriately based on openapi definitions

* Added changes made to output samples

* Fixed formatting on Controller.mustache

* Added sample code generated after last change
2020-06-19 20:44:08 +08:00
Benoît Courtine
93bd8571d3
[Rust][Client] Multiple returns becomes optional (fixes #6650). (#6673)
* fixes #6650. Rust client: multiple returns becomes optional.

* Rename new param "supportMultipleReturns" into "supportMultipleResponses".

* Remove redundant `UnknownList` enum option.

* update doc

Co-authored-by: William Cheng <wing328hk@gmail.com>
2020-06-19 14:57:01 +08:00
Douglas McConnachie
4e352cb282
add query param object format options (#5790)
fixes: #5781

Signed-off-by: Douglas McConnachie <dougal83+git@gmail.com>
2020-06-18 18:12:45 +02:00
Sebastien Rosset
5811b05cdb
[java][jersey2] Fix processing of additional, undeclared properties (#6647)
* Add unit tests for additional properties

* add unit tests

* Add unit tests and fix processing of additionalProperties

* fix deserialization issue with additional properties
2020-06-18 23:17:00 +08:00
William Cheng
ca3a23bfa8
remove incorrect type mapping (#6693) 2020-06-18 20:47:14 +08:00
Hui Yu
b86f6c8015
[C][Client] Convert integer/boolean to string for query parameter in request url (#6652) 2020-06-18 11:19:24 +08:00
William Cheng
951aa7a9d9
add getActualInstanceRecursively (#6636) 2020-06-17 22:45:26 +08:00
Ravisankar-Challa
b729e1d723
Fix issue: Microprofile dateLibrary java8 not working (#6062) 2020-06-17 15:30:10 +08:00
Ravisankar-Challa
42784ee1cc
[Java][MicroProfile] Use jsonb imports for serializing and deserializing enum (#6064)
* Use jsonb imports for serializing  and deserializing pojo

* Fix: Exclude jsonbProperty class when withXml=true

Co-authored-by: Ravisankar Challa <ravisankar.challa@qantas.com.au>
2020-06-17 14:56:02 +08:00