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

Calm CLI - Pattern Validation #73

Closed
grahampacker-ms opened this issue Mar 22, 2024 · 2 comments
Closed

Calm CLI - Pattern Validation #73

grahampacker-ms opened this issue Mar 22, 2024 · 2 comments
Assignees
Labels
Milestone

Comments

@grahampacker-ms
Copy link
Member

grahampacker-ms commented Mar 22, 2024

Feature Request

Description of Problem:

A pattern instantiation should be able to be validated against a pattern JSON schema and spectral ruleset to ensure compliance with the pattern.

This relates to #53

Potential Solutions:

Using AJV, the pattern instantiation can be validated against the pattern JSON schema.
Using Spectral, additional validations that cannot be checked by the schema can be applied.
The result would be a pass or fail.
On a failure, any issues will be output to the user.

Future Considerations

In future, it should also be possible to validate a pattern against a meta-schema

Suggested commands:
calm validate --pattern [URL/file path] --instantiation [URL/file path]
calm validate -p [URL/file path] -i [URL/file path]

@jpgough-ms
Copy link
Member

@lbulanti-ms please let us know when we can start using this tool (and the instructions) to debug interfaces 😃

@lbulanti-ms
Copy link
Member

As part of this issue we decided that the meta schemas will be released with the cli and it won't be loaded in from the $schema property URL specified in the JSON Schema. The $schema property will be used as an ID and the URL does not need to point to a file according to the JSON Schema standards. This means that every calm version will always be compatible with the cli version that gets released with. @rocketstack-matt @jpgough-ms

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

No branches or pull requests

4 participants