Skip to content

Commit 17f9a28

Browse files
authored
Avro fix arrays with items as a ref to defined enum (#13162)
* avro-schema generation fix for arrays with ref to enum (or any non primitive type) to include modelPackage prefix * sample scenario and generated outputs for avro-schema * create avro-schema dedicated test file
1 parent 2a196ce commit 17f9a28

File tree

6 files changed

+771
-2
lines changed

6 files changed

+771
-2
lines changed

bin/configs/avro-schema.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
generatorName: avro-schema
22
outputDir: samples/openapi3/schema/petstore/avro-schema
3-
inputSpec: modules/openapi-generator/src/test/resources/3_0/petstore.yaml
3+
inputSpec: modules/openapi-generator/src/test/resources/3_0/avro-schema/petstore.yaml
44
templateDir: modules/openapi-generator/src/main/resources/avro-schema
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
{
22
"type": "{{dataType}}",
3-
{{#items}}"items": "{{#isModel}}{{package}}.{{/isModel}}{{dataType}}"{{/items}}
3+
{{#items}}"items": "{{^isPrimitiveType}}{{package}}.{{/isPrimitiveType}}{{dataType}}"{{/items}}
44
}

0 commit comments

Comments
 (0)