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

Support YAML based ConfigSchema in the CLI #331

Open
rannn505 opened this issue Dec 28, 2023 · 0 comments
Open

Support YAML based ConfigSchema in the CLI #331

rannn505 opened this issue Dec 28, 2023 · 0 comments
Labels
feat New feature or request

Comments

@rannn505
Copy link
Contributor

Suggestion

  • Users can use the --schema flag to point to a YAML file that works just like the current supported JSON file
  • Allow passing a path/to/schema.cfgu.yaml to the --schema flag of all the commands that support it
  • The structure of the new YAML-based schema mirrors that of the existing JSON-based schema

Motivation

YAML is a widely-used format known for its readability and ease of use. By supporting YAML-based ConfigSchema, we can enhance the flexibility and user-friendliness of our CLI, catering to a broader range of user preferences and workflows.

Context

Suggestions:

  • Add an helper method at the BaseCommand - getSchemaInstanceBySchemaFlag to handle all schema files types - same as for the stores
  • Use js-yaml to parse the file contents - https://npmtrends.com/js-yaml-vs-yaml-vs-yamljs
  • Let the ConfigSchema Constructor logic form the SDK to validate the actual Key:Cfgu Dict

References:

image

@rannn505 rannn505 added the feat New feature or request label Dec 28, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feat New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant