{"version":3,"sources":["../../../src/definitions/jsonSchema.ts"],"names":["$JSONSchema","Symbol"],"mappings":"AAAA,OAAO,IAAMA,WAAW,GAAGC,MAAM,CAAC,aAAD,CAA1B;AACP;AACA;AACA;;AAGA;AACA;AACA;;AAUA;AACA;AACA;;AAuHA;AACA;AACA","sourcesContent":["export const $JSONSchema = Symbol(\"$JSONSchema\");\n/**\n * Symbol used to make extended JSON schemas actually extend the JSONSchema type constraint at all time\n */\nexport type $JSONSchema = typeof $JSONSchema;\n\n/**\n * JSON Schema type\n */\nexport type JSONSchemaType =\n  | \"string\"\n  | \"number\"\n  | \"integer\"\n  | \"boolean\"\n  | \"object\"\n  | \"array\"\n  | \"null\";\n\n/**\n * JSON Schema type constraint\n */\nexport type JSONSchema =\n  | boolean\n  | Readonly<{\n      // Needed to have extended JSON schemas actually extend the JSONSchema type constraint at all time\n      [$JSONSchema]?: $JSONSchema;\n\n      $id?: string | undefined;\n      $ref?: string | undefined;\n      /**\n       * Meta schema\n       *\n       * Recommended values:\n       * - 'http://json-schema.org/schema#'\n       * - 'http://json-schema.org/hyper-schema#'\n       * - 'http://json-schema.org/draft-07/schema#'\n       * - 'http://json-schema.org/draft-07/hyper-schema#'\n       * @see https://tools.ietf.org/html/draft-handrews-json-schema-validation-01#section-5\n       */\n      $schema?: string | undefined;\n      $comment?: string | undefined;\n\n      /**\n       * @see https://tools.ietf.org/html/draft-handrews-json-schema-validation-01#section-6.1\n       */\n      type?: JSONSchemaType | readonly JSONSchemaType[];\n      const?: unknown;\n      enum?: unknown;\n\n      /**\n       * @see https://tools.ietf.org/html/draft-handrews-json-schema-validation-01#section-6.2\n       */\n      multipleOf?: number | undefined;\n      maximum?: number | undefined;\n      exclusiveMaximum?: number | undefined;\n      minimum?: number | undefined;\n      exclusiveMinimum?: number | undefined;\n\n      /**\n       * @see https://tools.ietf.org/html/draft-handrews-json-schema-validation-01#section-6.3\n       */\n      maxLength?: number | undefined;\n      minLength?: number | undefined;\n      pattern?: string | undefined;\n\n      /**\n       * @see https://tools.ietf.org/html/draft-handrews-json-schema-validation-01#section-6.4\n       */\n      items?: JSONSchema | readonly JSONSchema[];\n      additionalItems?: JSONSchema;\n      contains?: JSONSchema;\n      maxItems?: number | undefined;\n      minItems?: number | undefined;\n      uniqueItems?: boolean | undefined;\n\n      /**\n       * @see https://tools.ietf.org/html/draft-handrews-json-schema-validation-01#section-6.5\n       */\n      maxProperties?: number | undefined;\n      minProperties?: number | undefined;\n      required?: readonly string[];\n      properties?: Readonly<Record<string, JSONSchema>>;\n      patternProperties?: Readonly<Record<string, JSONSchema>>;\n      additionalProperties?: JSONSchema;\n      unevaluatedProperties?: JSONSchema;\n      dependencies?: Readonly<Record<string, JSONSchema | readonly string[]>>;\n      propertyNames?: JSONSchema;\n\n      /**\n       * @see https://tools.ietf.org/html/draft-handrews-json-schema-validation-01#section-6.6\n       */\n      if?: JSONSchema;\n      then?: JSONSchema;\n      else?: JSONSchema;\n\n      /**\n       * @see https://tools.ietf.org/html/draft-handrews-json-schema-validation-01#section-6.7\n       */\n      allOf?: readonly JSONSchema[];\n      anyOf?: readonly JSONSchema[];\n      oneOf?: readonly JSONSchema[];\n      not?: JSONSchema;\n\n      /**\n       * @see https://tools.ietf.org/html/draft-handrews-json-schema-validation-01#section-7\n       */\n      format?: string | undefined;\n\n      /**\n       * @see https://tools.ietf.org/html/draft-handrews-json-schema-validation-01#section-8\n       */\n      contentMediaType?: string | undefined;\n      contentEncoding?: string | undefined;\n\n      /**\n       * @see https://tools.ietf.org/html/draft-handrews-json-schema-validation-01#section-9\n       */\n      definitions?: Readonly<Record<string, JSONSchema>>;\n\n      /**\n       * @see https://tools.ietf.org/html/draft-handrews-json-schema-validation-01#section-10\n       */\n      title?: string | undefined;\n      description?: string | undefined;\n      // Required to allow array values in default field\n      // https://github.com/ThomasAribart/json-schema-to-ts/issues/80\n      default?: unknown;\n      readOnly?: boolean | undefined;\n      writeOnly?: boolean | undefined;\n      // Required to avoid applying Readonly to Array interface, which results in invalid type (Array is treated as Object):\n      // https://github.com/ThomasAribart/json-schema-to-ts/issues/48\n      // https://github.com/DefinitelyTyped/DefinitelyTyped/blob/0e40d820c92ec6457854fa6726bbff2ffea4e7dd/types/json-schema/index.d.ts#L590\n      // https://github.com/microsoft/TypeScript/issues/3496#issuecomment-128553540\n      examples?: readonly unknown[];\n\n      // Additional field from OpenAPI Spec, supported by JSON-Schema\n      nullable?: boolean;\n    }>;\n\n/**\n * JSON Schema with reference type constraint\n */\nexport type JSONSchemaReference = JSONSchema & Readonly<{ $id: string }>;\n"],"file":"jsonSchema.js"}