We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
getSchemaType()
The interpretation of the return value of DefaultCodegenConfig.getSchemaType() is unclear.
DefaultCodegenConfig.getSchemaType()
Both the implementation of the method and its documentation suggest that this method should return Swagger types (e.g. integer, file, ...).
integer
file
However, at least some usages suggest that it should return language types (e.g. int, File, ...).
int
File
So far, I've identified two places which such problems:
addImport()
In fromProperty() the field baseType is set like this:
fromProperty()
baseType
codegenProperty.baseType = getSchemaType(propertySchema);
And then later in addVars() that baseType is used to add an import:
addVars()
addImport(codegenModel, cp.baseType);
However, addImport() seems to expect a language type, not a swagger type.
toInstantiationType()
In toInstantiationType() the method is used like this:
String inner = getSchemaType(additionalProperties); return instantiationTypes.get("map") + "<String, " + inner + ">";
This code clearly expects a language type (or Java-like type) - not a Swagger type.
The text was updated successfully, but these errors were encountered:
No branches or pull requests
The interpretation of the return value of
DefaultCodegenConfig.getSchemaType()
is unclear.Both the implementation of the method and its documentation suggest that this method should return Swagger types (e.g.
integer
,file
, ...).However, at least some usages suggest that it should return language types (e.g.
int
,File
, ...).So far, I've identified two places which such problems:
Problem 1:
addImport()
In
fromProperty()
the fieldbaseType
is set like this:And then later in
addVars()
thatbaseType
is used to add an import:However,
addImport()
seems to expect a language type, not a swagger type.Problem 2:
toInstantiationType()
In
toInstantiationType()
the method is used like this:This code clearly expects a language type (or Java-like type) - not a Swagger type.
The text was updated successfully, but these errors were encountered: