19127 Commits

Author SHA1 Message Date
William Cheng
587d4b0679 set disallowAdditionalPropertiesIfNotPresent to false as default 2023-09-13 11:24:31 +08:00
William Cheng
4260c7aaf0
Better tests for php-nextgen (#16569)
* better tests for php nextgen

* add new files
2023-09-13 10:50:29 +08:00
William Cheng
781ccae722
add go echo api tests (#16570) 2023-09-13 10:49:05 +08:00
Charles Treatman
5b4d97016a
[Go] return errors that happen while unmarshalling objects (#16525)
* [Go] return errors that happen while unmarshalling objects

* Update model samples

* More updates to samples

* Update failing Go store API test to match the one that passes
2023-09-12 23:42:54 +08:00
William Cheng
9c4f6c46f7
Fix integer default value with double quote (kotlin jaxrs server generator) (#16563)
* fix integer default value with double qutoe (kotlin jaxrs)

* add enum tests

* fix typo

* update samples
2023-09-12 17:38:51 +08:00
William Cheng
a5f79a7bdc
[python] Update github workflow, use debug instead of warning (#16565)
* update github workflow, use debug instead of warning

* use debug instead of warn
2023-09-12 16:55:53 +08:00
William Cheng
70543126f2
fix jaxrs sample tests (#16566) 2023-09-12 16:51:05 +08:00
martin-mfg
d6695056fe
add test case for nullable parent property (#16552)
* add nullable case to spring test spec

* generate samples for changed spring input

* add nullable case to general test spec

* generate samples for changed general input

* generate samples again

* generates samples again

* re-build from new sources, generates samples again
2023-09-12 15:59:58 +08:00
Philzen
196c2b1642
[maven-generator] Do not cleanup output if spec file is unchanged and skipIfSpecIsUnchanged=true (Fixes #16490) (#16491)
* Don't delete output directory if spec is unchanged

Resolves #16490

* Fix some typos
2023-09-12 15:42:19 +08:00
Dennis Melzer
c6d355e8d4
Fix spring scope property (#16553)
* Fix spring scope property

* Adapt test files
2023-09-12 14:58:26 +08:00
William Cheng
ad589c7700
better null check for schema types (#16564) 2023-09-12 14:58:05 +08:00
Julian Vennen
cd0fde41f1
fix parent class check in ObjectSerializer (#16558) 2023-09-12 10:25:28 +08:00
Julian Vennen
8b15d4820e
Use backed enums in php-nextgen (#16556) 2023-09-11 20:06:50 +08:00
devhl-labs
1901bf23ea
use TypeInfoResolver (#16548) 2023-09-11 20:05:02 +08:00
Justin Black
78f3b19b58
Removes spacether (#16551)
* Update README.md

* Update team.yml

* Update pom.xml
2023-09-11 12:49:10 +08:00
William Cheng
5ee18156db
[Java-Feign]: model combining properties and additionalProperties (#16546)
* [Java-Feign]: model combining properties and additionalProperties (#6146)

* update samples

---------

Co-authored-by: François Dodé <francois.dode@dawex.com>
2023-09-09 16:11:54 +08:00
William Cheng
14cfca7b06
[java][feign] Update feign client dependencies to newer version (#16545)
* update javae feign client dependencies to new versions

* update feign
2023-09-09 15:39:02 +08:00
Julian Vennen
c354bf86ff
Set minimal PHP Version to ^8.1 (#16542) 2023-09-09 14:46:49 +08:00
Andrew Tran
4e15e1a813
Update pom.xml (#16544) 2023-09-09 14:40:45 +08:00
William Cheng
18df6ed85f
[Spring] fix nullable map properties (#16524)
* fix map in spring generators

* fix nullable map in spring generators
2023-09-09 13:30:21 +08:00
William Cheng
128d9da8a1 update smaples 2023-09-09 11:50:36 +08:00
Andreas Johnsen
75c2e934da
add omitGradleWrapper option to kotlin-server code generator (#16528)
The added option removes the wrapper part of build.gradle, enabling the generated project to be used as a sub project. The same option from kotlin client was used as reference for this change.
2023-09-09 11:40:37 +08:00
William Cheng
c614b9d9b1
[Java][resteasy] Add tests to upload files (#16534)
* add test to upload files (resteasy)

* remove resteasy tests from github workflow
2023-09-08 15:57:10 +08:00
William Cheng
026fa514c3 update java resteasy samples 2023-09-08 15:12:54 +08:00
Alex Wood
6ea8ff3a17
[java-client][resteasy] fix multipart requests (#16517)
This patch fixes two issues with the Resteasy generated client code.
The first is the usage of a deprecated method, getFormData.  The fix for
this issue was originally conceived by @peter-seitz.

The second issue was a problem in how the Content-Disposition header was
being constructed.  If we had a file named "test.txt" and were uploading
it to a field named "myFile", the Content-Disposition header should look
like

Content-Disposition: form-data; name="myFile"

Instead, the code was using the file's name (rather than the field name)
in the name directive and the header looked like

Content-Disposition: form-data; name="test.txt"

The Content-Disposition header can take an optional directive, filename,
but I have not included that here as that directive is mostly useful for
file downloads and not uploads.
2023-09-08 15:07:49 +08:00
Tom Crasset
005566c6e3
[typescript] fix: allow 'additionalProperties: true' at top level (#16526)
* fix: allow 'additionalProperties: true' at top level

* refactor: use same call as other typescript generators
2023-09-08 08:46:15 +02:00
William Cheng
dee536f7f7
import Annotated if needed (#16521) 2023-09-07 14:36:45 +08:00
William Cheng
fbff32c5d7
update java resttemplate dep to newer versions (#16523) 2023-09-07 14:36:19 +08:00
William Cheng
d1808405ca
mark oneOf form parameters as optional (#16512) 2023-09-06 17:27:44 +08:00
Diego Urban
3817e40f47
[JavaSpring] Generate deprecated property, annotation and javadoc. (#16493)
* [JavaSpring] Generate deprecated annotation and doc properties

* [JavaSpring] Generate deprecated for @Schema

* [JavaSpring] Add sample folder to workflow

---------

Co-authored-by: Diego Urban <d.urban@carepay.com>
2023-09-06 15:55:15 +08:00
Artur Neumann
270238e060
[PHP] convert data to string before giving it to preg_match (#16513) 2023-09-06 15:40:07 +08:00
martin-mfg
75ac4a2f58
Fix selection of unnecessary form parameter models (#16418)
* fix idea

* add unit test

* adjust warnings about form parameters
2023-09-06 15:23:04 +08:00
Robin Jonsson
acb798b58b
[JavaSpring] Call parent fluent setters from child (#16497)
* Call fluent parent setter from child pojo

This closes #16496

* Generate new samples
2023-09-06 11:43:35 +08:00
William Cheng
b1ec110aa3
go: minor refactoring (#16508) 2023-09-06 11:02:09 +08:00
jessemyers-lettuce
b34a10aee7
python: ignore long lines for model descriptions (#16518)
Descriptions can easily exceed line-length limits because they are often
extracted from doc/comments strings, which may use unexpected formatting.

Python doc strings, in particular, are likely to use newlines, which mustache
does not preserve, causing descriptions to be condensed to a single line.
2023-09-06 10:48:43 +08:00
Mike Friesen
0192baed42
Issue: #16268 (#16507)
Bug fix AWS4Auth to support query parameters and updated to use AWS SDK V2 from V1
2023-09-06 09:45:02 +08:00
Toby Archer
ecb56f1e88
Fix Elixir connection.ex middleware usage and regenerate elixir sample (#16461) 2023-09-05 21:17:37 +02:00
jessemyers-lettuce
1b32088c2d
python: use isinstance instead of type() (#16516)
Use of `isinstance` is preferred (and validated by common linters).
2023-09-05 23:45:18 +08:00
William Cheng
4b7a808a9f
[openapi-normalizer] add a rule to better handle openapi 3.1 spec (#16495)
* add samples

* update samples

* openapi 3.1 beta support

* update .gitignore

* fix composed schema, add oneof, allof tests in opeanpi 3.1 spec

* add allof tests, more fixes

* add null check

* update artifact id

* better null check
2023-09-05 23:27:00 +08:00
Ivan Giuliani
065b48177b
[Ruby] Fix incorrect escaping of Ruby forward slashes (#16474)
* [Ruby] Test correct escaping of pattern sequences

Ruby is not correctly escaping pattern sequences containing forward
slashes in their definition. This commit adds tests that verify the
correct behaviour of the code generator.

See issue #5582.

* [Ruby] Correctly escape patterns containing forward slashes

Ruby regexs are always generated as match patterns enclosed in slash
characters (i.e. using the `/pattern/` syntax). Regular expressions
defined in the OpenAPI declaration via the `pattern` attribute follow
[ECMA 262](https://262.ecma-international.org/5.1/#sec-15.10.1) which
means they already include the correct escaping of forward slashes as
far as Ruby is concerned.

The current Ruby codegen is incorrectly escaping all forward slashes,
which ultimately causes the generated code to include additional
incorrect escape sequences which cause the generated file to have an
invalid syntax.

This commit ports the same fix introduced in #1539 for the Python
codegen, as both Ruby and Python use perl-flavored regular expressions
so they behave in the same way when it comes to escaping forward
slashes.

Fixes #5582.
2023-09-05 20:12:29 +08:00
William Cheng
8608103c9f
add name mapping features to lua client generator (#16511) 2023-09-05 20:03:27 +08:00
William Cheng
a9301a6c16
[perl] Add name mapping features to the Perl client generator (#16510)
* add name mapping features to perl client generator

* update samples
2023-09-05 18:39:38 +08:00
William Cheng
29f0d22713
[Powershell] add name mapping features (#16509)
* add name mapping features to the powershell generator

* update samples
2023-09-05 15:45:03 +08:00
devhl-labs
f3eb07408d
[csharp] Support source generator (#16324)
* started source generator

* copy the options

* fixed visibility

* added new sample

* discarded changes to existing samples

* discarded changes to existing samples

* build new sample

* changed package name due to file path length limit

* reverted changes to manual tests

* fixed all new manual tests

* inject contexts into api

* only one JsonConstructor

* fixed spacing

* revert samples for easier merge master

* revert unnecessary change

* fixed formatting

* build samples

* reverting unintended commit

* fixing default value

* reverting unintended commit

* removed debugging lines

* removed unnecessary diff

* address comment
2023-09-05 10:18:08 +08:00
Théophane Charbonnier
4418b59b47
[java] Microprofile - fix optional array property's default value (#16500) 2023-09-05 10:15:10 +08:00
dependabot[bot]
616e8df8d0
Bump actions/checkout from 3 to 4 (#16505)
Bumps [actions/checkout](https://github.com/actions/checkout) from 3 to 4.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/checkout/compare/v3...v4)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-09-05 09:50:08 +08:00
William Cheng
74cd73bd6c
better null check in array default value (java) (#16503) 2023-09-05 00:40:17 +08:00
devhl-labs
c510ea4b3d
Ensured enum entry name is unique (#16484)
* ensured enum entry name is unique

* ensured enum entry name is unique
2023-09-04 23:28:32 +08:00
Tomohiko Ozawa
09704951f0
[Java][resttemplate] Enable access token refresh (#16485)
* use supplier to enable refreshing token

* update samples

* fix param name and doc

* update samples
2023-09-04 23:23:22 +08:00
William Cheng
47a85e880b
Add tests for http basic authentication in python client (#16488)
* add tests for http basic auth in python client

* add new files
2023-09-03 19:11:53 +08:00