architecture-as-code
architecture-as-code copied to clipboard
CALM Meta Schema Validation
Feature Request
Description of Problem:
At the moment we are able to validate instantiations and patterns are valid vs. the meta schema but we don't have an explicit set of rules to validate the meta schema.
Potential Solutions:
At the moment the CALM schema is implicitly validated as we run validations on the instantiations and patterns, we want to investigate if it is possible to have an explicit set of rules to validate a meta schema.
@lbulanti-ms has been looking at this, I'm going to assign
do we mean that we want a set of spectral rules which validates that the meta-schema adheres to certain requirements or do we mean that we want to validate a pattern against a meta-schema?
I think it's the 2nd one but the description reads more like the 1st.
@rocketstack-matt @jpgough-ms
I actually mean the first. We have a set of rules defined in the schema, we should in effect be able to test those rules haven't changed unexpectedly and add additional rules when we find mistakes.
For example, with the new detailed-architecture property in nodes, it should only be valid depending on the type of node specified. If we had a rule to test that was the case then we would know if we accidentally broke that behaviour.
Makes sense, I think we'll need to agree what the constraints are
@grahampacker-ms did this constraints discussion go anywhere?
@jpgough-ms we never discussed what these constraints would be. I think this is still an open question
Any update on this? @lbulanti-ms / @grahampacker-ms / @jpgough-ms
It's a part of the 1.0 milestone, would be good to have a minimum requirement discussed so we can progress. it.
It's been so long I can't remember where we got to with this. I do remember we had some serious struggles getting meta-schema validation to work with AJV
Do we use JSON Lint, or do we scope this out of milestone 1
Removing from milestone as it's still an open question if we can even do this