18059 Commits

Author SHA1 Message Date
Daniel Karso
2c39835353
[PHP] Replace @ character so we can use Hydra Jsonld models. (#12171)
* Replace @ character so we can use Hydra Jsonld models. This fixes
duplicate @id id properties in models.

* Invalid test method

* Fix tests

* Fix tests 2

Co-authored-by: Daniel Karso <daniel.karso@worldstream.com>
2022-06-06 11:48:13 +08:00
William Cheng
c829567f75 add a link to blog post on api first 2022-06-06 11:40:59 +08:00
William Cheng
0296380f00 update html2 samples 2022-06-06 11:36:15 +08:00
0x7162
c4db27f24d
Fixes #9923 - added recursion for nested objects (#12428) 2022-06-06 11:30:31 +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
f52ee28215
Fix NPE when generating examples for parameter (object) (#12538)
* fix NPE when generating examples for parameter (object)

* add new files
2022-06-05 16:19:37 +08:00
Chao Yang
6869f3b0b9
Skip generating operation examples when flag is set (#12539) 2022-06-05 14:12:34 +08:00
William Cheng
53d66a891d
add govery logo (#12537) 2022-06-05 10:14:36 +08:00
William Cheng
0ec2bda3c4
update build.gradle to work with junit5 (#12535) 2022-06-05 09:45:46 +08:00
Antonio Sagliocco
5b44aaf8d7
[Dart][Client] Support parsing DateTime (#12433)
* Support DateTime parsing

I've got issue in parsing an Array of Strings in datetime format, which the generator translates into a List<DateTime>.

This just fixes it

* update dart sampels

Co-authored-by: William Cheng <wing328hk@gmail.com>
2022-06-04 21:59:46 +08:00
William Cheng
ee9ba4a95a update ts samples 2022-06-04 18:43:59 +08:00
Bogdan Ilchyshyn
aac39eabc7
fixing typo in InitOverrideFunction (#12528) 2022-06-04 18:40:13 +08:00
Daniel Metzner
f30257d10a
Fix syntax error for $jsonDeserializationVisitor (#12521) 2022-06-04 18:35:33 +08:00
William Cheng
38018d8b94
Test PHP Symfony server sample in github action (#12533)
* test php symfony server sample in github action

* update php laravel samples

* add tests for php 7.x, 8.x
2022-06-04 18:23:28 +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
Sorin Florea
c1deedb938
Add Gradle Enterprise logo (#12518) 2022-06-03 18:19:02 +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
Mike Welsh
fbc35a2a6f
[BUG] Use https URL for Spring milestone repository (#12512)
- Also set version for spring maven plugin as it does _not_ work with the milestone version
2022-06-03 00:36:45 +08:00
William Cheng
4d149e7b87 replace tabs with 4-space in SpringCodegenTest.java 2022-06-03 00:36:01 +08:00
Jochen Schalanda
41a2964246
Add support for remote development with Gitpod (#12508)
https://gitpod.io/
https://www.gitpod.io/docs/languages/java
2022-06-03 00:33:12 +08:00
Matthias Wimmer
bcc77d4ac4
Fix for #12504: invalid elm code for paths containing UUIDs (#12506)
Fixes #12504
2022-06-01 14:00:02 +02:00
WeihmannTNG
88e2490087
[Java/Spring] Fix of issue #12494: call to superclass method is done with correct arguments (#12496)
* [Java/Spring] add missing key parameter to put-item method call of super class (#12494)

* [Java/Spring] add test for missing key parameter to put-item method call of super class (#12494)
2022-06-01 08:28:20 +08:00
Kuzma
129fd0ad5c
[Typescript] update addImport method (fix oneOf) (#11689)
* fix addImport method

* add function splitComposedType

* super.addImport

* add docs for splitComposedType

* add docs for splitComposedType
2022-05-30 11:53:26 +02: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
Kuzma
51f624ebe4
typescript: fix status code (#12472) 2022-05-30 11:49:58 +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
William Cheng
76eddeb713
php-laravel, enum models, nullable and default values (#12480)
* + support for enum models & separating mustache templates for enums and generics
+ extract property 'type' and 'default value' from a #ref to an enum model
+ support for `PascalCase` naming convention for PHP generators
+ use a default value for known basic types when they are not nullable
+ use 'null' as default value for nullable types when they do not specify the default value
+ use defined constant path as enum default value when found

* + sample output update

* + change model fields to be public and acessible from outside

* + sample output update

Co-authored-by: Mostafa Aghajani <mostafa.aghajani@virta.global>
2022-05-27 11:16:26 +08:00
William Cheng
5307a8dafd update samples 2022-05-27 01:05:36 +08:00
Cubid
fb1706bd2b
[php-symfony] Allow non mandatory array value (#11618)
Co-authored-by: David CLEMENT <dclement@cfdp.fr>
2022-05-27 00:54:04 +08:00
Taufik Rama
50958e25c0
Fixes #10568 (#12409) 2022-05-27 00:40:33 +08:00
William Cheng
210b43afe2 update graphql nodejs samples 2022-05-27 00:33:10 +08:00
Antonio Petricca
e83f1ed9f4
Graphql nodejs express server lists fixup (#12476)
* Fixed enum values generation fo 'GraphQL NodeJS Express Server' generator.

* Fixed enarrays generation for 'GraphQL NodeJS Express Server' generator.
2022-05-27 00:30:10 +08:00
Robbert van Waveren
b6ef789361
fix #11886 unhandled default enum case (#12344) 2022-05-27 00:27:56 +08: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
c3a4914b22 update spring github workflow tests 2022-05-27 00:09:21 +08:00
cachescrubber
71ea659195
[Java/Spring] Support Spring Boot 3 and Jakarta EE 9 (#12407)
* Migrate annotation.Generated

* Upgrade jakarta.servlet and jakarta.validation

* Prepare pom.xml for spring boot 3

* Introduce spring-boot-3 sample config.

* Create spring-boot-3 sample.

* Introduce useSpringBoot3 cli option.

* Generate Docs

* Add spring milestone repo

* Generate Samples

* Adjust Unit Tests

* Add Spring Boot 3 Support to spring-cloud library

* generate spring cloud 3 sample

* Remove springfox

* Fix typo.

* No longer support SpringFox and Swagger1 with Spring Boot > 3.x

* Generate Docs

* Use Spring Boot 3.0.0-M3

* Generate Samples
2022-05-27 00:07:19 +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
Tom Bärwinkel
54dca39459
Add authentication for haskell-servant (#12470)
* Add authentication for haskell-servant

* Add BearerToken to HaskellServantCodegen.java
2022-05-26 23:44:13 +08:00
William Cheng
a39d86c1eb update graphql nodejs samples 2022-05-26 23:35:00 +08:00
Antonio Petricca
4233d2aa99
Fixed enum values generation fo 'GraphQL NodeJS Express Server' generator. (#12389) 2022-05-26 23:31:03 +08:00
William Cheng
5bd94b8fa0 prepare 6.1.x 2022-05-26 12:58:25 +08:00