mirror of
https://github.com/valitydev/openapi-generator.git
synced 2024-11-08 11:23:58 +00:00
ensure body params are flattened when type ModelImpl
This commit is contained in:
parent
b827d06077
commit
5c29562926
@ -45,8 +45,13 @@ public class InlineModelResolver {
|
||||
if (bp.getSchema() != null) {
|
||||
Model model = bp.getSchema();
|
||||
if(model instanceof ModelImpl) {
|
||||
String modelName = uniqueName(bp.getName());
|
||||
ModelImpl obj = (ModelImpl) model;
|
||||
flattenProperties(obj.getProperties(), pathname);
|
||||
|
||||
bp.setSchema(new RefModel(modelName));
|
||||
addGenerated(modelName, model);
|
||||
swagger.addDefinition(modelName, model);
|
||||
}
|
||||
else if (model instanceof ArrayModel) {
|
||||
ArrayModel am = (ArrayModel) model;
|
||||
|
Loading…
Reference in New Issue
Block a user