com.reprezen.genflow.openapi3.doc.ModelHelper Maven / Gradle / Ivy
package com.reprezen.genflow.openapi3.doc;
import com.reprezen.genflow.openapi3.doc.Helper;
import com.reprezen.kaizen.oasparser.model3.Schema;
@SuppressWarnings("all")
public class ModelHelper implements Helper {
@Override
public void init() {
}
/**
* See comments at top of PropertyHelper - everything here is analogous
*/
public Object getAttribute(final Schema model, final String attr) {
Object _xifexpression = null;
boolean _containsKey = model.getProperties().containsKey(attr);
if (_containsKey) {
_xifexpression = model.getProperties().get(attr);
} else {
Object _switchResult = null;
if (attr != null) {
switch (attr) {
case "additionalProperties":
_switchResult = model.getAdditionalProperties();
break;
case "defaultValue":
_switchResult = model.getDefault();
break;
case "description":
_switchResult = model.getDescription();
break;
case "discriminator":
_switchResult = model.getDiscriminator();
break;
case "enums":
_switchResult = model.getEnums();
break;
case "example":
_switchResult = model.getExample();
break;
case "format":
_switchResult = model.getFormat();
break;
case "properties":
_switchResult = model.getProperties();
break;
case "type":
_switchResult = model.getType();
break;
case "xml":
_switchResult = model.getXml();
break;
}
}
_xifexpression = _switchResult;
}
return _xifexpression;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy