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

Any updates? @inferrinizzard

mattjis avatar Dec 23 '24 03:12 mattjis

There's a similar issue with additionalProperties which is leaving me without a solution.

https://github.com/glideapps/quicktype/issues/1257

mattjis avatar Dec 23 '24 03:12 mattjis