-
Notifications
You must be signed in to change notification settings - Fork 21
Closed
Labels
Description
Similar to #883, when an array item is empty in YAML (see below), such item is not parsed as an element
e.g.
asyncapi: '2.2.0'
components:
schemas:
test:
type: object
required:
-
is parsed into:
/home/frantuma/.nvm/versions/node/v16.9.0/bin/node /dati/dev/progetti/swagger/projects/apidom/master/apidom/node_modules/mocha/bin/mocha --require ts-node/register/transpile-only --ui bdd --reporter /opt/WebStorm/plugins/NodeJS/js/mocha-intellij/lib/mochaIntellijReporter.js /dati/dev/progetti/swagger/projects/apidom/master/apidom/packages/apidom-ls/test/openapi-yaml-parse.ts --grep ^apidom-parse-test test parse yaml$
asyncApi2 0:0 - 7:0
member 0:0 - 0:17
string 0:0 - 0:8
asyncApiVersion 0:10 - 0:17
member 1:0 - 7:0
string 1:0 - 1:10
components 2:2 - 7:0
member 2:2 - 7:0
string 2:2 - 2:9
object 3:4 - 7:0
member 3:4 - 7:0
string 3:4 - 3:8
schema 4:6 - 7:0
member 4:6 - 4:18
string 4:6 - 4:10
string 4:12 - 4:18
member 5:6 - 7:0
string 5:6 - 5:14
array 6:8 - 7:0
or
asyncapi: '2.2.0'
components:
schemas:
test:
type: object
required:
-
- aa
is parsed into:
member 0:0 - 0:17
string 0:0 - 0:8
asyncApiVersion 0:10 - 0:17
member 1:0 - 8:0
string 1:0 - 1:10
components 2:2 - 8:0
member 2:2 - 8:0
string 2:2 - 2:9
object 3:4 - 8:0
member 3:4 - 8:0
string 3:4 - 3:8
schema 4:6 - 8:0
member 4:6 - 4:18
string 4:6 - 4:10
string 4:12 - 4:18
member 5:6 - 8:0
string 5:6 - 5:14
array 6:8 - 8:0
string 7:10 - 7:12
We would need to have these items parsed as the expected array type, or if not possible as string elements, similarly to what done in #883 for member values.