File tree Expand file tree Collapse file tree 1 file changed +6
-5
lines changed
src/services/parsers/open-api-v3 Expand file tree Collapse file tree 1 file changed +6
-5
lines changed Original file line number Diff line number Diff 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 ) ;
You can’t perform that action at this time.
0 commit comments