for (Path path : swagger.getPaths().values()) {
if (path.getParameters() != null) {
for (Parameter p: path.getParameters()) {
if (p instanceof BodyParameter) {
BodyParameter bp = (BodyParameter) p;
<BUG>if (bp.getSchema() != null && bp.getSchema() instanceof RefModel) {
referencedDefinitions.add(((RefModel) bp.getSchema()).getSimpleRef());
}</BUG>
}
}

for (Path path : swagger.getPaths().values()) {
if (path.getParameters() != null) {
for (Parameter p: path.getParameters()) {
if (p instanceof BodyParameter) {
BodyParameter bp = (BodyParameter) p;
String modelRef = getModelRef(bp.getSchema());
if (modelRef != null) {
referencedDefinitions.add(modelRef);
