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

All required properties should have "minLength": 1 #461

Open
Brcrwilliams opened this issue May 8, 2024 · 1 comment
Open

All required properties should have "minLength": 1 #461

Brcrwilliams opened this issue May 8, 2024 · 1 comment
Milestone

Comments

@Brcrwilliams
Copy link

If a property is required, it should also not be an empty string. There are many places in the BOM schema where we use "required": [...] but do not also verify that these properties have "minLength": 1.

An example is .components[].name:

It may be that optional properties should have this constraint as well. Consider the following example:

{
  "type": "library",
  "name": "whatever",
  "version": ""
}

If whatever does not have a version, it would be more clear if that key were to be omitted rather than provided as an empty string.

@stevespringett
Copy link
Member

Thanks @Brcrwilliams. We'll add this to the 2.0 backlog.

@stevespringett stevespringett added this to the 2.0 milestone May 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants