finos / finos/rune-python-generator
Conditions on Basic Types (Strings)
- Dominant language
- Java
- Stars
- 1
- Forks
- 6
- Avg merge
- 3d 1h
- Merged PRs (30d)
- 13
Description
### 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)
```rosetta
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`.
Contributor guide
Assessment
This issue has not been assessed yet.