18059 Commits

Author SHA1 Message Date
delenius
7b5a583345
Make JS client case sensitive wrt. reserved words (#8905)
Fixes #8904
2021-03-06 18:40:06 +08:00
Pavel Sveda
e25fa8ed7d
Allow to set additional property of any type. Useful for Boolean values. (#8507) 2021-03-06 17:35:23 +08:00
Blackclaws
85fd96a9ce
[csharp-netcore] Make Blazor Webassembly compatible (#8876)
* Catch exception thrown in Blazor Webassembly when trying to access cookies

* Update samples
2021-03-06 15:50:48 +08:00
sunn
65a31f1d9f
Make header checks case insensitive as described in RFC (#8874) 2021-03-06 15:49:51 +08:00
Sean Kelly
a13b222764
[Qt5] Emit signal when api has finished processing all pending work (#8884)
* Fixes #8864

* More elegant solution

* Rerun sample generation

* Fix whitespace that was fixed in merge conflict
2021-03-05 21:43:26 +01:00
sunn
3a40818519
Updated test and fix/workaround failed tests (#8899) 2021-03-05 17:54:21 +01:00
Jeff Shillitto
641ddc7cee
Add Shotstack to users list (#8897) 2021-03-05 14:54:12 +08:00
William Cheng
ddc38b27bb Merge remote-tracking branch 'origin/master' into 6.0.x 2021-03-05 00:06:38 +08:00
Oleh Kurpiak
976b4aa757
[Java] Additional enum type annotations (#8389)
* [Java] Additional enum type annotations

* [Java] Additional enum type annotations
2021-03-04 23:33:00 +08:00
William Cheng
e18d4b97e0
[csharp-netcore][httpclient] add tests, bug fixes (#8885)
* add tests to csharp-httpclient petstore

* fix basepath in tests

* fix response headers

* skip file upload test in httpclient

* update samples

* update tech committee
2021-03-04 16:02:31 +08:00
sunn
1983dfc122
Indendation and whitespace changes (#8879)
Indentation and code readability
2021-03-03 20:36:11 +01:00
William Cheng
4986ea8c93 update samples 2021-03-04 00:45:20 +08:00
William Cheng
0c37275224
[C#][netcore] update dependencies to newer versions (#8872)
* update csharp-netcore dep to newer versions

* restore Org.OpenAPITools.Test.csproj

* rollback CompareNETObjects version

* rollback .net test sdk

* use 15.9.2 for test

* rollback sdk test version

* Revert "rollback CompareNETObjects version"

This reverts commit c03c00facb8138ffe6ec9272e6c5e36351f2c5b0.

* Revert "Revert "rollback CompareNETObjects version""

This reverts commit acc66ae4f92a78eb59d4c0d77f1cff67df2c333f.
2021-03-03 20:12:56 +08:00
sunn
d4696157d6
Add QSet Header to the Helper (#8873) 2021-03-03 18:13:22 +08:00
Blackclaws
8c2a0ce6d6
[csharp-netcore] Fix handling of Dictionary query parameters and fix deepObject style parameter handling (#8848)
* DeepObject also for required parameters

* Fix NullPointerException on inline deepObject such as a Dictionary<string, string>

* Add deepObject in ParameterToMultiMap for deepObjects without explicit parameters

* Add some context to TODOs

* ParameterToMultiMap fixed in CSharp template for OAS 3 Dicts, taking deepObject into account

* Remove added whitespace

* Update samples
2021-03-03 16:59:29 +08:00
William Cheng
e6947d7c22
[C#] Better code format (remove trailing spaces) (#8871)
* remove trailing spaces

* remove trailing space, update samples (C#)
2021-03-03 16:46:12 +08:00
William Cheng
2b3b5a71cf update samples 2021-03-03 16:29:52 +08:00
William Cheng
d96197bcbd Merge remote-tracking branch 'origin/master' into 6.0.x 2021-03-03 16:19:20 +08:00
Sean Kelly
89b9802be3
[QT5] Support optional params using QVariant (#8733)
Use QVariant for optional parameters
2021-03-03 07:45:04 +01:00
Peter Leibiger
d31875f505
[dart][dart-dio] Fix failing master due to unstable test dependency (#8870)
* replace branch ref with commit ref (new release of http_mock_adapter coming soon)
2021-03-03 13:00:22 +08:00
basyskom-dege
950bb3d18f
added QSet as datatype for unique items (#8830) 2021-03-02 18:44:22 +01:00
agilob
83a5c3db1e
[dart] Default value is only available when nullable is not set (#8854)
* Default value is only available when nullable is not set (not false)

* Simplify isNullable mustache syntax
2021-03-02 18:06:45 +08:00
agilob
a34569f065
Correct use of loggers with placeholders and remove some redundant operations (#8842)
* Remove redundant operations

* Use logger correctly with object placeholders

* static compile of frequently used pattern

compile pattern ahead of time to reduce object creation and optimize
method

* Fix typo in method name
2021-03-02 17:24:25 +08:00
Peter Leibiger
5ce64756a6
[dart][dart-dio] Handle nullable/required header/query parameters (#8837) 2021-03-02 11:09:47 +08:00
Peter Leibiger
2ed702b339
[bug][dart][dart-dio] Improve parameterToString handling (#8372)
* [dart][dart-dio] Improve parameterToString handling

* add tests
* not sure this is complete but it is better than before and can serve as a baseline with the test cases

* Add a map parameter to FormData test

* Rename method to clarify what it actually does

* Couple more tests
2021-03-02 11:08:47 +08:00
William Cheng
07f8bde6c1
Test go-gin-server sample with go test -v (#8855)
* test go gin sample with `go test -v`

* install via go get

* update main.mustache
2021-03-02 11:07:25 +08:00
William Cheng
f7b2baf38e
Add ApiClient.mustache for http client library (#8859)
* add api client mustache for http client

* clean up api client template for restsharp

* test c# httpclient in appveyor

* remove apiclient.cs

* regenerate apiclient.cs

* set library for http client

* remove Libraries

* use libraries folder
2021-03-02 10:52:05 +08:00
basyskom-dege
16e7408eb7
[C++][Qt5] Added function to add a new Server. Removed unused variables (#8725)
* cleanup unused variables,added addServerConfiguration() function

* added setNewServer functions

* using QUrl instead of QString
2021-03-01 10:55:28 +01:00
William Cheng
be91db5574
Update C# readme (#8858)
* update readme related to C# httpclient

* update samples, readme
2021-02-28 23:57:01 +08:00
William Cheng
125e6a439b
better code, update sample for erlang client gen (#8853) 2021-02-28 22:38:50 +08:00
Blackclaws
e815d7ced8
C# Netcore WebRequest and HttpClient functionality (#8821)
* Add switch to disable RestSharp

* Introduce CLI Option for webRequestLibrary

* Fix missing brace

* Remove restsharp references

* HttpClient added

* WebRequest NewRequest functionality added

* WebRequest added to CLIOptions

* Add custom HttpMethod only for Restsharp.

* Add WebRequestPathBuilder.mustache

* HttpClient NewRequest

* Add using Statement to WebRequestPathBuilder.mustache

* Adjusts retry configuration for HttpClient

* Reuse JsonDecoder

* Make reusing the client a separate option

* Save cookies in request

* Implement more methods for HttpClient

* Small fixes

* Fix post content

* Add new sample config

* Update existing samples

* Add new sample

* Add new property supportsRetry

* Use new property to exclude RetryConfiguration

* Exclude Polly on non supporting Retry

* Update sample and documentation

* Create HttpMethod Patch for netstandard 2.0 compatibility

* Fix query parameter generation

* Switch to library settings

* Allow httpclient reuse (experimental)

* Remove webrequest from template as its not used right now
2021-02-28 16:18:16 +08:00
Jim Schubert
5a0b832bb4
sonar.yml: Run for OpenAPITools only 2021-02-27 17:00:07 -05:00
sbu
6f413f6aca
Don't deploy to sonar in forks (#8856) 2021-02-27 14:22:34 -05:00
William Cheng
2c0991dabe
better test for go-server (#8852) 2021-02-27 18:21:28 +08:00
Thomas Hervé
3cf93226fa
Make nullable fix on all vars in Go (#8820)
* Make nullable fix on all vars in Go

This applies the Nullable change to all variables on the model, instead
of just the ones in vars.

* Add sample showing the issue
2021-02-27 18:12:51 +08:00
Frank T
ebac91aa32
[OCaml] Fix enum returnType in of_json.mustache for Api Impl (#8631)
* Fix OCaml enum returnType in of_json.mustache

* update samples (ocaml, python)

Co-authored-by: William Cheng <wing328hk@gmail.com>
2021-02-27 17:13:45 +08:00
cal
bc4bc36de7
[cleanup] erefactor/EclipseJdt - Remove redundant semicolons (#8666)
EclipseJdt cleanup 'RemoveRedundantSemicolons' applied by erefactor.

For EclipseJdt see https://www.eclipse.org/eclipse/news/4.18/jdt.php
For erefactor see https://github.com/cal101/erefactor
2021-02-27 15:45:51 +08:00
cal
2327f856cd
[cleanup] erefactor/EclipseJdt - Remove unnecessary casts (#8698)
EclipseJdt cleanup 'RemoveUnnecessaryCast' applied by erefactor.

For EclipseJdt see https://www.eclipse.org/eclipse/news/4.18/jdt.php
For erefactor see https://github.com/cal101/erefactor
2021-02-27 15:42:21 +08:00
Dheeraj Nalluri
264b017eec
[Java][Client] JSON-B serialization support (#8729)
* Added JSON-B support.

* Mention jsonb in docs
2021-02-27 15:32:46 +08:00
Martin Delille
2b716684f3
[cpp-qt5-client ] Improve CMake (#8724)
* Improve CMake

* Don't link ssl and crypto only for apple

* update samples

Co-authored-by: William Cheng <wing328hk@gmail.com>
2021-02-27 15:15:24 +08:00
Yannick Schutz
85b2b3c2e4
Add mime/multipart missing import in go server (#8790) 2021-02-27 14:50:16 +08:00
nitschy
a8b74d10ec
FIX: Error in mustache.api (#8800)
When a GET/PUT/POST operations includes queryParams, then the feign generator wrongly generates the Basename instead of the paramName. That leads to
a java.illegalstateException ("Body parameters cannot be used with form parameters") in Feign Contract when attempting to invoke the Method.
i.e: a generated feign client:
public interface PersonClientTest extends RestApi {
    @RequestLine("GET /personen/{kundenNummer}?mitUnterstruktur={mitUnterstruktur}")
    @Headers({
            "Accept: application/json",
            "If-None-Match: {ifNoneMatch}"
    })
    PersonOut getPersonByKundenNummer(@Param(value="kundenNummer", expander=ParamExpander.class) String kundenNummer, @Param(value="If-None-Match", expander=ParamExpander.class) String ifNoneMatch, @Param(value="mitUnterstruktur", expander=ParamExpander.class) Boolean mitUnterstruktur);
}

in the headers:
 "If-None-Match: {ifNoneMatch}"
but in the method:
 @Param(value="If-None-Match", expander=ParamExpander.class) String ifNoneMatch
the value should be ifNoneMatch instead of "If-None-Match"
2021-02-27 14:47:11 +08:00
Blackclaws
f8770d7c33
C# Aspnetcore Generator. Fix Parameters missing (Name = ) Property (#8826)
* Fix parameter Name= missing.

* Update samples

* Fix wrong name in template

* Update samples again
2021-02-25 23:36:35 +08:00
Peter Leibiger
3e9c1e1fc3
[dart] Remove old leftover format parameter from path (#8834) 2021-02-25 20:29:34 +08:00
Peter Leibiger
fbe2bb7c97
[dart][dart-dio] API class/template refactoring (#8825)
* [dart][dart-dio] Refactor API template

* first construct a `RequestOptions` instance with all parameters etc. inline
* then construct and serialize the body data
* then send the request and await the response
* then deserialize the response
* always use the `specifiedType` for built_value (de)serialization instead of a mix of ways (this does the same as finding the serializer directly)
* use indent of 2 spaces (as per Dart convention)
* prefix all local variables to prevent name clashes with parameters

* Add tests that (de)serialize collections and add API key header
2021-02-25 20:24:21 +08:00
agilob
9fc33f6a73
[Dart] Add configuration to add new generators and add json_serializable (#8789)
* Add Dart configuration flag to set new generator

* Change templates to add json_serializable generator

* Fix dart tests

* Add custom serialization for standard generator

* this change opens us a way to allow adding more than 2 generators

* Add sample project for json_serializer

* Use basename for json field name

* Update samples with basename as json key

* Update dart generator docs

* Create AbstractDartCodegen class

* Update docs, dart-dio and dart-jaguar dont get json_serializable yet

* Deduplicate method calls

* Dix dart-dio generation

* Revert formatting change in dart mustache

* Fix formatting changes again

* Improve dart serialization documentation

specify default serializer

* Better name for cli option

* Rename default dart generator to 'native'

* Another attempt to reduce whitespace noise

* Fix api-client and api-helper

* Rename default serialization mode to include word serialization

* Remove trailing whitespace in enums
2021-02-25 17:11:16 +08:00
Rafael Ceron
34c77c2807
typescript-nestjs: removed unused basePath from api.service template (#8811)
* (nestjs) removed unused basePath from api.service template 8810

* Update modules/openapi-generator/src/main/resources/typescript-nestjs/api.service.mustache

Co-authored-by: Esteban Gehring <esteban.gehring@gmail.com>

* added missing parenthesis on Global() decorator

Co-authored-by: Esteban Gehring <esteban.gehring@gmail.com>
2021-02-25 08:43:21 +01:00
William Cheng
df1ae03960
[Refactor] create Python abstract class (#8817)
* create python abstract base class

* refactor AbstractPythonConnexionServerCodegen

* update doc
2021-02-25 14:10:49 +08:00
Adrien CABARBAYE
a31dba5b88
[GO] use latest available oauth2 version (#8764)
* [GO] use latest available oauth2 version

* update samples

Co-authored-by: William Cheng <wing328hk@gmail.com>
2021-02-25 02:32:49 +08:00
Thomas Hervé
f9b1f98d21
Fix base type naming in Go (#8819)
Go generation didn't properly named base type in `getSchemaType`, which
ends up breaking some doc generation.
2021-02-25 02:31:59 +08:00