finos / finos/architecture-as-code

calm validate should validate interface instances against their definition-url

Open
#1,994 1 comment 0 reactions 0 assignees View on GitHub
enhancement Roadmap Group: CALM Tools Roadmap: Next
Dominant language
TypeScript
Stars
399
Forks
138
Avg merge
2d 6h
Merged PRs (30d)
38

Description

## Feature Request

### Description

`calm validate` should resolve and validate interface instances against the schema referenced by their `definition-url`. Currently, if a node declares an interface with a `definition-url`, the validator does not fetch or enforce the referenced schema — meaning required properties defined in the external interface schema can be missing without any validation error.

### Use Case

When modeling architectures with reusable, externally-defined interface schemas, users expect that `calm validate` will catch incomplete or invalid interface configurations. Without this validation, errors in interface definitions go undetected until runtime or manual review.

### Example

1. Define an interface schema (`test-interface`) with two required properties: `prop1` (string) and `prop2` (integer)
2. Create a node with an interface referencing that schema via `definition-url`
3. Only provide `prop1` in the interface config, omitting the required `prop2`
4. Run `calm validate` — no error is reported

### Expected Behaviour

`calm validate` should resolve the `definition-url`, validate the interface's `config` against the referenced schema, and report an error when required properties are missing.

### Environment

calm-cli v1.0.0

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.