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

Can variable object be really empty or not #30

Closed
derberg opened this issue Aug 6, 2020 · 6 comments · Fixed by asyncapi/spec-json-schemas#14 or asyncapi/spec#424
Closed

Can variable object be really empty or not #30

derberg opened this issue Aug 6, 2020 · 6 comments · Fixed by asyncapi/spec-json-schemas#14 or asyncapi/spec#424
Labels
enhancement New feature or request

Comments

@derberg
Copy link
Member

derberg commented Aug 6, 2020

Reason/Context

This test case assumes Variable object can be empty as the spec doesn't require any property for Variable object but JSON Schema for the spec has "minProperties": 1 requirement.

I think we discussed it once but don't forget the conclusion, damn butter. Are we in a position that AsyncAPI JSON Schema complements the AsyncAPI Spec Markdown document or should it just reflect the spec as much as possible, but not complement it. I like the approach that schema complements the spec but I also understand that it might be a bit confusing for the spec audience 🤔 I think I would treat https://github.com/asyncapi/asyncapi/blob/master/versions/2.0.0/schema.json#L212 as a bug for 2.0.0. What do you think?

@derberg derberg added the enhancement New feature or request label Aug 6, 2020
@derberg
Copy link
Member Author

derberg commented Aug 6, 2020

@postatum @fmvilas what do you think?

@postatum
Copy link
Contributor

postatum commented Aug 6, 2020

Hi. I have no opinion on the issue as I've learned about the asyncapi/asyncapi/blob/master/versions/2.0.0/schema.json a moment ago.

@fmvilas
Copy link
Member

fmvilas commented Aug 6, 2020

I don't have an opinion either. It doesn't make sense to have it empty or null but not sure it should raise an error.

@derberg
Copy link
Member Author

derberg commented Aug 6, 2020

ok then, .md file is a spec and the schema is just a tool that helps to validate. This way "minProperties": 1 should be removed because it is not directly stated in the spec, and anyway technically should be allowed cause in nothing is required, minimum should also not be required.

I'll work on a PR to https://github.com/asyncapi/asyncapi/ and https://github.com/asyncapi/asyncapi-node

@derberg
Copy link
Member Author

derberg commented Aug 6, 2020

@fmvilas please approve asyncapi/spec-json-schemas#14 and asyncapi/spec#424

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
3 participants