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

refactor: remove unnecessary handling of isArray case #13

Merged
merged 2 commits into from
Apr 28, 2020

Conversation

jamescrowley
Copy link
Contributor

@jamescrowley jamescrowley commented Apr 26, 2020

Description

According to the JSON Schema, and our parser (https://github.com/asyncapi/parser-js/blob/master/lib/models/schema.js#L195), additionalProperties and additionalItems are allowed to be boolean or an object, never an array - and yet the HTML template handles this case.

Can anyone confirm this, or have I misunderstood somewhere along the way?

Related issue(s)

I noticed this while exploring another issue (asyncapi/asyncapi-react#596), but wanted to sense check.

additionalProperties and additionalItems are allowed to be boolean or an object, never an array.
Note that additionalProperties defaults to true, hence why we're adding it as false here
@derberg derberg changed the title Remove unnecessary handling of isArray case refactor: remove unnecessary handling of isArray case Apr 28, 2020
@derberg derberg merged commit bf7388a into asyncapi:master Apr 28, 2020
@jamescrowley jamescrowley deleted the removeIsArray branch April 28, 2020 08:07
@asyncapi-bot
Copy link
Contributor

🎉 This PR is included in version 0.5.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

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

Successfully merging this pull request may close these issues.

3 participants