You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The code used to generate a sample generates a string ("resource1") for the identifying field without taking into account any regex validation on that property
Expected Behavior
The code used to generate the sample should check if the identifying field has regex and generate a value that conforms to that regex.
Current Behavior
The code used to generate the sample doesn't conform to that regex.
Possible Solution
This code should take into account any regex on the identifying property.
Steps to Reproduce
Create a concept that is identified by a property that has regex on it like so:
concept Person identified by ssn {
o String name
@description("Height (cm)")
o Double height range=[0.0,]
o DateTime dateOfBirth
o String ssn regex=/\d{3}-\d{2}-\d{4}/
}
Run concerto generate sample for that concept. See error.
ERROR: Validator error for field `[email protected]#resource1`. [email protected]: Value 'resource1' failed to match validation regex: /\d{3}-\d{2}-\d{4}/
Context (Environment)
Desktop
OS: [e.g. macOS]
Browser: [e.g. Chrome, Safari]
Version: [e.g. 0.22.15]
Detailed Description
Possible Implementation
The text was updated successfully, but these errors were encountered:
Bug Report 🐛
The code used to generate a sample generates a string ("resource1") for the identifying field without taking into account any regex validation on that property
Expected Behavior
The code used to generate the sample should check if the identifying field has regex and generate a value that conforms to that regex.
Current Behavior
The code used to generate the sample doesn't conform to that regex.
Possible Solution
This code should take into account any regex on the identifying property.
Steps to Reproduce
Create a concept that is identified by a property that has regex on it like so:
Run
concerto generate sample
for that concept. See error.Context (Environment)
Desktop
Detailed Description
Possible Implementation
The text was updated successfully, but these errors were encountered: