Skip to content

Add support for array in flag.default and arg.default schema #463

@DannyBen

Description

@DannyBen

@EmilyGraceSeville7cf - got another one for you, if you can.

#462 added support for having an array in the default option of both arg and flag.

The array form is only allowed when repeatable is true (but I leave it up to you to decide if you wish to incorporate this limitation, or just allow both strings and arrays).

Funnily enough, the schema validation test passes as it is now, for reasons I do not understand.

The following bashly.yml locations should fail now (since they are arrays and not strings), and pass after you do your thing:

https://github.com/DannyBen/bashly/blob/f45b99368e682d774ca38e2054d51033d168414c/examples/repeatable-arg/src/bashly.yml#L20-L22

https://github.com/DannyBen/bashly/blob/f45b99368e682d774ca38e2054d51033d168414c/examples/repeatable-flag/src/bashly.yml#L28-L30

The tests are done with the latest check-jsonschema CLI version 0.27.3

Metadata

Metadata

Labels

enhancementNew feature or request

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions