File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -655,7 +655,30 @@ java -jar modules/openapi-generator-cli/target/openapi-generator-cli.jar generat
655655
656656Example:
657657```
658- java -jar modules/openapi-generator-cli/target/openapi-generator-cli.jar generate -g spring -i modules/openapi-generator/src/test/resources/3_0/spring/issue_23527.yaml -o /tmp/java-spring/ --openapi-normalizer REPLACE_ONE_OF_BY_DISCRIMINATOR_MAPPING=true
658+ java -jar modules/openapi-generator-cli/target/openapi-generator-cli.jar generate -g java -i modules/openapi-generator/src/test/resources/3_0/oneOf_issue_23527.yaml -o /tmp/java/ --openapi-normalizer REPLACE_ONE_OF_BY_DISCRIMINATOR_MAPPING=true
659+ ```
660+
661+ Here is what the change in the spec looks like:
662+
663+ ```diff
664+ diff --git a/api/openapi.yaml b/api/openapi.yaml
665+ index 6f27abd..146c61c 100644
666+ --- a/api/openapi.yaml
667+ +++ b/api/openapi.yaml
668+ @@ -9,10 +9,10 @@ components:
669+ schemas:
670+ GeoJsonObject:
671+ discriminator:
672+ + mapping:
673+ + MultiPolygon: "#/components/schemas/Multi-Polygon"
674+ + Polygon: "#/components/schemas/Polygon"
675+ propertyName: type
676+ - oneOf:
677+ - - $ref: "#/components/schemas/Polygon"
678+ - - $ref: "#/components/schemas/Multi-Polygon"
679+ properties:
680+ type:
681+ type: string
659682```
660683
661684- ` FILTER `
You can’t perform that action at this time.
0 commit comments