7409 Commits

Author SHA1 Message Date
William Cheng
8f3dd48772 update samples, docs 2022-06-06 12:20:21 +08:00
Ion Bazan
5bd3694927
fix @implements annotations in PHP client (#11908) 2022-06-06 12:08:46 +08:00
Paul-Etienne François
ec6c4a4b6c
[Feature] Handle optional operation responses (#12342) 2022-06-05 19:55:03 +01:00
William Cheng
6cd246931e
[R] add oneOf support (#12491)
* add oneof support

* add validateJson method

* add validteJSON and tests

* add tests, add oneOf logic

* better error message in validateJSON

* fix tests

* add test for error message

* remove unused code
2022-06-05 18:03:34 +08:00
William Cheng
0ec2bda3c4
update build.gradle to work with junit5 (#12535) 2022-06-05 09:45:46 +08:00
William Cheng
ee9ba4a95a update ts samples 2022-06-04 18:43:59 +08:00
Bruno Coelho
fe8187ba6d
[Kotlin][Client] replace java.nio.* to avoid crash on Android API 25 and bellow (#12529)
* [Kotlin][Client] replace java.nio.* to avoid crash on Android API 25 and bellow

* [Kotlin][Client] update sample projects

* [Kotlin][Client] update sample projects
2022-06-04 16:26:59 +08:00
William Cheng
45a3b15b69
[java][okhttp-gson] Fix NPE in the response header, junit5 issue in surefire plugin (#12525)
* fix okhttp pom to work correctly with junit5

* fix version, fix NPE in response headers
2022-06-04 16:25:15 +08:00
William Cheng
f043602151 update samples 2022-06-03 18:16:27 +08:00
Prajon Shakya
421b3be828
[csharp-netcore] Add "WithHttpInfo" variant methods in api_doc (#12323)
* Added 'WithHttpInfo Variant' in api_doc template

* Update the samples
2022-06-03 18:10:15 +08:00
Kuzma
6f322060f7
[Typescript] Support text/html by ObjectSerializer.parse (#12459)
* add support text/html

* regenerate samples

* test
2022-05-30 11:51:37 +02:00
mkusaka
89193074e2
[typescript-angular] remove outdated angular samples (#12134)
* [typescript-angular] remove outdated angular samples

* [typescript-angular] remove unused sample

* [typescript-angular] remove unused ref

* [typescript-angular] add oneof & provided in any examples

* [typescript-angular] update samples

* [typescirpt-angular] migrate test to angular 12/13

* [typescript-angular] update samples
2022-05-30 11:48:12 +02:00
julienlavigne
4cfc32e426
Kotlin-client: Pass OkHttpClient instance to the base class (ApiClient) (#12493)
* Pass client to the base clase

* Regen samples
2022-05-30 10:40:58 +01:00
William Cheng
f0ea10f239
Update R auto-generated doc (#12488)
* update r doc, tests

* add new files
2022-05-29 10:01:44 +08:00
William Cheng
05d49d9107
Add support for allOf in R client generator (#12487)
* add support for all in R client generator

* update samples
2022-05-29 07:22:18 +08:00
Jon Schoning
078232acb5
[haskell-http-client] relax Aeson constraint to allow Aeson 1 (#12486) 2022-05-27 23:22:09 -05:00
Akhil Nair
e823290c8f
[PYTHON] GetItem not working for Client generated allOf model and broken since 5.2.0 (#12239)
* I feel the issue is due to the creation of self._var_name_to_model_instances while doing the deserialization of the data.

Earlier the Python SDK code was using get_var_name_to_model_instances function which was adding var name to model instances that contain it. So <class 'openapi_client.model.stream_options_all_of'> will not part of mapping in self._var_name_to_model_instances for variable name stream_options.

Now with the latest Python SDK code following is the way through which var_name_to_model_instances is created:

    for prop_name in model_args:
        if prop_name not in discarded_args:
            var_name_to_model_instances[prop_name] = [self] + composed_instances
Now as we can see that the var_name_to_model_instances is populated with self and composed_instance which will also contain stream_options_all_of as a composed instance and there will be no check that if stream_options is present in composed_instances or not.

As there is no attribute_mapping found for stream_options in stream_options_all_of, the type for stream_options will be treated as dict for mapping stream_options_all_of as mentioned by @Chekov2k.

So what I suggest is the following code:

    for prop_name in model_args:
        if prop_name not in discarded_args:
           var_name_to_model_instances[prop_name] = [self] + list(
                filter(
                    lambda x: prop_name in x.openapi_types, composed_instances))
This way we can check if the property name is present in that composed instance or not. If it's okay for @spacether I can raise a PR for this.

* [get_item_all_of_bug]
Added samples, test cases to validate all_of schema.

* [getiem_all_of_bug]

Updated docs and samples.

* [getiem_all_of_bug]

Updated test cases, docs and samples.
2022-05-27 21:09:48 -07:00
Christian Clauss
c2eee6f743
Use print() function in both Python 2 and Python 3 (#12467)
The current code is a syntax error in Python 3.

The proposed code works as expected in both Python 2 and Python 3.
2022-05-27 00:24:59 +08:00
William Cheng
c6a4947523
fix ocaml readme installation (#12477) 2022-05-27 00:03:24 +08:00
Antonin Décimo
5cce050260
[OCaml] Code generation fixes (#12395)
* [ocaml] Open Lwt.Infix rather than Lwt

The Lwt module has functions that might shadow parameters, and all the
functions we use from Lwt are in Lwt.Infix too.

    File "src/apis/image_api.ml", line 13, characters 69-72:
    13 |     let uri = Request.maybe_add_query_param uri "all" string_of_bool all in
                                                                              ^^^
    Error: This expression has type 'a t list -> 'a list t
           but an expression was expected of type bool option

* [ocaml] update petstore samples
2022-05-26 23:54:13 +08:00
William Cheng
5bd94b8fa0 prepare 6.1.x 2022-05-26 12:58:25 +08:00
William Cheng
36a9cf394d
update samples (#12466) 2022-05-26 12:13:59 +08:00
William Cheng
69f79fb789
Prepare 6.0.0 release (#12463)
* prepare 6.0.0 release

* update samples

* update meta codegen
2022-05-26 10:28:01 +08:00
William Cheng
7b08aa408d
[R] improve code format (#12387)
* better code format for r client

* more code format improvement
2022-05-25 18:02:52 +08:00
Kuzma
45cbd5f7a7
[Php] Convert boolean value for query string (Configuration) (#12385)
* convert bool to query string format

* add variable

* update samples

* add test
2022-05-25 10:36:21 +08:00
Oren Samuel
4ec14706df
#12445 - avoid resolving ref schema to the actual schema for enum (#12446)
* #12445 - avoid resolving ref schema to the actual schema for enum

* #12445 - update samples
2022-05-24 23:51:08 +08:00
CodeR
73b0762f36
OkHttpClient - replacing static client usage with client Injection #12444 (#12448)
Co-authored-by: Grigory Tihonov <grigory.tihonov@lamoda.ru>
2022-05-24 13:51:47 +01:00
William Cheng
de8decc9f5
throw exception when failed to refresh token (#12431) 2022-05-24 14:51:39 +08:00
William Cheng
06688cdfe1
update gson to 2.8.9 in android httpclient (#12423) 2022-05-21 22:02:05 +08:00
William Cheng
8804ba50ed
update android dependencies to newer versions (#12421) 2022-05-21 17:04:42 +08:00
William Cheng
e0bd2440f1
[Java] Update rest-assured dependencies (#12420)
* update rest-assure dependencies in java client

* update rest assured version

* update gradle, sbt build files
2022-05-21 16:18:39 +08:00
William Cheng
c270640a36
Better support for inline schemas in parameters (#12369)
* better support for inline schema in parameters

* fix parameter model type

* add new method for model

* minor update

* fix isModelWithProperties

* fix is model check

* null check for properties

* inline parameter enhance with python-experimental fix [WIP] (#12397)

* Uses unaliasSchema rather than ModelUtils.getReferencedSchema

* Fixes python-experimental, delays param schema setting

* Samples regenerated

* Adds parameterModelName setting back in

* Samples regenerated

* removes needToSetSchema

* Sets schema differently depending on if inline model resolver is used

* Adds step for getting ref schema

* Samples regen

* fix test

* bug fix for rust generator

Co-authored-by: Justin Black <spacether@users.noreply.github.com>
2022-05-20 20:25:15 +08:00
cachescrubber
8be490d130
Upgrade Spring Boot to 2.5.14 / 2.7.0 (#12408)
* Upgrade Spring Boot to 2.5.14 / 2.7.0

* Generate Samples
2022-05-20 20:24:13 +08:00
William Cheng
fb8eac1258 update java samples 2022-05-20 17:17:58 +08:00
Miroslav Oujeský
3f788d3d77
[java][Micronaut] generator fixes (#11803)
* Fix ConfigurableAuthorization package name import to come from configuration

* Fix Micronaut @Consumes and @Produces annotations, allow multiple content types

* Fix security schemes rendering and Micronaut @Authentication pairing with application settings when special characters are present

* Updated samples

* Code review feedback

* Add xml to dependencies and fix tests

Co-authored-by: Andriy Dmytruk <andriy.dmytruk@oracle.com>
2022-05-20 13:24:48 +08:00
Andriy Dmytruk
0ad970f4cf
[Micronaut] Improvements for Server and Client (#12297)
* Add the applicationName parameter to support generation of multiple clients

* Change indentation in application.yml to double-space

* Update swagger annotations version, and option to choose not to generate the annotations

* Generate operations only in the first defined tag class for micronaut server

* Improve micronaut client options by setting the correct default values in the JavaMicronautAbstractCodegen constructor

* Fix visitor pattern having abstract method in non-abstract class. Update samples

* Update server sample FILES

* Minor refactor

* Fix for context path
2022-05-19 02:03:45 +08:00
William Cheng
3597621fbc
[R] Use snake_case in method parameter names (#12390)
* use snake_case in method parameter names

* update doc
2022-05-19 01:23:27 +08:00
William Cheng
35dc6451e4
update .RBuildIgnore (#12383) 2022-05-17 16:07:26 +08:00
William Cheng
1b7b4ede44
[R] fix warnings in DESCRIPTION (#12380)
* fix warnings in description

* fix maintainer

* update test with jsonlite method instead
2022-05-17 13:25:16 +08:00
William Cheng
13496aad5b
[R] Add import in the namespace file (#12372)
* add import in the namespace file

* add import r6
2022-05-17 10:52:39 +08:00
William Cheng
040482e977
add support to download response as file (#12373) 2022-05-17 10:52:09 +08:00
Nikos Epping
1225c4c613
[typescript-fetch] Support Sets in query parameters (when uniqueItems=true) (#12318)
* [typescript-fetch] Support Sets in query parameters

* [typescript-fetch] Update sample builds
2022-05-16 09:56:42 +02:00
Artem Kuzmenko
5221ca2b0a
feat(typescript): add repository field to package.json (#12292) 2022-05-16 09:54:37 +02:00
Thi
559a2618df
Qt cpp client primitives types body (#12301)
* Fixxed issue with numeric primitive in body

* Aded primitives to cpp-qt/petstore.yaml (test ressource)

* generated  samples via  ./bin/generate-samples.sh
2022-05-15 17:48:19 +08:00
Yuriy Belenko
023f4e760b
[php] Bump required PHP version to 7.4 (#12359)
* Bump minimal PHP version to 7.4

* Refresh samples
2022-05-15 17:28:31 +08:00
William Cheng
12cdacabbf
[Inline model resolver] better handling of inline responses and bug fixes (#12353)
* better handling of inline response schemas, bug fixes

* update samples

* add new files

* better code format

* remove unused ruby files

* fix java test

* remove unused js spec files

* remove inline_response_default_test.dart

* fix webclient tests

* fix spring tests
2022-05-13 10:17:59 +08:00
William Cheng
2cf3d3805f remove samples/client/petstore/java/okhttp-gson-nextgen 2022-05-12 23:40:11 +08:00
William Cheng
d135f1992e
Fix inline allOf in request body (#12348)
* fix inline allof in request body

* update samples
2022-05-12 12:51:36 +08:00
William Cheng
5867845419 update samples 2022-05-11 15:39:38 +08:00
William Cheng
884a74550a
add tests to set httpUserAgent in r client (#12321) 2022-05-10 17:23:13 +08:00