-
-
Notifications
You must be signed in to change notification settings - Fork 336
Closed
Labels
Milestone
Description
I'm writing a schema for an internal config file, and I want to be able to 1) add comments (i.e., fields whose name starts with a #
), 2) add a $schema
, 3) use the properties that are necessary for configuration. How I thought I would do this is with:
{
"type": "object",
"propertyNames": {
"pattern": "^[#\\$]",
"#": "note, starts with a # or a $"
},
"required": [ "toolset", "..." ],
"properties": {
"toolset": { "...": "..." },
"...": "..."
}
}
However, both propertyNames
and properties
are checked, and so if I have toolset
, it doesn't match against ^[#\\$]
. I'm wondering if this is intentional, and if it is, what's a good workaround?
Thanks!