forked from loafle/openapi-generator-original
* fix: Respect `disableValidator` CLI option Setting the `disableValidator` option to `true` used to generate validation code but avoid calling it from the route handlers. This generated invalid code in some cases. This commit renders the `server-operation-validate` only, when the `disableValidator` option is set to false (the default value). * test: Update examples and run integration test The generated samples are updated with: `./bin/generate-samples.sh ./bin/configs/manual/*.yaml` The relevant integration test `mvn integration-test -f samples/server/petstore/rust-axum/pom.xml` passes. * test: Add integration test This integration tests provokes the generation of code that would not compile (see #18580). The new change that makes sure validation logic is not rendered when disabled, makes sure the faulty code is not generated and therefore the project compiles. * test: Update examples and run integration test The generated samples are updated with: `./bin/generate-samples.sh ./bin/configs/manual/*.yaml` The relevant integration test `mvn integration-test -f samples/server/petstore/rust-axum/pom.xml` passes.
11 lines
446 B
YAML
11 lines
446 B
YAML
generatorName: rust-axum
|
|
outputDir: samples/server/petstore/rust-axum/output/rust-axum-validation-test
|
|
inputSpec: modules/openapi-generator/src/test/resources/3_0/rust/rust-axum-validation-test.yaml
|
|
templateDir: modules/openapi-generator/src/main/resources/rust-axum
|
|
generateAliasAsModel: true
|
|
additionalProperties:
|
|
hideGenerationTimestamp: "true"
|
|
packageName: rust-axum-validation-test
|
|
disableValidator: "true"
|
|
enablePostProcessFile: true
|