quicktype icon indicating copy to clipboard operation
quicktype copied to clipboard

`"unevaluatedProperties": false` not working

Open krystof-k opened this issue 2 years ago • 2 comments

{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "string": {
      "type": "string"
    }
  },
  "unevaluatedProperties": false
}

results in

export interface Object {
    string?: string;
    [property: string]: any;
}

while

{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "string": {
      "type": "string"
    }
  },
  "additionalProperties": false
}

results correctly in

export interface Object {
    string?: string;
}

krystof-k avatar Aug 19 '23 20:08 krystof-k