Skip to content

Commit ad3917f

Browse files
parser-base schema fix
1 parent fa70044 commit ad3917f

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

src/services/parsers/open-api-v3/parser-base.service.ts

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -125,17 +125,18 @@ export abstract class ParserBaseService {
125125
instance.typeURI = schema.$ref;
126126
return instance;
127127
} else if (this.isSchemaObject(schema)) {
128-
if (mediaType === 'text/html') {
129-
const instance = new ModelAttributessModel(null);
130-
instance.typeURI = schema.type;
131-
return instance;
132-
}
133128
if (schema.type === 'array') {
134129
const instance = this.parseSchema(schema.items, defaultName, mediaType);
135130
instance.isArray = true;
136131
return instance;
137132
}
138133

134+
if (mediaType === 'text/html' || schema?.type !== 'object') {
135+
const instance = new ModelAttributessModel(null);
136+
instance.typeURI = schema.type;
137+
return instance;
138+
}
139+
139140
const newModel = new ModelModel(defaultName);
140141
newModel.addAttributes(this.parseAttributes(schema));
141142
this.store.models.add(newModel);

0 commit comments

Comments
 (0)