Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Empty arrays cause errors #14

Open
tayloa45 opened this issue Sep 17, 2015 · 0 comments
Open

Empty arrays cause errors #14

tayloa45 opened this issue Sep 17, 2015 · 0 comments

Comments

@tayloa45
Copy link
Contributor

I've found that an empty array in default.yaml

someParameter: []
anotherParameter: 5

is being transferred to the Swagger file as a null:

x-a127-config:
  someParameter: &someParameter
  anotherParameter: &anotherParameter 5

This is due to lib/loader.js treating empty arrays as simply shorter verisons of non-empty arrays, when in fact Yaml requires them to be explicitly noted as empty using [].

This is causing errors for us as we often use empty arrays as defaults for array-type config values.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant