can anyone give me an example of how to use the patternProperties item for json schema?
"Example" :
  "type" : "object",
  "patternProperties" :
  {
     <how do I use this>
  }
What I want to do in the json file is allow any subitem of "Example" that is starting with A e.g.:
{
  "Example" : 
  {
    "Aaa" : { ...}
  }
}
is patternProperties the right choice for this?
{
  type: 'object',
  patternProperties: {
    '^A': {
      type: 'string',
      ...
    }
  }
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With