-
Notifications
You must be signed in to change notification settings - Fork 218
Open
Description
ChatGPT suggested that this was valid -- it looks wonderful:
from voluptuous import Schema, Required, All, Length, Switch, Invalid
# Define the schema with Switch
schema = Schema({
'issuetype': str,
Switch('issuetype', {
'Feature Request': Schema({
Required('feature_details'): All(str, Length(min=10)),
}),
'Bug': Schema({
Required('bug_report'): All(str, Length(min=5)),
}),
}),
})
Metadata
Metadata
Assignees
Labels
No labels