forked from loafle/openapi-generator-original
* [AVRO] Fix the package handling for the avro generator (#3987) Also fix an issue with the outputFolder that wasn't overridable through opts * Update sample files through avro-petstore.sh There's an issue with inlined object but it's already present with the previous commit * Revert the fix on outputFolder (not a bug)
This commit is contained in:
parent
4e47426224
commit
87c77076ef
@ -43,8 +43,8 @@ public class AvroSchemaCodegen extends DefaultCodegen implements CodegenConfig {
|
||||
|
||||
outputFolder = "generated-code/avro-schema";
|
||||
modelTemplateFiles.put("model.mustache", ".avsc");
|
||||
apiPackage = "api";
|
||||
modelPackage = "model";
|
||||
// Force the model package to the package name so import can be fully qualified
|
||||
modelPackage = packageName;
|
||||
importMapping.clear();
|
||||
embeddedTemplateDir = templateDir = AVRO;
|
||||
|
||||
@ -81,10 +81,12 @@ public class AvroSchemaCodegen extends DefaultCodegen implements CodegenConfig {
|
||||
super.processOpts();
|
||||
if (additionalProperties.containsKey(CodegenConstants.PACKAGE_NAME)) {
|
||||
packageName = (String) additionalProperties.get(CodegenConstants.PACKAGE_NAME);
|
||||
|
||||
// Force the model package to the package name so import can be fully qualified
|
||||
modelPackage = packageName;
|
||||
}
|
||||
|
||||
additionalProperties.put("packageName", packageName);
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -1 +1 @@
|
||||
4.1.1-SNAPSHOT
|
||||
4.2.0-SNAPSHOT
|
@ -11,7 +11,7 @@
|
||||
},
|
||||
{
|
||||
"name": "file",
|
||||
"type": ["null", "model.File"],
|
||||
"type": ["null", ],
|
||||
"doc": "file to upload"
|
||||
}
|
||||
]
|
||||
|
Loading…
x
Reference in New Issue
Block a user