architecture-as-code icon indicating copy to clipboard operation
architecture-as-code copied to clipboard

CALM Meta Schema Validation

Open rocketstack-matt opened this issue 1 year ago • 10 comments

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.

rocketstack-matt avatar Apr 03 '24 09:04 rocketstack-matt

@lbulanti-ms has been looking at this, I'm going to assign

jpgough-ms avatar Apr 17 '24 13:04 jpgough-ms

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

grahampacker-ms avatar Apr 18 '24 13:04 grahampacker-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.

rocketstack-matt avatar Apr 18 '24 14:04 rocketstack-matt

Makes sense, I think we'll need to agree what the constraints are

grahampacker-ms avatar Apr 18 '24 15:04 grahampacker-ms

@grahampacker-ms did this constraints discussion go anywhere?

jpgough-ms avatar Oct 07 '24 09:10 jpgough-ms

@jpgough-ms we never discussed what these constraints would be. I think this is still an open question

grahampacker-ms avatar Oct 07 '24 12:10 grahampacker-ms

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.

Thels avatar Nov 29 '24 12:11 Thels

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

grahampacker-ms avatar Dec 02 '24 17:12 grahampacker-ms

Do we use JSON Lint, or do we scope this out of milestone 1

jpgough-ms avatar Dec 19 '24 16:12 jpgough-ms

Removing from milestone as it's still an open question if we can even do this

grahampacker-ms avatar Jan 02 '25 11:01 grahampacker-ms