Thomas Ville

Results 10 comments of Thomas Ville

Implementing `#[serde(default...)]` on the discrimintator field like in https://github.com/OpenAPITools/openapi-generator/pull/20336 solves the issue for me. However, in https://github.com/OpenAPITools/openapi-generator/pull/20336, we inject `#[serde(default = "{{{classname}}}::_name_for_{{{name}}}")]` depending on if the field is the discriminator....

I opened this issue to add support for default values in the models of the Rust SDKs: https://github.com/OpenAPITools/openapi-generator/issues/22455.

This solution is not a good idea in the end: https://github.com/OpenAPITools/openapi-generator/issues/22455. So I'm implementing a solution similar to https://github.com/OpenAPITools/openapi-generator/pull/20336. A few issues I have: - The default value of the...

Regarding the name of the function, the `camelcase` lambda function sanitizes the name and makes sure reserved keywords are escaped, so it looks like I can run this function on...

@InfinityByTen Did you find a solution or a workaround to this bug? I opened a similar issue here: https://github.com/OpenAPITools/openapi-generator/issues/22344.

I just noticed that my code injects discriminator fields that were not present before in some samples like in `samples/client/others/rust/hyper/oneOf-reuseRef/src/models/apple.rs`. I see there's [some code to remove the discriminator](https://github.com/OpenAPITools/openapi-generator/blob/4f9f14a7d8bef5e6ea8209551cdb89af2fb17d8e/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/RustClientCodegen.java#L326) and...

It's even worse, in the `oneOf-reuseRef` sample, the `Apple` struct doesn't even have the `fruitType` field, so we add the field to the client even though it doesn't exist in...

Weird, the [CI fails](https://github.com/OpenAPITools/openapi-generator/actions/runs/19923709507/job/57118146938?pr=22489) on tests unrelated to my changes: ``` Error: Run 1: TypescriptAngularArrayAndObjectIntegrationTest.generatesCorrectDirectoryStructure:65->AbstractIntegrationTest.generatesCorrectDirectoryStructure:70 [Directory content of '/home/runner/work/openapi-generator/openapi-generator/modules/openapi-generator/target/test-classes/integrationtests/typescript/array-and-object-expected/model' and '/home/runner/work/openapi-generator/openapi-generator/modules/openapi-generator/target/test-classes/integrationtests/typescript/array-and-object-result/model' differ.] ``` ``` Error: Run 2: TypescriptAngularArrayAndObjectIntegrationTest.generatesCorrectDirectoryStructure:65->AbstractIntegrationTest.generatesCorrectDirectoryStructure:70 [Directory content...

@frol @farcaller @richardwhiuk @paladinzh @jacob-pro @dsteeley Hi, I opened this PR to fix https://github.com/OpenAPITools/openapi-generator/issues/22344. The [CI fails](https://github.com/OpenAPITools/openapi-generator/actions/runs/19923709507/job/57118146938?pr=22489) but it seems unrelated to my changes. Can anyone help me figure out...

@dsteeley I see @wing328 merged another PR that had the same CI errors (that are unrelated to the PR itself) yesterday. Let me know if there's anything I can clarify...