Open neen-psk opened 1 year ago
We are using the JsonValue type from @angular-devkit/core which looks like this
JsonValue
@angular-devkit/core
export interface JsonArray extends Array<JsonValue> { } export interface JsonObject { [prop: string]: JsonValue; } export type JsonValue = boolean | string | number | JsonArray | JsonObject | null;
The JSON schema was correctly generated up to version 0.59.0, but starting from version 0.60.0, an array prototype began to be included in the generated schema. Is it possible to avoid this kind of noise?
0.59.0
0.60.0
{ "additionalProperties": false, "patternProperties": { "^[0-9]+$": { "$ref": "#/definitions/JsonValue" } }, + "properties": { + "__@unscopables@380": { + "additionalProperties": false, + "patternProperties": { "^[0-9]+$": { "type": "boolean" } }, + "properties": { + "__@iterator@378": { "type": "boolean" }, + "__@unscopables@380": { "type": "boolean" }, + "at": { + "description": "Takes an integer value and returns the item at that index,\nallowing for positive and negative integers.\nNegative integers count back from the last item in the array.", + "type": "boolean" + }, + "concat": { "type": "boolean" }, + "copyWithin": { "type": "boolean" }, + "entries": { "type": "boolean" }, + "every": { "type": "boolean" }, + "fill": { "type": "boolean" }, + "filter": { "type": "boolean" }, + "find": { "type": "boolean" }, + "findIndex": { "type": "boolean" }, + "flat": { "type": "boolean" }, + "flatMap": { "type": "boolean" }, + "forEach": { "type": "boolean" }, + "includes": { "type": "boolean" }, + "indexOf": { "type": "boolean" }, + "join": { "type": "boolean" }, + "keys": { "type": "boolean" }, + "lastIndexOf": { "type": "boolean" }, + "length": { "type": "boolean" }, + "map": { "type": "boolean" }, + "pop": { "type": "boolean" }, + "push": { "type": "boolean" }, + "reduce": { "type": "boolean" }, + "reduceRight": { "type": "boolean" }, + "reverse": { "type": "boolean" }, + "shift": { "type": "boolean" }, + "slice": { "type": "boolean" }, + "some": { "type": "boolean" }, + "sort": { "type": "boolean" }, + "splice": { "type": "boolean" }, + "toLocaleString": { "type": "boolean" }, + "toString": { "type": "boolean" }, + "unshift": { "type": "boolean" }, + "values": { "type": "boolean" } + }, + "type": "object" + }, + "length": { "type": "number" } + }, + "required": ["__@unscopables@380", "length"], "type": "object" }, { "$ref": "#/definitions/JsonObject" },
We are using the
JsonValue
type from@angular-devkit/core
which looks like thisThe JSON schema was correctly generated up to version
0.59.0
, but starting from version0.60.0
, an array prototype began to be included in the generated schema. Is it possible to avoid this kind of noise?