openapi-generator/bin/configs/rust-reqwest-empty-object.yaml
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

9 lines
323 B
YAML

generatorName: rust
outputDir: samples/client/others/rust/reqwest/emptyObject
library: reqwest
inputSpec: modules/openapi-generator/src/test/resources/3_0/rust/empty-object.yaml
templateDir: modules/openapi-generator/src/main/resources/rust
additionalProperties:
supportAsync: "false"
packageName: empty-object-reqwest