-
Notifications
You must be signed in to change notification settings - Fork 44
Open
Description
Sometimes options can contain the comma character as part of the option payload. The Parse()
method currently mangles the output.
I have:
type t struct {
Reason string `json:"reason" jsonschema:"required,maxLength=1024,pattern=^[A-Za-z]([A-Za-z0-9_\\,:]*[A-Za-z0-9_])?$,description=A reason\\, hopefully a valid one"`
}
I expected to get the following options:
options := []string{
"maxLength=1024",
"pattern=^[A-Za-z]([A-Za-z0-9_,:]*[A-Za-z0-9_])?$",
"description=A reason, hopefully a valid one",
}
But what I actually got was:
options := []string{
"maxLength=1024",
"pattern=^[A-Za-z]([A-Za-z0-9_",
":]*[A-Za-z0-9_])?$",
"description=A reason",
" hopefully a valid one",
}
Metadata
Metadata
Assignees
Labels
No labels