7005 Commits

Author SHA1 Message Date
Kathryn DiPippo
c10c9146b9
[python] Update Markdown files for Models with fixed Python print() syntax (#17993)
* Update Markdown file with fixed Python example

* ./bin/generate-samples.sh ./bin/configs/*.yaml
2024-02-29 10:54:54 +08:00
0xNF
275ed9296d
[dart2] [client] Bump test package version to >=1.21.6<1.22.0 to enable running tests on Dart3 projects. Also bumped minimum Dart version to 2.18 to accomodate this change. (#17563) (#17816) 2024-02-28 18:37:33 +08:00
Artem Medvedev
6f01a7ad82
fix(rust): wrong path to model used as parameter of api (#17968)
* fix(rust): wrong path to mode used as parameter of api

Closes #16974

* fix: re-build samples
2024-02-28 14:56:03 +08:00
William Cheng
340a3eba54
update feign to newer version (#17983) 2024-02-28 14:11:42 +08:00
Ruokki
149246de31
fix(java): resolve feign ambiguity in ApiErrorDecoder fix(#17842) (#17843) 2024-02-28 12:06:57 +08:00
Andre Wachsmuth
8ca914d64f
[okhttp-gson] Make initializer block for GSON builder static #16860 (#16892)
* [okhttp-gson] Make initializer block for GSON builder static #16860

Make initializer block for GSON builder static, see #16860

* update sapmles

---------

Co-authored-by: Andre Wachsmuth <awa@xima.de>
2024-02-28 12:04:44 +08:00
William Cheng
df8851d627
update orjson to newer version (#17982) 2024-02-28 11:45:26 +08:00
Artem Medvedev
4b04e17751
feat(rust): support ability to disable boxed models in client (#17931)
* feat(client): support ability to disable boxed models

Add new additional property `avoidBoxedModels` which can be configured to avoid `Box<..>` of models.

It's very nice to have such config, because it doesn't make a lot of sense for really simple models.

* test: rollback config of existed test
2024-02-28 11:22:18 +08:00
Stefan Koppier
2a4e60ccbb
[Kotlin] Fix default values (#17937)
* Fixed invalid extraction of response body in kotlin-client jvm-spring-*

* Generated echo-api for kotlin-jvm-spring-3-restclient

* Specific echo-api for Kotlin without allOf/anyOf

* Specific echo-api for Kotlin without allOf/anyOf

* Generated all samples

* Added kotlin-jvm-spring-3-restclient sample to workflow

* Fixed syntax problem

* [kotlin] Fixed multiple problems with default values

* [kotlin] Removed old commented code

* [kotlin] Generated new samples after merge with master

* [kotlin] ensure-up-to-date
2024-02-28 11:20:27 +08:00
William Cheng
0b02734b93
better handling of allOf in request/response (#17964) 2024-02-28 11:19:11 +08:00
Tomohiko Ozawa
a8efb8eea8
Add hasReadOnly property to CodegenModel (#17942)
* add hasReadOnly property to CodegenModel

* add for CodegenModel subclasses
2024-02-26 16:27:33 +08:00
William Cheng
51ef501c02
fix npe by prefixItems in normalizer 3.1 spec (#17955) 2024-02-26 15:24:55 +08:00
Ross Bender
22c52d358c
Update Java templates to correctly close parenthesis (#17961)
* update java templates to correctly close parenthesis

* add closing parenthesis to missing java template
2024-02-26 15:24:31 +08:00
Chris Miller
4ba187a1a4
Provide rust-server swagger/multipart_form (#17950)
* grant rust server swagger form multipart

* run exporters
2024-02-25 17:18:15 +08:00
William Cheng
6e113842cf
[resttemplate] Update springweb to newer version (#17953)
* update springweb to newer version

* update
2024-02-24 23:43:15 +08:00
Artem Medvedev
518b29d089
fix(rust): oneOf generation for client (#17915)
* fix(rust): discriminator mapping to serde rename

Discriminator mapping has been ignored in some cases.
Even existing samples had wrong definition in some cases

This PR addresses this

* fix(rust): `oneOf` generation for client

Solves #17869 and #17896 and also includes unmerged $17898

Unfortunately it affects quite a lot of code, but we can see that only client-side models were affected by re-generation.
I tried to split this PR to several, but they're really coupled and hard to create a chain of PRs.

* fix: indentation in `impl Default`

* missing fixes

* fix: correct typeDeclaration with unaliased schema

* style: improve indentation for models

* fix: user toModelName for aliases of oneOf

* refactor: unify `getTypeDeclaration` for rust

* cover the case when `mapping` has the same `ref` for different mapping names

* test: add test for previous change

* style: remove extra qualified path to models

* add some comments

* fix(build): use method of `List` instead of specific for `LinkedList`
2024-02-24 23:41:30 +08:00
Miklós Márton
81b96fd606
Prevent enum item names being reserved keywords (#17804) 2024-02-23 16:02:22 +08:00
Miklós Márton
9c72b25bf4
[cpp-qt-client]Allow nullable parameters (#17805)
* [cpp-qt-client]Allow nullable parameters

Fixes #17756

* Update samples
2024-02-23 16:01:13 +08:00
Miklós Márton
c4f90d058b
Add NULL as reserved keyword cpp (#17803)
* [cpp]Do not lowercase the reserved keywords for C++

(Will be necessary for adding NULL as a reserved keyword)

* [cpp]Add NULL as reserved keyword
2024-02-23 16:00:23 +08:00
Jean-François Côté
a6771adf53
Add nullable to model fields (#17934) 2024-02-23 15:55:19 +08:00
Kira Resari
fe919b2203
Updated jQuery to latest version (#17930)
The old version (3.1.0) had known security issues
2024-02-23 00:34:04 +08:00
Tyler Mairose
8d73c82417
Add additional mustache lambda for kebab case (#17858)
* Add new kebabcase mustache lambda

* Add tests for new kebabcase lambda

* Update toLowerCase to use Locale.ROOT
2024-02-23 00:30:01 +08:00
William Cheng
f191904297
Add auto-generated test files for kotlin client (#17916)
* add auto-generated test files for kotlin client

* undo changes to doc

* add auto-generated model test files in kotlin clients

* update tests
2024-02-21 18:29:23 +08:00
Bastien Jansen
3af7363e76
Fix ClassCastException in OpenAPINormalizer on composed schemas in 3.1 (#17912) 2024-02-21 15:22:46 +08:00
mikkka
6c86c2d3cf
Remove postprocess printing (#17880) 2024-02-20 18:19:38 +08:00
ふぁ
c99a5cfeb6
[python] update model_config from dict to ConfigDict (#17900)
* [python] rewrite dict as ConfigDict

* [python] update sample

* [python] undo unwanted changes

* [python] update sample
2024-02-20 17:53:13 +08:00
Mehmet Fatih Ercik
48565ae5be
Generate API files as interfaces for go-gin server (#17784)
* add feature to generate only interface files

* generate sample

* add workflow file foe go gin service

* add workflow file foe go gin service

* add workflow file foe go gin service

* update samples
2024-02-20 15:37:44 +08:00
Stefan
95377cded4
Fix typos 'the the'. (#17897) 2024-02-20 13:00:55 +08:00
William Cheng
ad84355288
fix: Runtime error that occurs when Retrofit2 query parameter is an enum list (#17901)
* fix: Runtime error occurs when Retrofit2 query parameter is an enum list (9481)

* chore: Removes EOL

* remove EOL

---------

Co-authored-by: Ivan Vasheka <87310984+ivanvasheka-intellias@users.noreply.github.com>
2024-02-20 12:56:28 +08:00
ふぁ
ad08581f16
[python] Fix Circular imports on inherited discriminators. (#17886)
* [python] add inheritance discriminators test #16808

* [python] update samples

* [python] fix assert in test

* [python] fix inheritance discriminators circular import

* [python] update samples

* [python] undo type changes related to discriminator

* [python] remove extraneous processing

* [python-pydantic-v1] fix inheritance discriminators circular import

* [python] remove type ignore comment

* [python] update samples

* [python] fix avoid the empty line break

* [python] update samples
2024-02-20 12:17:32 +08:00
Nathan Shaaban
76d743b63b
fix(rust): simplify new function optional logic (#17865)
* fix(rust): simplify None logic

Used to be a code path (where isFreeFormObject and something else) where we could end up with two `: None` `: None`'s

This does add the None for the !required && !isArray && !isMap && !isNullable case (where nothing would have been printed before.

Above for the type on the individual vars inside the struct definition the logic is simply if not required then it's optional.
If it's optional we want a None when creating a new struct.

* ci: add tests for failure
2024-02-19 22:26:29 +08:00
Noor Dawod
e025ef947a
Use exists() to check for properties (#17798)
* Use `exists()` to check for existing properties.

* Generate Petstore code.

* Fix use of `null` instead of `undefined`.

* Enhance function code.

* Regenerate Petstore code.

* Use `exists()` in generated API clients.

* Use `exists()` in generated API clients.

* Refer to properties differently.
2024-02-19 11:12:46 +08:00
Felix König
6350d1d191
make title available to templates for ref properties (#17881)
Even though `title` is technically for the title of the API itself,
it's possible to set it for properties as well.
Right now, the `title` property is available in templates for regular properties,
but for ref-properties it gets lost right here.
This seemed rather surprising to me, so I think it's better to fix.
2024-02-19 11:06:26 +08:00
William Cheng
7d539bcb78
Remove deprecated library (jvm-okhttp3) in kotlin client generator (#17884)
* remove deprecated library in kotlin client generator

* update workflow
2024-02-18 17:16:23 +08:00
William Cheng
436a3e0744
fix multi line description in allOf (#17879) 2024-02-16 15:26:15 +08:00
William Cheng
5a0f6b8eb2
use unescaped media type (#17878) 2024-02-16 10:55:01 +08:00
William Cheng
809c90aa24
Use unescaped media type in java native client (#17872)
* use unescaped media type in java native client

* add tests
2024-02-16 10:17:08 +08:00
Dennis Melzer
7d76d0af61
Fix configuration handling with Feign (#17860)
* Fix configuration handling with Feign

* Fix test

* Fix compile error

* Fix compile error
2024-02-15 17:01:01 +08:00
William Cheng
82bb813aeb
update fastapi dependencies to newer versions (#17871) 2024-02-15 15:27:17 +08:00
William Cheng
4e39f12e29
[Go] fix isNil check (#17870)
* #17835 changed to return !IsNil

* update samples

---------

Co-authored-by: sagar khot <sagarkhot74@gmail.com>
2024-02-15 14:17:31 +08:00
William Cheng
887b860007
Update python-fastapi generator to support Pydantic v2 (#17369)
* update python fastapi to support pydantic v2

* add new files

* update samples

* update samples

* update starlette

* update typing extensions

* update email validator
2024-02-15 14:15:51 +08:00
Steven Sheehy
8cd34ac963
Fix native java with list validation (#17857)
Signed-off-by: Steven Sheehy <steven.sheehy@swirldslabs.com>
2024-02-15 13:29:43 +08:00
William Cheng
4810dd52c3
[python-fastapi] auto generate impl folder (#17852)
* auto generate impl folder

* fix working dir

* install pytest

* add new file

* update, fix

* test with py 3.9

* fix tests

* update doc
2024-02-15 13:08:04 +08:00
William Cheng
b0c9456add
add FILTER to openapi normalizer (#17859) 2024-02-15 13:05:31 +08:00
Yannick Wiesner
41bb5cd331
[Dart] Make dependency on intl package less strict (#17862) 2024-02-15 12:54:20 +08:00
s-jepsen
487b856c11
Fix java-spring equals generation (#17837) 2024-02-15 12:27:33 +08:00
dvacca-onfido
9deeb608e6
fix(ruby): Detect content-type in form-data file upload using faraday (#17851) (#17853)
* fix(ruby): Detect content-type in form-data file upload using faraday (#17851)

* Update samples

* Add needed dependency libmagic-dev into node 1 setup of Circle Parallel CI

* After merge/pull last master + regeneration of samples
2024-02-14 21:14:01 +08:00
Nathan Shaaban
c30d3696b0
[rust] basic oneOf support (#13970)
* [rust] basic oneOf support

Suport oneOf as a rust struct enum.

Details:

Enum without a discriminator is untagged being
"untagged" simply means serde won't attempt to
store the name of the enum inside the serialized
object. See
https://serde.rs/enum-representations.html#untagged
for more

Also check to make sure the mapping values
are not an empty object (aka null).

Co-authored-by: Nikita Puzankov <git@bshn.rs>

* refactor: fix clippy lints

No longer needed as of reqwest 0.10, it now takes the response as owned instead of mut ref.

Is not empty is more clear

* fix: discriminator and oneof case

Will show as a struct enum when there are additional fields, otherwise will be a tuple enum.

not sure the purpose of x-mapped-models, perhaps legacy code? mappedModels appears to do the same thing.

Also add default implementation for quality of life

* chore: update samples

---------

Co-authored-by: Nikita Puzankov <git@bshn.rs>
2024-02-13 19:21:51 +08:00
William Cheng
4fb97b1003
add support for extension in request body to name body parameter (#17850) 2024-02-13 17:33:51 +08:00
William Cheng
dd3ab0a1fa
Fix attributes in allOf and $ref (#17836)
* fix allOf and ref properties

* add tests
2024-02-13 16:54:40 +08:00