mirror of
https://github.com/valitydev/openapi-generator.git
synced 2024-11-08 19:33:55 +00:00
fix for npe on map models
This commit is contained in:
parent
539496d735
commit
b827d06077
@ -84,6 +84,8 @@ public class XmlExampleGenerator {
|
||||
name = xml.getName();
|
||||
}
|
||||
}
|
||||
// TODO: map objects will not enter this block
|
||||
if(model.getProperties() != null) {
|
||||
for (String pName : model.getProperties().keySet()) {
|
||||
Property p = model.getProperties().get(pName);
|
||||
if (p != null && p.getXml() != null && p.getXml().getAttribute() != null && p.getXml().getAttribute()) {
|
||||
@ -92,6 +94,7 @@ public class XmlExampleGenerator {
|
||||
elements.put(pName, p);
|
||||
}
|
||||
}
|
||||
}
|
||||
sb.append(indent(indent)).append(TAG_START);
|
||||
sb.append(name);
|
||||
for (String pName : attributes.keySet()) {
|
||||
|
Loading…
Reference in New Issue
Block a user