Path: blob/main/extensions/copilot/src/platform/configuration/common/jsonSchemaDraft7.ts
13400 views
/*---------------------------------------------------------------------------------------------1* Copyright (c) Microsoft Corporation. All rights reserved.2* Licensed under the MIT License. See License.txt in the project root for license information.3*--------------------------------------------------------------------------------------------*/45import { JsonSchema } from './jsonSchema';67export const jsonSchemaDraft7: JsonSchema = {8'title': 'Core schema meta-schema',9'definitions': {10'schemaArray': {11'type': 'array',12'minItems': 1,13'items': { '$ref': '#' }14},15'nonNegativeInteger': {16'type': 'integer',17'minimum': 018},19'nonNegativeIntegerDefault0': {20'allOf': [21{ '$ref': '#/definitions/nonNegativeInteger' },22{ 'default': 0 }23]24},25'simpleTypes': {26'enum': [27'array',28'boolean',29'integer',30'null',31'number',32'object',33'string'34]35},36'stringArray': {37'type': 'array',38'items': { 'type': 'string' },39'uniqueItems': true,40'default': []41}42},43'type': ['object', 'boolean'],44'properties': {45'$id': {46'type': 'string',47},48'$schema': {49'type': 'string',50'format': 'uri'51},52'$ref': {53'type': 'string',54},55'$comment': {56'type': 'string'57},58'title': {59'type': 'string'60},61'description': {62'type': 'string'63},64'default': true,65'readOnly': {66'type': 'boolean',67'default': false68},69'writeOnly': {70'type': 'boolean',71'default': false72},73'examples': {74'type': 'array',75'items': true76},77'multipleOf': {78'type': 'number',79'exclusiveMinimum': 080},81'maximum': {82'type': 'number'83},84'exclusiveMaximum': {85'type': 'number'86},87'minimum': {88'type': 'number'89},90'exclusiveMinimum': {91'type': 'number'92},93'maxLength': { '$ref': '#/definitions/nonNegativeInteger' },94'minLength': { '$ref': '#/definitions/nonNegativeIntegerDefault0' },95'pattern': {96'type': 'string',97'format': 'regex'98},99'additionalItems': { '$ref': '#' },100'items': {101'anyOf': [102{ '$ref': '#' },103{ '$ref': '#/definitions/schemaArray' }104],105'default': true106},107'maxItems': { '$ref': '#/definitions/nonNegativeInteger' },108'minItems': { '$ref': '#/definitions/nonNegativeIntegerDefault0' },109'uniqueItems': {110'type': 'boolean',111'default': false112},113'contains': { '$ref': '#' },114'maxProperties': { '$ref': '#/definitions/nonNegativeInteger' },115'minProperties': { '$ref': '#/definitions/nonNegativeIntegerDefault0' },116'required': { '$ref': '#/definitions/stringArray' },117'additionalProperties': { '$ref': '#' },118'definitions': {119'type': 'object',120'additionalProperties': { '$ref': '#' },121'default': {}122},123'properties': {124'type': 'object',125'additionalProperties': { '$ref': '#' },126'default': {}127},128'patternProperties': {129'type': 'object',130'additionalProperties': { '$ref': '#' },131'propertyNames': { 'format': 'regex' },132'default': {}133},134'dependencies': {135'type': 'object',136'additionalProperties': {137'anyOf': [138{ '$ref': '#' },139{ '$ref': '#/definitions/stringArray' }140]141}142},143'propertyNames': { '$ref': '#' },144'const': true,145'enum': {146'type': 'array',147'items': true,148'minItems': 1,149'uniqueItems': true150},151'type': {152'anyOf': [153{ '$ref': '#/definitions/simpleTypes' },154{155'type': 'array',156'items': { '$ref': '#/definitions/simpleTypes' },157'minItems': 1,158'uniqueItems': true159}160]161},162'format': { 'type': 'string' },163'contentMediaType': { 'type': 'string' },164'contentEncoding': { 'type': 'string' },165'if': { '$ref': '#' },166'then': { '$ref': '#' },167'else': { '$ref': '#' },168'allOf': { '$ref': '#/definitions/schemaArray' },169'anyOf': { '$ref': '#/definitions/schemaArray' },170'oneOf': { '$ref': '#/definitions/schemaArray' },171'not': { '$ref': '#' }172},173'default': true174};175176177