finos / finos/architecture-as-code

Enhance Pattern Options to Support JSON Property Selection

Open
#2,396 2 comments 0 reactions 0 assignees View on GitHub
cli
Dominant language
TypeScript
Stars
399
Forks
138
Avg merge
2d 6h
Merged PRs (30d)
38

Description

## Summary

CALM currently supports pattern options that allow users to make choices when generating a concrete architecture from a pattern. However, we have found that some use cases require unnecessary additional pattern options purely to control whether individual properties are added to a node or relationship.

This issue proposes a lightweight extension to pattern options that allows optional properties to be selected directly during CALM generation.

## Current behaviour

CALM pattern options currently support decision-based choices, such as:

- selecting one option from a set of alternatives
- selecting multiple options from a set of possible decisions

This works well for larger structural choices, but can become verbose when the only variation is whether a specific property should be present on a node or relationship.

## Problem

Some patterns currently need extra pattern options just to add or omit individual properties.

This can lead to:

- unnecessary duplication in pattern definitions
- more complex pattern option structures
- harder-to-maintain patterns
- a less clear authoring experience for pattern designers

## Proposed enhancement

Introduce support for properties on nodes and relationships that can be enabled or disabled through pattern options during CALM generation.

In practice, this could work by allowing a property to define occurrence constraints, for example:

```json
minOccurs: 0
maxOccurs: 1
```

I also think this enhancement will help when a user want to select a "Control Profile" (new term I just coined). i.e. Selecting a Data Classification options enables more controls on a given architecture

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.