Conditions on Basic Types (Strings)

Open
#149 0 comments 0 reactions 2 assignees View on GitHub

@plamen-neykov is already working on this.

Since Feb 9, 2026.

Assessment

This issue has not been assessed yet.

Description

enhancement
Problem Description:

Rune allows attaching conditions directly to basic type aliases (e.g., typeAlias BusinessCenter: string condition IsValid). The Python generator does not yet support wrapping simple types to trigger these validators upon assignment.

Steps to Reproduce:

Example Rune code: (Type alias with condition)

typeAlias Currency:
    string

    condition C:
        item count = 3
  1. Define a typeAlias on a basic type (string, number, etc.) with an attached condition.
  2. Generate Python code and check the Pydantic field definition for the alias.
Expected Result:

The assignment should be intercepted and validated according to the condition.

Actual Result:

No validation occurs as the type is treated as a plain Python str.

Dominant language
Java
Stars
1
Forks
6
Avg merge
3d 1h
Merged PRs (30d)
13

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from finos/rune-python-generator

All issues in finos/rune-python-generator

Similar issues

More Java issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.