@kubb/plugin-oas 4.11.0 → 4.11.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/mocks.cjs CHANGED
@@ -297,7 +297,19 @@ const basic = [
297
297
  name: "and",
298
298
  schema: {
299
299
  keyword: require_SchemaMapper.schemaKeywords.and,
300
- args: [{ keyword: require_SchemaMapper.schemaKeywords.string }, { keyword: require_SchemaMapper.schemaKeywords.number }]
300
+ args: [{
301
+ keyword: require_SchemaMapper.schemaKeywords.object,
302
+ args: {
303
+ properties: { street: [{ keyword: require_SchemaMapper.schemaKeywords.string }] },
304
+ additionalProperties: []
305
+ }
306
+ }, {
307
+ keyword: require_SchemaMapper.schemaKeywords.object,
308
+ args: {
309
+ properties: { city: [{ keyword: require_SchemaMapper.schemaKeywords.string }] },
310
+ additionalProperties: []
311
+ }
312
+ }]
301
313
  }
302
314
  },
303
315
  {
@@ -433,7 +445,19 @@ const basic = [
433
445
  address: [
434
446
  {
435
447
  keyword: require_SchemaMapper.schemaKeywords.and,
436
- args: [{ keyword: require_SchemaMapper.schemaKeywords.string }, { keyword: require_SchemaMapper.schemaKeywords.number }]
448
+ args: [{
449
+ keyword: require_SchemaMapper.schemaKeywords.object,
450
+ args: {
451
+ properties: { street: [{ keyword: require_SchemaMapper.schemaKeywords.string }] },
452
+ additionalProperties: []
453
+ }
454
+ }, {
455
+ keyword: require_SchemaMapper.schemaKeywords.object,
456
+ args: {
457
+ properties: { city: [{ keyword: require_SchemaMapper.schemaKeywords.string }] },
458
+ additionalProperties: []
459
+ }
460
+ }]
437
461
  },
438
462
  { keyword: require_SchemaMapper.schemaKeywords.nullable },
439
463
  {
@@ -705,7 +729,16 @@ const full = [
705
729
  address: [
706
730
  {
707
731
  keyword: require_SchemaMapper.schemaKeywords.and,
708
- args: [{ keyword: require_SchemaMapper.schemaKeywords.string }, { keyword: require_SchemaMapper.schemaKeywords.number }]
732
+ args: [{ keyword: require_SchemaMapper.schemaKeywords.string }, {
733
+ keyword: require_SchemaMapper.schemaKeywords.object,
734
+ args: {
735
+ properties: {
736
+ street: [{ keyword: require_SchemaMapper.schemaKeywords.string }],
737
+ city: [{ keyword: require_SchemaMapper.schemaKeywords.string }]
738
+ },
739
+ additionalProperties: []
740
+ }
741
+ }]
709
742
  },
710
743
  { keyword: require_SchemaMapper.schemaKeywords.nullable },
711
744
  {
@@ -1 +1 @@
1
- {"version":3,"file":"mocks.cjs","names":["basic: Array<{ name: string; schema: Schema }>","schemaKeywords","full: Array<{ name: string; schema: Schema[] }>"],"sources":["../src/mocks/schemas.ts"],"sourcesContent":["import { type Schema, schemaKeywords } from '../SchemaMapper'\n\nconst basic: Array<{ name: string; schema: Schema }> = [\n {\n name: 'any',\n schema: {\n keyword: schemaKeywords.any,\n },\n },\n {\n name: 'unknown',\n schema: {\n keyword: schemaKeywords.unknown,\n },\n },\n {\n name: 'string',\n schema: {\n keyword: schemaKeywords.string,\n },\n },\n {\n name: 'number',\n schema: {\n keyword: schemaKeywords.number,\n },\n },\n {\n name: 'integer',\n schema: {\n keyword: schemaKeywords.integer,\n },\n },\n {\n name: 'boolean',\n schema: {\n keyword: schemaKeywords.boolean,\n },\n },\n {\n name: 'primitiveDate',\n schema: {\n keyword: schemaKeywords.date,\n args: {\n type: 'date',\n },\n },\n },\n {\n name: 'date',\n schema: {\n keyword: schemaKeywords.date,\n args: {\n type: 'string',\n },\n },\n },\n {\n name: 'time',\n schema: {\n keyword: schemaKeywords.time,\n args: {\n type: 'string',\n },\n },\n },\n {\n name: 'stringOffset',\n schema: {\n keyword: schemaKeywords.datetime,\n args: {\n offset: true,\n },\n },\n },\n {\n name: 'stringLocal',\n schema: {\n keyword: schemaKeywords.datetime,\n args: {\n local: true,\n },\n },\n },\n {\n name: 'datetime',\n schema: {\n keyword: schemaKeywords.datetime,\n args: {\n offset: false,\n },\n },\n },\n {\n name: 'nullable',\n schema: {\n keyword: schemaKeywords.nullable,\n },\n },\n {\n name: 'undefined',\n schema: {\n keyword: schemaKeywords.undefined,\n },\n },\n {\n name: 'min',\n schema: {\n keyword: schemaKeywords.min,\n args: 2,\n },\n },\n {\n name: 'max',\n schema: {\n keyword: schemaKeywords.max,\n args: 2,\n },\n },\n {\n name: 'matchesReg',\n schema: {\n keyword: schemaKeywords.matches,\n args: '/node_modules/', // pure regexp\n },\n },\n {\n name: 'matches',\n schema: {\n keyword: schemaKeywords.matches,\n args: '^[A-Z]{2}$',\n },\n },\n {\n name: 'const',\n schema: {\n keyword: schemaKeywords.const,\n args: {\n name: '',\n value: '',\n format: schemaKeywords.string,\n },\n },\n },\n {\n name: 'ref',\n schema: {\n keyword: schemaKeywords.ref,\n args: {\n $ref: '$ref',\n name: 'Pet',\n path: './pet.ts',\n isImportable: true,\n },\n },\n },\n {\n name: 'enum',\n schema: {\n keyword: schemaKeywords.enum,\n args: {\n name: 'enum',\n typeName: 'Enum',\n asConst: false,\n items: [\n { name: 'A', value: 'A', format: schemaKeywords.string },\n { name: 'B', value: 'B', format: schemaKeywords.string },\n { name: 'C', value: 'C', format: schemaKeywords.string },\n { name: 2, value: 2, format: schemaKeywords.number },\n ],\n },\n },\n },\n {\n name: 'enumLiteralBoolean',\n schema: {\n keyword: schemaKeywords.enum,\n args: {\n asConst: true,\n items: [\n {\n format: 'boolean',\n name: 'true',\n value: true,\n },\n {\n format: 'boolean',\n name: 'false',\n value: false,\n },\n ],\n name: 'PetEnumLiteral',\n typeName: 'PetEnumLiteral',\n },\n },\n },\n {\n name: 'tuple',\n schema: {\n keyword: schemaKeywords.tuple,\n args: {\n items: [],\n },\n },\n },\n {\n name: 'tupleMulti',\n schema: {\n keyword: schemaKeywords.tuple,\n args: {\n items: [{ keyword: schemaKeywords.string }, { keyword: schemaKeywords.number }],\n },\n },\n },\n {\n name: 'array',\n schema: {\n keyword: schemaKeywords.array,\n args: {\n items: [\n {\n keyword: schemaKeywords.union,\n args: [{ keyword: schemaKeywords.number }, { keyword: schemaKeywords.string }],\n },\n ],\n },\n },\n },\n {\n name: 'arrayEmpty',\n schema: {\n keyword: schemaKeywords.array,\n args: {\n items: [],\n },\n },\n },\n {\n name: 'arrayRef',\n schema: {\n keyword: schemaKeywords.array,\n args: {\n items: [\n {\n keyword: schemaKeywords.ref,\n\n args: { name: 'Pet', $ref: '#component/schema/Pet', path: './pet.ts', isImportable: true },\n },\n ],\n },\n },\n },\n {\n name: 'arrayAdvanced',\n schema: {\n keyword: schemaKeywords.array,\n args: {\n items: [{ keyword: schemaKeywords.min, args: 1 }, { keyword: schemaKeywords.max, args: 10 }, { keyword: schemaKeywords.number }],\n min: 3,\n max: 10,\n },\n },\n },\n {\n name: 'arrayRegex',\n schema: {\n keyword: schemaKeywords.array,\n args: {\n items: [{ keyword: schemaKeywords.matches, args: '^[a-zA-Z0-9]{1,13}$' }],\n min: 3,\n max: 10,\n },\n },\n },\n {\n name: 'union',\n schema: {\n keyword: schemaKeywords.union,\n args: [{ keyword: schemaKeywords.string }, { keyword: schemaKeywords.number }],\n },\n },\n {\n name: 'unionOne',\n schema: {\n keyword: schemaKeywords.union,\n args: [{ keyword: schemaKeywords.string }],\n },\n },\n {\n name: 'catchall',\n schema: {\n keyword: schemaKeywords.object,\n args: {\n properties: {},\n additionalProperties: [\n {\n keyword: schemaKeywords.ref,\n args: { name: 'Pet', $ref: '#component/schema/Pet', path: './Pet.ts', isImportable: true },\n },\n ],\n },\n },\n },\n {\n name: 'and',\n schema: {\n keyword: schemaKeywords.and,\n args: [{ keyword: schemaKeywords.string }, { keyword: schemaKeywords.number }],\n },\n },\n {\n name: 'object',\n schema: {\n keyword: schemaKeywords.object,\n args: {\n properties: {\n firstName: [{ keyword: schemaKeywords.string }, { keyword: schemaKeywords.min, args: 2 }],\n address: [{ keyword: schemaKeywords.string }, { keyword: schemaKeywords.nullable }, { keyword: schemaKeywords.describe, args: '\"Your address\"' }],\n },\n additionalProperties: [],\n },\n },\n },\n {\n name: 'objectOptional',\n schema: {\n keyword: schemaKeywords.object,\n args: {\n properties: {\n firstName: [{ keyword: schemaKeywords.string }, { keyword: schemaKeywords.optional }, { keyword: schemaKeywords.min, args: 2 }],\n address: [{ keyword: schemaKeywords.string }, { keyword: schemaKeywords.nullable }, { keyword: schemaKeywords.describe, args: '\"Your address\"' }],\n },\n additionalProperties: [],\n },\n },\n },\n {\n name: 'objectArray',\n schema: {\n keyword: schemaKeywords.object,\n args: {\n properties: {\n ids: [\n {\n keyword: schemaKeywords.array,\n args: {\n items: [{ keyword: schemaKeywords.matches, args: '^[a-zA-Z0-9]{1,13}$' }],\n min: 3,\n max: 10,\n },\n },\n ],\n },\n additionalProperties: [],\n },\n },\n },\n {\n name: 'objectDates',\n schema: {\n keyword: schemaKeywords.object,\n args: {\n properties: {\n dateTime: [{ keyword: schemaKeywords.datetime, args: { offset: true } }],\n date: [{ keyword: schemaKeywords.date, args: { type: 'string' } }],\n time: [{ keyword: schemaKeywords.time, args: { type: 'string' } }],\n nativeDate: [{ keyword: schemaKeywords.date, args: { type: 'date' } }],\n },\n additionalProperties: [],\n },\n },\n },\n {\n name: 'objectAnd',\n schema: {\n keyword: schemaKeywords.object,\n args: {\n properties: {\n firstName: [\n { keyword: schemaKeywords.deprecated },\n { keyword: schemaKeywords.default, args: 'test' },\n {\n keyword: schemaKeywords.min,\n args: 2,\n },\n {\n keyword: schemaKeywords.string,\n },\n ],\n age: [\n { keyword: schemaKeywords.example, args: '2' },\n { keyword: schemaKeywords.default, args: 2 },\n {\n keyword: schemaKeywords.min,\n args: 3,\n },\n {\n keyword: schemaKeywords.number,\n },\n ],\n address: [\n {\n keyword: schemaKeywords.and,\n args: [{ keyword: schemaKeywords.string }, { keyword: schemaKeywords.number }],\n },\n { keyword: schemaKeywords.nullable },\n { keyword: schemaKeywords.describe, args: 'Your address' },\n ],\n },\n additionalProperties: [],\n },\n },\n },\n {\n name: 'objectEnum',\n schema: {\n keyword: schemaKeywords.object,\n args: {\n properties: {\n version: [\n {\n keyword: schemaKeywords.schema,\n args: {\n format: 'string',\n type: 'string',\n },\n },\n {\n keyword: schemaKeywords.enum,\n args: {\n name: 'enum',\n typeName: 'Enum',\n asConst: false,\n items: [\n { name: 'A', value: 'A', format: schemaKeywords.string },\n { name: 'B', value: 'B', format: schemaKeywords.string },\n { name: 'C', value: 'C', format: schemaKeywords.string },\n { name: 2, value: 2, format: schemaKeywords.number },\n ],\n },\n },\n {\n keyword: schemaKeywords.min,\n args: 4,\n },\n { keyword: schemaKeywords.describe, args: 'Your address' },\n ],\n },\n additionalProperties: [],\n },\n },\n },\n {\n name: 'objectObjectEnum',\n schema: {\n keyword: schemaKeywords.object,\n args: {\n properties: {\n prop1: [\n {\n keyword: schemaKeywords.object,\n args: {\n properties: {\n prop2: [\n {\n keyword: schemaKeywords.schema,\n args: { format: 'string', type: 'string' },\n },\n {\n keyword: schemaKeywords.enum,\n args: {\n name: 'enum',\n typeName: 'Enum',\n asConst: false,\n items: [\n { name: 'A', value: 'A', format: schemaKeywords.string },\n { name: 'B', value: 'B', format: schemaKeywords.string },\n ],\n },\n },\n ],\n },\n additionalProperties: [],\n },\n },\n ],\n },\n additionalProperties: [],\n },\n },\n },\n {\n name: 'objectArrayObject',\n schema: {\n keyword: schemaKeywords.object,\n args: {\n properties: {\n ids: [\n {\n keyword: schemaKeywords.array,\n args: {\n items: [\n {\n keyword: schemaKeywords.object,\n args: {\n properties: {\n enum: [\n {\n keyword: schemaKeywords.schema,\n args: {\n format: 'string',\n type: 'string',\n },\n },\n {\n keyword: schemaKeywords.enum,\n args: {\n name: 'enum',\n typeName: 'Enum',\n asConst: false,\n items: [\n { name: 'A', value: 'A', format: schemaKeywords.string },\n { name: 'B', value: 'B', format: schemaKeywords.string },\n { name: 'C', value: 'C', format: schemaKeywords.string },\n { name: 2, value: 2, format: schemaKeywords.number },\n ],\n },\n },\n ],\n },\n additionalProperties: [],\n },\n },\n ],\n min: 3,\n max: 10,\n },\n },\n ],\n },\n additionalProperties: [],\n },\n },\n },\n {\n name: 'objectEmpty',\n schema: {\n keyword: schemaKeywords.object,\n args: {\n properties: {},\n additionalProperties: [],\n },\n },\n },\n {\n name: 'default',\n schema: {\n keyword: schemaKeywords.default,\n },\n },\n {\n name: 'default',\n schema: {\n keyword: schemaKeywords.default,\n args: 'default',\n },\n },\n {\n name: 'blob',\n schema: {\n keyword: schemaKeywords.blob,\n },\n },\n {\n name: 'nullableAdditionalProperties',\n schema: {\n keyword: schemaKeywords.object,\n args: {\n properties: {},\n additionalProperties: [\n {\n keyword: schemaKeywords.string,\n },\n {\n args: {\n format: undefined,\n type: schemaKeywords.string,\n },\n keyword: schemaKeywords.schema,\n },\n {\n keyword: schemaKeywords.nullable,\n },\n ],\n },\n },\n },\n]\n\nconst full: Array<{ name: string; schema: Schema[] }> = [\n {\n name: 'Upload',\n schema: [\n {\n keyword: schemaKeywords.blob,\n },\n ],\n },\n {\n name: 'PageSizeNumber',\n schema: [\n {\n keyword: schemaKeywords.number,\n },\n {\n keyword: schemaKeywords.default,\n args: 10,\n },\n ],\n },\n {\n name: 'PageSizeInteger',\n schema: [\n {\n keyword: schemaKeywords.integer,\n },\n {\n keyword: schemaKeywords.default,\n args: 10,\n },\n ],\n },\n {\n name: 'Object',\n schema: [\n { keyword: schemaKeywords.nullable },\n { keyword: schemaKeywords.describe, args: 'Your address' },\n {\n keyword: schemaKeywords.object,\n args: {\n properties: {\n firstName: [\n { keyword: schemaKeywords.deprecated },\n { keyword: schemaKeywords.default, args: 'test' },\n {\n keyword: schemaKeywords.min,\n args: 2,\n },\n {\n keyword: schemaKeywords.string,\n },\n ],\n age: [\n { keyword: schemaKeywords.example, args: '2' },\n { keyword: schemaKeywords.default, args: 2 },\n {\n keyword: schemaKeywords.min,\n args: 2,\n },\n {\n keyword: schemaKeywords.number,\n },\n ],\n address: [\n {\n keyword: schemaKeywords.and,\n args: [{ keyword: schemaKeywords.string }, { keyword: schemaKeywords.number }],\n },\n { keyword: schemaKeywords.nullable },\n { keyword: schemaKeywords.describe, args: 'Your address' },\n ],\n },\n additionalProperties: [],\n },\n },\n ],\n },\n {\n name: 'Order',\n schema: [\n {\n keyword: schemaKeywords.schema,\n args: {\n type: 'object',\n },\n },\n {\n keyword: schemaKeywords.object,\n args: {\n properties: {\n status: [\n {\n keyword: schemaKeywords.enum,\n args: {\n name: 'orderStatus',\n asConst: false,\n typeName: 'OrderStatus',\n items: [\n { name: 'Placed', value: 'placed', format: 'string' },\n { name: 'Approved', value: 'approved', format: 'string' },\n ],\n },\n },\n ],\n },\n additionalProperties: [],\n },\n },\n ],\n },\n {\n name: 'nullableAdditionalProperties',\n schema: [\n {\n keyword: schemaKeywords.object,\n args: {\n properties: {},\n additionalProperties: [\n {\n keyword: schemaKeywords.string,\n },\n {\n args: {\n format: undefined,\n type: schemaKeywords.string,\n },\n keyword: schemaKeywords.schema,\n },\n {\n keyword: schemaKeywords.number,\n },\n ],\n },\n },\n ],\n },\n {\n name: 'Record',\n schema: [\n {\n keyword: schemaKeywords.object,\n args: {\n properties: {},\n additionalProperties: [\n {\n keyword: schemaKeywords.integer,\n },\n {\n keyword: schemaKeywords.schema,\n args: {\n type: 'integer',\n format: 'int32',\n },\n },\n {\n keyword: schemaKeywords.optional,\n },\n ],\n },\n },\n {\n keyword: schemaKeywords.schema,\n args: {\n type: 'integer',\n format: 'int32',\n },\n },\n {\n keyword: schemaKeywords.optional,\n },\n ],\n },\n]\n\nexport const schemas = {\n basic,\n full,\n}\n"],"mappings":";;;AAEA,MAAMA,QAAiD;CACrD;EACE,MAAM;EACN,QAAQ,EACN,SAASC,oCAAe,KACzB;EACF;CACD;EACE,MAAM;EACN,QAAQ,EACN,SAASA,oCAAe,SACzB;EACF;CACD;EACE,MAAM;EACN,QAAQ,EACN,SAASA,oCAAe,QACzB;EACF;CACD;EACE,MAAM;EACN,QAAQ,EACN,SAASA,oCAAe,QACzB;EACF;CACD;EACE,MAAM;EACN,QAAQ,EACN,SAASA,oCAAe,SACzB;EACF;CACD;EACE,MAAM;EACN,QAAQ,EACN,SAASA,oCAAe,SACzB;EACF;CACD;EACE,MAAM;EACN,QAAQ;GACN,SAASA,oCAAe;GACxB,MAAM,EACJ,MAAM,QACP;GACF;EACF;CACD;EACE,MAAM;EACN,QAAQ;GACN,SAASA,oCAAe;GACxB,MAAM,EACJ,MAAM,UACP;GACF;EACF;CACD;EACE,MAAM;EACN,QAAQ;GACN,SAASA,oCAAe;GACxB,MAAM,EACJ,MAAM,UACP;GACF;EACF;CACD;EACE,MAAM;EACN,QAAQ;GACN,SAASA,oCAAe;GACxB,MAAM,EACJ,QAAQ,MACT;GACF;EACF;CACD;EACE,MAAM;EACN,QAAQ;GACN,SAASA,oCAAe;GACxB,MAAM,EACJ,OAAO,MACR;GACF;EACF;CACD;EACE,MAAM;EACN,QAAQ;GACN,SAASA,oCAAe;GACxB,MAAM,EACJ,QAAQ,OACT;GACF;EACF;CACD;EACE,MAAM;EACN,QAAQ,EACN,SAASA,oCAAe,UACzB;EACF;CACD;EACE,MAAM;EACN,QAAQ,EACN,SAASA,oCAAe,WACzB;EACF;CACD;EACE,MAAM;EACN,QAAQ;GACN,SAASA,oCAAe;GACxB,MAAM;GACP;EACF;CACD;EACE,MAAM;EACN,QAAQ;GACN,SAASA,oCAAe;GACxB,MAAM;GACP;EACF;CACD;EACE,MAAM;EACN,QAAQ;GACN,SAASA,oCAAe;GACxB,MAAM;GACP;EACF;CACD;EACE,MAAM;EACN,QAAQ;GACN,SAASA,oCAAe;GACxB,MAAM;GACP;EACF;CACD;EACE,MAAM;EACN,QAAQ;GACN,SAASA,oCAAe;GACxB,MAAM;IACJ,MAAM;IACN,OAAO;IACP,QAAQA,oCAAe;IACxB;GACF;EACF;CACD;EACE,MAAM;EACN,QAAQ;GACN,SAASA,oCAAe;GACxB,MAAM;IACJ,MAAM;IACN,MAAM;IACN,MAAM;IACN,cAAc;IACf;GACF;EACF;CACD;EACE,MAAM;EACN,QAAQ;GACN,SAASA,oCAAe;GACxB,MAAM;IACJ,MAAM;IACN,UAAU;IACV,SAAS;IACT,OA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oCAAe,SACzB;EACF;CACD;EACE,MAAM;EACN,QAAQ;GACN,SAASA,oCAAe;GACxB,MAAM;GACP;EACF;CACD;EACE,MAAM;EACN,QAAQ,EACN,SAASA,oCAAe,MACzB;EACF;CACD;EACE,MAAM;EACN,QAAQ;GACN,SAASA,oCAAe;GACxB,MAAM;IACJ,YAAY,EAAE;IACd,sBAAsB;KACpB,EACE,SAASA,oCAAe,QACzB;KACD;MACE,MAAM;OACJ,QAAQ;OACR,MAAMA,oCAAe;OACtB;MACD,SAASA,oCAAe;MACzB;KACD,EACE,SAASA,oCAAe,UACzB;KACF;IACF;GACF;EACF;CACF;AAED,MAAMC,OAAkD;CACtD;EACE,MAAM;EACN,QAAQ,CACN,EACE,SAASD,oCAAe,MACzB,CACF;EACF;CACD;EACE,MAAM;EACN,QAAQ,CACN,EACE,SAASA,oCAAe,QACzB,EACD;GACE,SAASA,oCAAe;GACxB,MAAM;GACP,CACF;EACF;CACD;EACE,MAAM;EACN,QAAQ,CACN,EACE,SAASA,oCAAe,SACzB,EACD;GACE,SAASA,oCAAe;GACxB,MAAM;GACP,CACF;EACF;CACD;EACE,MAAM;EACN,QAAQ;GACN,EAAE,SAASA,oCAAe,UAAU;GACpC;IAAE,SAASA,oCAAe;IAAU,MAAM;IAAgB;GAC1D;IACE,SAASA,oCAAe;IACxB,MAAM;KACJ,YAAY;MACV,WAAW;OACT,EAAE,SAASA,oCAAe,YAAY;OACtC;QAAE,SAASA,oCAAe;QAAS,MAAM;QAAQ;OACjD;QACE,SAASA,oCAAe;QACxB,MAAM;QACP;OACD,EACE,SAASA,oCAAe,QACzB;OACF;MACD,KAAK;OACH;QAAE,SAASA,oCAAe;QAAS,MAAM;QAAK;OAC9C;QAAE,SAASA,oCAAe;QAAS,MAAM;QAAG;OAC5C;QACE,SAASA,oCAAe;QACxB,MAAM;QACP;OACD,EACE,SAASA,oCAAe,QACzB;OACF;MACD,SAAS;OACP;QACE,SAASA,oCAAe;QACxB,MAAM,CAAC,EAAE,SAASA,oCAAe,QAAQ,EAAE,EAAE,SAASA,oCAAe,QAAQ,CAAC;QAC/E;OACD,EAAE,SAASA,oCAAe,UAAU;OACpC;QAAE,SAASA,oCAAe;QAAU,MAAM;QAAgB;OAC3D;MACF;KACD,sBAAsB,EAAE;KACzB;IACF;GACF;EACF;CACD;EACE,MAAM;EACN,QAAQ,CACN;GACE,SAASA,oCAAe;GACxB,MAAM,EACJ,MAAM,UACP;GACF,EACD;GACE,SAASA,oCAAe;GACxB,MAAM;IACJ,YAAY,EACV,QAAQ,CACN;KACE,SAASA,oCAAe;KACxB,MAAM;MACJ,MAAM;MACN,SAAS;MACT,UAAU;MACV,OAAO,CACL;OAAE,MAAM;OAAU,OAAO;OAAU,QAAQ;OAAU,EACrD;OAAE,MAAM;OAAY,OAAO;OAAY,QAAQ;OAAU,CAC1D;MACF;KACF,CACF,EACF;IACD,sBAAsB,EAAE;IACzB;GACF,CACF;EACF;CACD;EACE,MAAM;EACN,QAAQ,CACN;GACE,SAASA,oCAAe;GACxB,MAAM;IACJ,YAAY,EAAE;IACd,sBAAsB;KACpB,EACE,SAASA,oCAAe,QACzB;KACD;MACE,MAAM;OACJ,QAAQ;OACR,MAAMA,oCAAe;OACtB;MACD,SAASA,oCAAe;MACzB;KACD,EACE,SAASA,oCAAe,QACzB;KACF;IACF;GACF,CACF;EACF;CACD;EACE,MAAM;EACN,QAAQ;GACN;IACE,SAASA,oCAAe;IACxB,MAAM;KACJ,YAAY,EAAE;KACd,sBAAsB;MACpB,EACE,SAASA,oCAAe,SACzB;MACD;OACE,SAASA,oCAAe;OACxB,MAAM;QACJ,MAAM;QACN,QAAQ;QACT;OACF;MACD,EACE,SAASA,oCAAe,UACzB;MACF;KACF;IACF;GACD;IACE,SAASA,oCAAe;IACxB,MAAM;KACJ,MAAM;KACN,QAAQ;KACT;IACF;GACD,EACE,SAASA,oCAAe,UACzB;GACF;EACF;CACF;AAED,MAAa,UAAU;CACrB;CACA;CACD"}
1
+ {"version":3,"file":"mocks.cjs","names":["basic: Array<{ name: string; schema: Schema }>","schemaKeywords","full: Array<{ name: string; schema: Schema[] }>"],"sources":["../src/mocks/schemas.ts"],"sourcesContent":["import { type Schema, schemaKeywords } from '../SchemaMapper'\n\nconst basic: Array<{ name: string; schema: Schema }> = [\n {\n name: 'any',\n schema: {\n keyword: schemaKeywords.any,\n },\n },\n {\n name: 'unknown',\n schema: {\n keyword: schemaKeywords.unknown,\n },\n },\n {\n name: 'string',\n schema: {\n keyword: schemaKeywords.string,\n },\n },\n {\n name: 'number',\n schema: {\n keyword: schemaKeywords.number,\n },\n },\n {\n name: 'integer',\n schema: {\n keyword: schemaKeywords.integer,\n },\n },\n {\n name: 'boolean',\n schema: {\n keyword: schemaKeywords.boolean,\n },\n },\n {\n name: 'primitiveDate',\n schema: {\n keyword: schemaKeywords.date,\n args: {\n type: 'date',\n },\n },\n },\n {\n name: 'date',\n schema: {\n keyword: schemaKeywords.date,\n args: {\n type: 'string',\n },\n },\n },\n {\n name: 'time',\n schema: {\n keyword: schemaKeywords.time,\n args: {\n type: 'string',\n },\n },\n },\n {\n name: 'stringOffset',\n schema: {\n keyword: schemaKeywords.datetime,\n args: {\n offset: true,\n },\n },\n },\n {\n name: 'stringLocal',\n schema: {\n keyword: schemaKeywords.datetime,\n args: {\n local: true,\n },\n },\n },\n {\n name: 'datetime',\n schema: {\n keyword: schemaKeywords.datetime,\n args: {\n offset: false,\n },\n },\n },\n {\n name: 'nullable',\n schema: {\n keyword: schemaKeywords.nullable,\n },\n },\n {\n name: 'undefined',\n schema: {\n keyword: schemaKeywords.undefined,\n },\n },\n {\n name: 'min',\n schema: {\n keyword: schemaKeywords.min,\n args: 2,\n },\n },\n {\n name: 'max',\n schema: {\n keyword: schemaKeywords.max,\n args: 2,\n },\n },\n {\n name: 'matchesReg',\n schema: {\n keyword: schemaKeywords.matches,\n args: '/node_modules/', // pure regexp\n },\n },\n {\n name: 'matches',\n schema: {\n keyword: schemaKeywords.matches,\n args: '^[A-Z]{2}$',\n },\n },\n {\n name: 'const',\n schema: {\n keyword: schemaKeywords.const,\n args: {\n name: '',\n value: '',\n format: schemaKeywords.string,\n },\n },\n },\n {\n name: 'ref',\n schema: {\n keyword: schemaKeywords.ref,\n args: {\n $ref: '$ref',\n name: 'Pet',\n path: './pet.ts',\n isImportable: true,\n },\n },\n },\n {\n name: 'enum',\n schema: {\n keyword: schemaKeywords.enum,\n args: {\n name: 'enum',\n typeName: 'Enum',\n asConst: false,\n items: [\n { name: 'A', value: 'A', format: schemaKeywords.string },\n { name: 'B', value: 'B', format: schemaKeywords.string },\n { name: 'C', value: 'C', format: schemaKeywords.string },\n { name: 2, value: 2, format: schemaKeywords.number },\n ],\n },\n },\n },\n {\n name: 'enumLiteralBoolean',\n schema: {\n keyword: schemaKeywords.enum,\n args: {\n asConst: true,\n items: [\n {\n format: 'boolean',\n name: 'true',\n value: true,\n },\n {\n format: 'boolean',\n name: 'false',\n value: false,\n },\n ],\n name: 'PetEnumLiteral',\n typeName: 'PetEnumLiteral',\n },\n },\n },\n {\n name: 'tuple',\n schema: {\n keyword: schemaKeywords.tuple,\n args: {\n items: [],\n },\n },\n },\n {\n name: 'tupleMulti',\n schema: {\n keyword: schemaKeywords.tuple,\n args: {\n items: [{ keyword: schemaKeywords.string }, { keyword: schemaKeywords.number }],\n },\n },\n },\n {\n name: 'array',\n schema: {\n keyword: schemaKeywords.array,\n args: {\n items: [\n {\n keyword: schemaKeywords.union,\n args: [{ keyword: schemaKeywords.number }, { keyword: schemaKeywords.string }],\n },\n ],\n },\n },\n },\n {\n name: 'arrayEmpty',\n schema: {\n keyword: schemaKeywords.array,\n args: {\n items: [],\n },\n },\n },\n {\n name: 'arrayRef',\n schema: {\n keyword: schemaKeywords.array,\n args: {\n items: [\n {\n keyword: schemaKeywords.ref,\n\n args: { name: 'Pet', $ref: '#component/schema/Pet', path: './pet.ts', isImportable: true },\n },\n ],\n },\n },\n },\n {\n name: 'arrayAdvanced',\n schema: {\n keyword: schemaKeywords.array,\n args: {\n items: [{ keyword: schemaKeywords.min, args: 1 }, { keyword: schemaKeywords.max, args: 10 }, { keyword: schemaKeywords.number }],\n min: 3,\n max: 10,\n },\n },\n },\n {\n name: 'arrayRegex',\n schema: {\n keyword: schemaKeywords.array,\n args: {\n items: [{ keyword: schemaKeywords.matches, args: '^[a-zA-Z0-9]{1,13}$' }],\n min: 3,\n max: 10,\n },\n },\n },\n {\n name: 'union',\n schema: {\n keyword: schemaKeywords.union,\n args: [{ keyword: schemaKeywords.string }, { keyword: schemaKeywords.number }],\n },\n },\n {\n name: 'unionOne',\n schema: {\n keyword: schemaKeywords.union,\n args: [{ keyword: schemaKeywords.string }],\n },\n },\n {\n name: 'catchall',\n schema: {\n keyword: schemaKeywords.object,\n args: {\n properties: {},\n additionalProperties: [\n {\n keyword: schemaKeywords.ref,\n args: { name: 'Pet', $ref: '#component/schema/Pet', path: './Pet.ts', isImportable: true },\n },\n ],\n },\n },\n },\n {\n name: 'and',\n schema: {\n keyword: schemaKeywords.and,\n args: [\n {\n keyword: schemaKeywords.object,\n args: {\n properties: {\n street: [{ keyword: schemaKeywords.string }],\n },\n additionalProperties: [],\n },\n },\n {\n keyword: schemaKeywords.object,\n args: {\n properties: {\n city: [{ keyword: schemaKeywords.string }],\n },\n additionalProperties: [],\n },\n },\n ],\n },\n },\n {\n name: 'object',\n schema: {\n keyword: schemaKeywords.object,\n args: {\n properties: {\n firstName: [{ keyword: schemaKeywords.string }, { keyword: schemaKeywords.min, args: 2 }],\n address: [{ keyword: schemaKeywords.string }, { keyword: schemaKeywords.nullable }, { keyword: schemaKeywords.describe, args: '\"Your address\"' }],\n },\n additionalProperties: [],\n },\n },\n },\n {\n name: 'objectOptional',\n schema: {\n keyword: schemaKeywords.object,\n args: {\n properties: {\n firstName: [{ keyword: schemaKeywords.string }, { keyword: schemaKeywords.optional }, { keyword: schemaKeywords.min, args: 2 }],\n address: [{ keyword: schemaKeywords.string }, { keyword: schemaKeywords.nullable }, { keyword: schemaKeywords.describe, args: '\"Your address\"' }],\n },\n additionalProperties: [],\n },\n },\n },\n {\n name: 'objectArray',\n schema: {\n keyword: schemaKeywords.object,\n args: {\n properties: {\n ids: [\n {\n keyword: schemaKeywords.array,\n args: {\n items: [{ keyword: schemaKeywords.matches, args: '^[a-zA-Z0-9]{1,13}$' }],\n min: 3,\n max: 10,\n },\n },\n ],\n },\n additionalProperties: [],\n },\n },\n },\n {\n name: 'objectDates',\n schema: {\n keyword: schemaKeywords.object,\n args: {\n properties: {\n dateTime: [{ keyword: schemaKeywords.datetime, args: { offset: true } }],\n date: [{ keyword: schemaKeywords.date, args: { type: 'string' } }],\n time: [{ keyword: schemaKeywords.time, args: { type: 'string' } }],\n nativeDate: [{ keyword: schemaKeywords.date, args: { type: 'date' } }],\n },\n additionalProperties: [],\n },\n },\n },\n {\n name: 'objectAnd',\n schema: {\n keyword: schemaKeywords.object,\n args: {\n properties: {\n firstName: [\n { keyword: schemaKeywords.deprecated },\n { keyword: schemaKeywords.default, args: 'test' },\n {\n keyword: schemaKeywords.min,\n args: 2,\n },\n {\n keyword: schemaKeywords.string,\n },\n ],\n age: [\n { keyword: schemaKeywords.example, args: '2' },\n { keyword: schemaKeywords.default, args: 2 },\n {\n keyword: schemaKeywords.min,\n args: 3,\n },\n {\n keyword: schemaKeywords.number,\n },\n ],\n address: [\n {\n keyword: schemaKeywords.and,\n args: [\n {\n keyword: schemaKeywords.object,\n args: {\n properties: {\n street: [{ keyword: schemaKeywords.string }],\n },\n additionalProperties: [],\n },\n },\n {\n keyword: schemaKeywords.object,\n args: {\n properties: {\n city: [{ keyword: schemaKeywords.string }],\n },\n additionalProperties: [],\n },\n },\n ],\n },\n { keyword: schemaKeywords.nullable },\n { keyword: schemaKeywords.describe, args: 'Your address' },\n ],\n },\n additionalProperties: [],\n },\n },\n },\n {\n name: 'objectEnum',\n schema: {\n keyword: schemaKeywords.object,\n args: {\n properties: {\n version: [\n {\n keyword: schemaKeywords.schema,\n args: {\n format: 'string',\n type: 'string',\n },\n },\n {\n keyword: schemaKeywords.enum,\n args: {\n name: 'enum',\n typeName: 'Enum',\n asConst: false,\n items: [\n { name: 'A', value: 'A', format: schemaKeywords.string },\n { name: 'B', value: 'B', format: schemaKeywords.string },\n { name: 'C', value: 'C', format: schemaKeywords.string },\n { name: 2, value: 2, format: schemaKeywords.number },\n ],\n },\n },\n {\n keyword: schemaKeywords.min,\n args: 4,\n },\n { keyword: schemaKeywords.describe, args: 'Your address' },\n ],\n },\n additionalProperties: [],\n },\n },\n },\n {\n name: 'objectObjectEnum',\n schema: {\n keyword: schemaKeywords.object,\n args: {\n properties: {\n prop1: [\n {\n keyword: schemaKeywords.object,\n args: {\n properties: {\n prop2: [\n {\n keyword: schemaKeywords.schema,\n args: { format: 'string', type: 'string' },\n },\n {\n keyword: schemaKeywords.enum,\n args: {\n name: 'enum',\n typeName: 'Enum',\n asConst: false,\n items: [\n { name: 'A', value: 'A', format: schemaKeywords.string },\n { name: 'B', value: 'B', format: schemaKeywords.string },\n ],\n },\n },\n ],\n },\n additionalProperties: [],\n },\n },\n ],\n },\n additionalProperties: [],\n },\n },\n },\n {\n name: 'objectArrayObject',\n schema: {\n keyword: schemaKeywords.object,\n args: {\n properties: {\n ids: [\n {\n keyword: schemaKeywords.array,\n args: {\n items: [\n {\n keyword: schemaKeywords.object,\n args: {\n properties: {\n enum: [\n {\n keyword: schemaKeywords.schema,\n args: {\n format: 'string',\n type: 'string',\n },\n },\n {\n keyword: schemaKeywords.enum,\n args: {\n name: 'enum',\n typeName: 'Enum',\n asConst: false,\n items: [\n { name: 'A', value: 'A', format: schemaKeywords.string },\n { name: 'B', value: 'B', format: schemaKeywords.string },\n { name: 'C', value: 'C', format: schemaKeywords.string },\n { name: 2, value: 2, format: schemaKeywords.number },\n ],\n },\n },\n ],\n },\n additionalProperties: [],\n },\n },\n ],\n min: 3,\n max: 10,\n },\n },\n ],\n },\n additionalProperties: [],\n },\n },\n },\n {\n name: 'objectEmpty',\n schema: {\n keyword: schemaKeywords.object,\n args: {\n properties: {},\n additionalProperties: [],\n },\n },\n },\n {\n name: 'default',\n schema: {\n keyword: schemaKeywords.default,\n },\n },\n {\n name: 'default',\n schema: {\n keyword: schemaKeywords.default,\n args: 'default',\n },\n },\n {\n name: 'blob',\n schema: {\n keyword: schemaKeywords.blob,\n },\n },\n {\n name: 'nullableAdditionalProperties',\n schema: {\n keyword: schemaKeywords.object,\n args: {\n properties: {},\n additionalProperties: [\n {\n keyword: schemaKeywords.string,\n },\n {\n args: {\n format: undefined,\n type: schemaKeywords.string,\n },\n keyword: schemaKeywords.schema,\n },\n {\n keyword: schemaKeywords.nullable,\n },\n ],\n },\n },\n },\n]\n\nconst full: Array<{ name: string; schema: Schema[] }> = [\n {\n name: 'Upload',\n schema: [\n {\n keyword: schemaKeywords.blob,\n },\n ],\n },\n {\n name: 'PageSizeNumber',\n schema: [\n {\n keyword: schemaKeywords.number,\n },\n {\n keyword: schemaKeywords.default,\n args: 10,\n },\n ],\n },\n {\n name: 'PageSizeInteger',\n schema: [\n {\n keyword: schemaKeywords.integer,\n },\n {\n keyword: schemaKeywords.default,\n args: 10,\n },\n ],\n },\n {\n name: 'Object',\n schema: [\n { keyword: schemaKeywords.nullable },\n { keyword: schemaKeywords.describe, args: 'Your address' },\n {\n keyword: schemaKeywords.object,\n args: {\n properties: {\n firstName: [\n { keyword: schemaKeywords.deprecated },\n { keyword: schemaKeywords.default, args: 'test' },\n {\n keyword: schemaKeywords.min,\n args: 2,\n },\n {\n keyword: schemaKeywords.string,\n },\n ],\n age: [\n { keyword: schemaKeywords.example, args: '2' },\n { keyword: schemaKeywords.default, args: 2 },\n {\n keyword: schemaKeywords.min,\n args: 2,\n },\n {\n keyword: schemaKeywords.number,\n },\n ],\n address: [\n {\n keyword: schemaKeywords.and,\n args: [\n { keyword: schemaKeywords.string },\n {\n keyword: schemaKeywords.object,\n args: {\n properties: {\n street: [{ keyword: schemaKeywords.string }],\n city: [{ keyword: schemaKeywords.string }],\n },\n additionalProperties: [],\n },\n },\n ],\n },\n { keyword: schemaKeywords.nullable },\n { keyword: schemaKeywords.describe, args: 'Your address' },\n ],\n },\n additionalProperties: [],\n },\n },\n ],\n },\n {\n name: 'Order',\n schema: [\n {\n keyword: schemaKeywords.schema,\n args: {\n type: 'object',\n },\n },\n {\n keyword: schemaKeywords.object,\n args: {\n properties: {\n status: [\n {\n keyword: schemaKeywords.enum,\n args: {\n name: 'orderStatus',\n asConst: false,\n typeName: 'OrderStatus',\n items: [\n { name: 'Placed', value: 'placed', format: 'string' },\n { name: 'Approved', value: 'approved', format: 'string' },\n ],\n },\n },\n ],\n },\n additionalProperties: [],\n },\n },\n ],\n },\n {\n name: 'nullableAdditionalProperties',\n schema: [\n {\n keyword: schemaKeywords.object,\n args: {\n properties: {},\n additionalProperties: [\n {\n keyword: schemaKeywords.string,\n },\n {\n args: {\n format: undefined,\n type: schemaKeywords.string,\n },\n keyword: schemaKeywords.schema,\n },\n {\n keyword: schemaKeywords.number,\n },\n ],\n },\n },\n ],\n },\n {\n name: 'Record',\n schema: [\n {\n keyword: schemaKeywords.object,\n args: {\n properties: {},\n additionalProperties: [\n {\n keyword: schemaKeywords.integer,\n },\n {\n keyword: schemaKeywords.schema,\n args: {\n type: 'integer',\n format: 'int32',\n },\n },\n {\n keyword: schemaKeywords.optional,\n },\n ],\n },\n },\n {\n keyword: schemaKeywords.schema,\n args: {\n type: 'integer',\n format: 'int32',\n },\n },\n {\n keyword: schemaKeywords.optional,\n },\n ],\n },\n]\n\nexport const schemas = {\n basic,\n full,\n}\n"],"mappings":";;;AAEA,MAAMA,QAAiD;CACrD;EACE,MAAM;EACN,QAAQ,EACN,SAASC,oCAAe,KACzB;EACF;CACD;EACE,MAAM;EACN,QAAQ,EACN,SAASA,oCAAe,SACzB;EACF;CACD;EACE,MAAM;EACN,QAAQ,EACN,SAASA,oCAAe,QACzB;EACF;CACD;EACE,MAAM;EACN,QAAQ,EACN,SAASA,oCAAe,QACzB;EACF;CACD;EACE,MAAM;EACN,QAAQ,EACN,SAASA,oCAAe,SACzB;EACF;CACD;EACE,MAAM;EACN,QAAQ,EACN,SAASA,oCAAe,SACzB;EACF;CACD;EACE,MAAM;EACN,QAAQ;GACN,SAASA,oCAAe;GACxB,MAAM,EACJ,MAAM,QACP;GACF;EACF;CACD;EACE,MAAM;EACN,QAAQ;GACN,SAASA,oCAAe;GACxB,MAAM,EACJ,MAAM,UACP;GACF;EACF;CACD;EACE,MAAM;EACN,QAAQ;GACN,SAASA,oCAAe;GACxB,MAAM,EACJ,MAAM,UACP;GACF;EACF;CACD;EACE,MAAM;EACN,QAAQ;GACN,SAASA,oCAAe;GACxB,MAAM,EACJ,QAAQ,MACT;GACF;EACF;CACD;EACE,MAAM;EACN,QAAQ;GACN,SAASA,oCAAe;GACxB,MAAM,EACJ,OAAO,MACR;GACF;EACF;CACD;EACE,MAAM;EACN,QAAQ;GACN,SAASA,oCAAe;GACxB,MAAM,EACJ,QAAQ,OACT;GACF;EACF;CACD;EACE,MAAM;EACN,QAAQ,EACN,SAASA,oCAAe,UACzB;EACF;CACD;EACE,MAAM;EACN,QAAQ,EACN,SAASA,oCAAe,WACzB;EACF;CACD;EACE,MAAM;EACN,QAAQ;GACN,SAASA,oCAAe;GACxB,MAAM;GACP;EACF;CACD;EACE,MAAM;EACN,QAAQ;GACN,SAASA,oCAAe;GACxB,MAAM;GACP;EACF;CACD;EACE,MAAM;EACN,QAAQ;GACN,SAASA,oCAAe;GACxB,MAAM;GACP;EACF;CACD;EACE,MAAM;EACN,QAAQ;GACN,SAASA,oCAAe;GACxB,MAAM;GACP;EACF;CACD;EACE,MAAM;EACN,QAAQ;GACN,SAASA,oCAAe;GACxB,MAAM;IACJ,MAAM;IACN,OAAO;IACP,QAAQA,oCAAe;IACxB;GACF;EACF;CACD;EACE,MAAM;EACN,QAAQ;GACN,SAASA,oCAAe;GACxB,MAAM;IACJ,MAAM;IACN,MAAM;IACN,MAAM;IACN,cAAc;IACf;GACF;EACF;C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;YAAK,OAAO;YAAK,QAAQA,oCAAe;YAAQ;WACxD;YAAE,MAAM;YAAK,OAAO;YAAK,QAAQA,oCAAe;YAAQ;WACxD;YAAE,MAAM;YAAK,OAAO;YAAK,QAAQA,oCAAe;YAAQ;WACxD;YAAE,MAAM;YAAG,OAAO;YAAG,QAAQA,oCAAe;YAAQ;WACrD;UACF;SACF,CACF,EACF;QACD,sBAAsB,EAAE;QACzB;OACF,CACF;MACD,KAAK;MACL,KAAK;MACN;KACF,CACF,EACF;IACD,sBAAsB,EAAE;IACzB;GACF;EACF;CACD;EACE,MAAM;EACN,QAAQ;GACN,SAASA,oCAAe;GACxB,MAAM;IACJ,YAAY,EAAE;IACd,sBAAsB,EAAE;IACzB;GACF;EACF;CACD;EACE,MAAM;EACN,QAAQ,EACN,SAASA,oCAAe,SACzB;EACF;CACD;EACE,MAAM;EACN,QAAQ;GACN,SAASA,oCAAe;GACxB,MAAM;GACP;EACF;CACD;EACE,MAAM;EACN,QAAQ,EACN,SAASA,oCAAe,MACzB;EACF;CACD;EACE,MAAM;EACN,QAAQ;GACN,SAASA,oCAAe;GACxB,MAAM;IACJ,YAAY,EAAE;IACd,sBAAsB;KACpB,EACE,SAASA,oCAAe,QACzB;KACD;MACE,MAAM;OACJ,QAAQ;OACR,MAAMA,oCAAe;OACtB;MACD,SAASA,oCAAe;MACzB;KACD,EACE,SAASA,oCAAe,UACzB;KACF;IACF;GACF;EACF;CACF;AAED,MAAMC,OAAkD;CACtD;EACE,MAAM;EACN,QAAQ,CACN,EACE,SAASD,oCAAe,MACzB,CACF;EACF;CACD;EACE,MAAM;EACN,QAAQ,CACN,EACE,SAASA,oCAAe,QACzB,EACD;GACE,SAASA,oCAAe;GACxB,MAAM;GACP,CACF;EACF;CACD;EACE,MAAM;EACN,QAAQ,CACN,EACE,SAASA,oCAAe,SACzB,EACD;GACE,SAASA,oCAAe;GACxB,MAAM;GACP,CACF;EACF;CACD;EACE,MAAM;EACN,QAAQ;GACN,EAAE,SAAS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ACD;EACE,MAAM;EACN,QAAQ,CACN;GACE,SAASA,oCAAe;GACxB,MAAM;IACJ,YAAY,EAAE;IACd,sBAAsB;KACpB,EACE,SAASA,oCAAe,QACzB;KACD;MACE,MAAM;OACJ,QAAQ;OACR,MAAMA,oCAAe;OACtB;MACD,SAASA,oCAAe;MACzB;KACD,EACE,SAASA,oCAAe,QACzB;KACF;IACF;GACF,CACF;EACF;CACD;EACE,MAAM;EACN,QAAQ;GACN;IACE,SAASA,oCAAe;IACxB,MAAM;KACJ,YAAY,EAAE;KACd,sBAAsB;MACpB,EACE,SAASA,oCAAe,SACzB;MACD;OACE,SAASA,oCAAe;OACxB,MAAM;QACJ,MAAM;QACN,QAAQ;QACT;OACF;MACD,EACE,SAASA,oCAAe,UACzB;MACF;KACF;IACF;GACD;IACE,SAASA,oCAAe;IACxB,MAAM;KACJ,MAAM;KACN,QAAQ;KACT;IACF;GACD,EACE,SAASA,oCAAe,UACzB;GACF;EACF;CACF;AAED,MAAa,UAAU;CACrB;CACA;CACD"}
package/dist/mocks.js CHANGED
@@ -297,7 +297,19 @@ const basic = [
297
297
  name: "and",
298
298
  schema: {
299
299
  keyword: schemaKeywords.and,
300
- args: [{ keyword: schemaKeywords.string }, { keyword: schemaKeywords.number }]
300
+ args: [{
301
+ keyword: schemaKeywords.object,
302
+ args: {
303
+ properties: { street: [{ keyword: schemaKeywords.string }] },
304
+ additionalProperties: []
305
+ }
306
+ }, {
307
+ keyword: schemaKeywords.object,
308
+ args: {
309
+ properties: { city: [{ keyword: schemaKeywords.string }] },
310
+ additionalProperties: []
311
+ }
312
+ }]
301
313
  }
302
314
  },
303
315
  {
@@ -433,7 +445,19 @@ const basic = [
433
445
  address: [
434
446
  {
435
447
  keyword: schemaKeywords.and,
436
- args: [{ keyword: schemaKeywords.string }, { keyword: schemaKeywords.number }]
448
+ args: [{
449
+ keyword: schemaKeywords.object,
450
+ args: {
451
+ properties: { street: [{ keyword: schemaKeywords.string }] },
452
+ additionalProperties: []
453
+ }
454
+ }, {
455
+ keyword: schemaKeywords.object,
456
+ args: {
457
+ properties: { city: [{ keyword: schemaKeywords.string }] },
458
+ additionalProperties: []
459
+ }
460
+ }]
437
461
  },
438
462
  { keyword: schemaKeywords.nullable },
439
463
  {
@@ -705,7 +729,16 @@ const full = [
705
729
  address: [
706
730
  {
707
731
  keyword: schemaKeywords.and,
708
- args: [{ keyword: schemaKeywords.string }, { keyword: schemaKeywords.number }]
732
+ args: [{ keyword: schemaKeywords.string }, {
733
+ keyword: schemaKeywords.object,
734
+ args: {
735
+ properties: {
736
+ street: [{ keyword: schemaKeywords.string }],
737
+ city: [{ keyword: schemaKeywords.string }]
738
+ },
739
+ additionalProperties: []
740
+ }
741
+ }]
709
742
  },
710
743
  { keyword: schemaKeywords.nullable },
711
744
  {
package/dist/mocks.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"mocks.js","names":["basic: Array<{ name: string; schema: Schema }>","full: Array<{ name: string; schema: Schema[] }>"],"sources":["../src/mocks/schemas.ts"],"sourcesContent":["import { type Schema, schemaKeywords } from '../SchemaMapper'\n\nconst basic: Array<{ name: string; schema: Schema }> = [\n {\n name: 'any',\n schema: {\n keyword: schemaKeywords.any,\n },\n },\n {\n name: 'unknown',\n schema: {\n keyword: schemaKeywords.unknown,\n },\n },\n {\n name: 'string',\n schema: {\n keyword: schemaKeywords.string,\n },\n },\n {\n name: 'number',\n schema: {\n keyword: schemaKeywords.number,\n },\n },\n {\n name: 'integer',\n schema: {\n keyword: schemaKeywords.integer,\n },\n },\n {\n name: 'boolean',\n schema: {\n keyword: schemaKeywords.boolean,\n },\n },\n {\n name: 'primitiveDate',\n schema: {\n keyword: schemaKeywords.date,\n args: {\n type: 'date',\n },\n },\n },\n {\n name: 'date',\n schema: {\n keyword: schemaKeywords.date,\n args: {\n type: 'string',\n },\n },\n },\n {\n name: 'time',\n schema: {\n keyword: schemaKeywords.time,\n args: {\n type: 'string',\n },\n },\n },\n {\n name: 'stringOffset',\n schema: {\n keyword: schemaKeywords.datetime,\n args: {\n offset: true,\n },\n },\n },\n {\n name: 'stringLocal',\n schema: {\n keyword: schemaKeywords.datetime,\n args: {\n local: true,\n },\n },\n },\n {\n name: 'datetime',\n schema: {\n keyword: schemaKeywords.datetime,\n args: {\n offset: false,\n },\n },\n },\n {\n name: 'nullable',\n schema: {\n keyword: schemaKeywords.nullable,\n },\n },\n {\n name: 'undefined',\n schema: {\n keyword: schemaKeywords.undefined,\n },\n },\n {\n name: 'min',\n schema: {\n keyword: schemaKeywords.min,\n args: 2,\n },\n },\n {\n name: 'max',\n schema: {\n keyword: schemaKeywords.max,\n args: 2,\n },\n },\n {\n name: 'matchesReg',\n schema: {\n keyword: schemaKeywords.matches,\n args: '/node_modules/', // pure regexp\n },\n },\n {\n name: 'matches',\n schema: {\n keyword: schemaKeywords.matches,\n args: '^[A-Z]{2}$',\n },\n },\n {\n name: 'const',\n schema: {\n keyword: schemaKeywords.const,\n args: {\n name: '',\n value: '',\n format: schemaKeywords.string,\n },\n },\n },\n {\n name: 'ref',\n schema: {\n keyword: schemaKeywords.ref,\n args: {\n $ref: '$ref',\n name: 'Pet',\n path: './pet.ts',\n isImportable: true,\n },\n },\n },\n {\n name: 'enum',\n schema: {\n keyword: schemaKeywords.enum,\n args: {\n name: 'enum',\n typeName: 'Enum',\n asConst: false,\n items: [\n { name: 'A', value: 'A', format: schemaKeywords.string },\n { name: 'B', value: 'B', format: schemaKeywords.string },\n { name: 'C', value: 'C', format: schemaKeywords.string },\n { name: 2, value: 2, format: schemaKeywords.number },\n ],\n },\n },\n },\n {\n name: 'enumLiteralBoolean',\n schema: {\n keyword: schemaKeywords.enum,\n args: {\n asConst: true,\n items: [\n {\n format: 'boolean',\n name: 'true',\n value: true,\n },\n {\n format: 'boolean',\n name: 'false',\n value: false,\n },\n ],\n name: 'PetEnumLiteral',\n typeName: 'PetEnumLiteral',\n },\n },\n },\n {\n name: 'tuple',\n schema: {\n keyword: schemaKeywords.tuple,\n args: {\n items: [],\n },\n },\n },\n {\n name: 'tupleMulti',\n schema: {\n keyword: schemaKeywords.tuple,\n args: {\n items: [{ keyword: schemaKeywords.string }, { keyword: schemaKeywords.number }],\n },\n },\n },\n {\n name: 'array',\n schema: {\n keyword: schemaKeywords.array,\n args: {\n items: [\n {\n keyword: schemaKeywords.union,\n args: [{ keyword: schemaKeywords.number }, { keyword: schemaKeywords.string }],\n },\n ],\n },\n },\n },\n {\n name: 'arrayEmpty',\n schema: {\n keyword: schemaKeywords.array,\n args: {\n items: [],\n },\n },\n },\n {\n name: 'arrayRef',\n schema: {\n keyword: schemaKeywords.array,\n args: {\n items: [\n {\n keyword: schemaKeywords.ref,\n\n args: { name: 'Pet', $ref: '#component/schema/Pet', path: './pet.ts', isImportable: true },\n },\n ],\n },\n },\n },\n {\n name: 'arrayAdvanced',\n schema: {\n keyword: schemaKeywords.array,\n args: {\n items: [{ keyword: schemaKeywords.min, args: 1 }, { keyword: schemaKeywords.max, args: 10 }, { keyword: schemaKeywords.number }],\n min: 3,\n max: 10,\n },\n },\n },\n {\n name: 'arrayRegex',\n schema: {\n keyword: schemaKeywords.array,\n args: {\n items: [{ keyword: schemaKeywords.matches, args: '^[a-zA-Z0-9]{1,13}$' }],\n min: 3,\n max: 10,\n },\n },\n },\n {\n name: 'union',\n schema: {\n keyword: schemaKeywords.union,\n args: [{ keyword: schemaKeywords.string }, { keyword: schemaKeywords.number }],\n },\n },\n {\n name: 'unionOne',\n schema: {\n keyword: schemaKeywords.union,\n args: [{ keyword: schemaKeywords.string }],\n },\n },\n {\n name: 'catchall',\n schema: {\n keyword: schemaKeywords.object,\n args: {\n properties: {},\n additionalProperties: [\n {\n keyword: schemaKeywords.ref,\n args: { name: 'Pet', $ref: '#component/schema/Pet', path: './Pet.ts', isImportable: true },\n },\n ],\n },\n },\n },\n {\n name: 'and',\n schema: {\n keyword: schemaKeywords.and,\n args: [{ keyword: schemaKeywords.string }, { keyword: schemaKeywords.number }],\n },\n },\n {\n name: 'object',\n schema: {\n keyword: schemaKeywords.object,\n args: {\n properties: {\n firstName: [{ keyword: schemaKeywords.string }, { keyword: schemaKeywords.min, args: 2 }],\n address: [{ keyword: schemaKeywords.string }, { keyword: schemaKeywords.nullable }, { keyword: schemaKeywords.describe, args: '\"Your address\"' }],\n },\n additionalProperties: [],\n },\n },\n },\n {\n name: 'objectOptional',\n schema: {\n keyword: schemaKeywords.object,\n args: {\n properties: {\n firstName: [{ keyword: schemaKeywords.string }, { keyword: schemaKeywords.optional }, { keyword: schemaKeywords.min, args: 2 }],\n address: [{ keyword: schemaKeywords.string }, { keyword: schemaKeywords.nullable }, { keyword: schemaKeywords.describe, args: '\"Your address\"' }],\n },\n additionalProperties: [],\n },\n },\n },\n {\n name: 'objectArray',\n schema: {\n keyword: schemaKeywords.object,\n args: {\n properties: {\n ids: [\n {\n keyword: schemaKeywords.array,\n args: {\n items: [{ keyword: schemaKeywords.matches, args: '^[a-zA-Z0-9]{1,13}$' }],\n min: 3,\n max: 10,\n },\n },\n ],\n },\n additionalProperties: [],\n },\n },\n },\n {\n name: 'objectDates',\n schema: {\n keyword: schemaKeywords.object,\n args: {\n properties: {\n dateTime: [{ keyword: schemaKeywords.datetime, args: { offset: true } }],\n date: [{ keyword: schemaKeywords.date, args: { type: 'string' } }],\n time: [{ keyword: schemaKeywords.time, args: { type: 'string' } }],\n nativeDate: [{ keyword: schemaKeywords.date, args: { type: 'date' } }],\n },\n additionalProperties: [],\n },\n },\n },\n {\n name: 'objectAnd',\n schema: {\n keyword: schemaKeywords.object,\n args: {\n properties: {\n firstName: [\n { keyword: schemaKeywords.deprecated },\n { keyword: schemaKeywords.default, args: 'test' },\n {\n keyword: schemaKeywords.min,\n args: 2,\n },\n {\n keyword: schemaKeywords.string,\n },\n ],\n age: [\n { keyword: schemaKeywords.example, args: '2' },\n { keyword: schemaKeywords.default, args: 2 },\n {\n keyword: schemaKeywords.min,\n args: 3,\n },\n {\n keyword: schemaKeywords.number,\n },\n ],\n address: [\n {\n keyword: schemaKeywords.and,\n args: [{ keyword: schemaKeywords.string }, { keyword: schemaKeywords.number }],\n },\n { keyword: schemaKeywords.nullable },\n { keyword: schemaKeywords.describe, args: 'Your address' },\n ],\n },\n additionalProperties: [],\n },\n },\n },\n {\n name: 'objectEnum',\n schema: {\n keyword: schemaKeywords.object,\n args: {\n properties: {\n version: [\n {\n keyword: schemaKeywords.schema,\n args: {\n format: 'string',\n type: 'string',\n },\n },\n {\n keyword: schemaKeywords.enum,\n args: {\n name: 'enum',\n typeName: 'Enum',\n asConst: false,\n items: [\n { name: 'A', value: 'A', format: schemaKeywords.string },\n { name: 'B', value: 'B', format: schemaKeywords.string },\n { name: 'C', value: 'C', format: schemaKeywords.string },\n { name: 2, value: 2, format: schemaKeywords.number },\n ],\n },\n },\n {\n keyword: schemaKeywords.min,\n args: 4,\n },\n { keyword: schemaKeywords.describe, args: 'Your address' },\n ],\n },\n additionalProperties: [],\n },\n },\n },\n {\n name: 'objectObjectEnum',\n schema: {\n keyword: schemaKeywords.object,\n args: {\n properties: {\n prop1: [\n {\n keyword: schemaKeywords.object,\n args: {\n properties: {\n prop2: [\n {\n keyword: schemaKeywords.schema,\n args: { format: 'string', type: 'string' },\n },\n {\n keyword: schemaKeywords.enum,\n args: {\n name: 'enum',\n typeName: 'Enum',\n asConst: false,\n items: [\n { name: 'A', value: 'A', format: schemaKeywords.string },\n { name: 'B', value: 'B', format: schemaKeywords.string },\n ],\n },\n },\n ],\n },\n additionalProperties: [],\n },\n },\n ],\n },\n additionalProperties: [],\n },\n },\n },\n {\n name: 'objectArrayObject',\n schema: {\n keyword: schemaKeywords.object,\n args: {\n properties: {\n ids: [\n {\n keyword: schemaKeywords.array,\n args: {\n items: [\n {\n keyword: schemaKeywords.object,\n args: {\n properties: {\n enum: [\n {\n keyword: schemaKeywords.schema,\n args: {\n format: 'string',\n type: 'string',\n },\n },\n {\n keyword: schemaKeywords.enum,\n args: {\n name: 'enum',\n typeName: 'Enum',\n asConst: false,\n items: [\n { name: 'A', value: 'A', format: schemaKeywords.string },\n { name: 'B', value: 'B', format: schemaKeywords.string },\n { name: 'C', value: 'C', format: schemaKeywords.string },\n { name: 2, value: 2, format: schemaKeywords.number },\n ],\n },\n },\n ],\n },\n additionalProperties: [],\n },\n },\n ],\n min: 3,\n max: 10,\n },\n },\n ],\n },\n additionalProperties: [],\n },\n },\n },\n {\n name: 'objectEmpty',\n schema: {\n keyword: schemaKeywords.object,\n args: {\n properties: {},\n additionalProperties: [],\n },\n },\n },\n {\n name: 'default',\n schema: {\n keyword: schemaKeywords.default,\n },\n },\n {\n name: 'default',\n schema: {\n keyword: schemaKeywords.default,\n args: 'default',\n },\n },\n {\n name: 'blob',\n schema: {\n keyword: schemaKeywords.blob,\n },\n },\n {\n name: 'nullableAdditionalProperties',\n schema: {\n keyword: schemaKeywords.object,\n args: {\n properties: {},\n additionalProperties: [\n {\n keyword: schemaKeywords.string,\n },\n {\n args: {\n format: undefined,\n type: schemaKeywords.string,\n },\n keyword: schemaKeywords.schema,\n },\n {\n keyword: schemaKeywords.nullable,\n },\n ],\n },\n },\n },\n]\n\nconst full: Array<{ name: string; schema: Schema[] }> = [\n {\n name: 'Upload',\n schema: [\n {\n keyword: schemaKeywords.blob,\n },\n ],\n },\n {\n name: 'PageSizeNumber',\n schema: [\n {\n keyword: schemaKeywords.number,\n },\n {\n keyword: schemaKeywords.default,\n args: 10,\n },\n ],\n },\n {\n name: 'PageSizeInteger',\n schema: [\n {\n keyword: schemaKeywords.integer,\n },\n {\n keyword: schemaKeywords.default,\n args: 10,\n },\n ],\n },\n {\n name: 'Object',\n schema: [\n { keyword: schemaKeywords.nullable },\n { keyword: schemaKeywords.describe, args: 'Your address' },\n {\n keyword: schemaKeywords.object,\n args: {\n properties: {\n firstName: [\n { keyword: schemaKeywords.deprecated },\n { keyword: schemaKeywords.default, args: 'test' },\n {\n keyword: schemaKeywords.min,\n args: 2,\n },\n {\n keyword: schemaKeywords.string,\n },\n ],\n age: [\n { keyword: schemaKeywords.example, args: '2' },\n { keyword: schemaKeywords.default, args: 2 },\n {\n keyword: schemaKeywords.min,\n args: 2,\n },\n {\n keyword: schemaKeywords.number,\n },\n ],\n address: [\n {\n keyword: schemaKeywords.and,\n args: [{ keyword: schemaKeywords.string }, { keyword: schemaKeywords.number }],\n },\n { keyword: schemaKeywords.nullable },\n { keyword: schemaKeywords.describe, args: 'Your address' },\n ],\n },\n additionalProperties: [],\n },\n },\n ],\n },\n {\n name: 'Order',\n schema: [\n {\n keyword: schemaKeywords.schema,\n args: {\n type: 'object',\n },\n },\n {\n keyword: schemaKeywords.object,\n args: {\n properties: {\n status: [\n {\n keyword: schemaKeywords.enum,\n args: {\n name: 'orderStatus',\n asConst: false,\n typeName: 'OrderStatus',\n items: [\n { name: 'Placed', value: 'placed', format: 'string' },\n { name: 'Approved', value: 'approved', format: 'string' },\n ],\n },\n },\n ],\n },\n additionalProperties: [],\n },\n },\n ],\n },\n {\n name: 'nullableAdditionalProperties',\n schema: [\n {\n keyword: schemaKeywords.object,\n args: {\n properties: {},\n additionalProperties: [\n {\n keyword: schemaKeywords.string,\n },\n {\n args: {\n format: undefined,\n type: schemaKeywords.string,\n },\n keyword: schemaKeywords.schema,\n },\n {\n keyword: schemaKeywords.number,\n },\n ],\n },\n },\n ],\n },\n {\n name: 'Record',\n schema: [\n {\n keyword: schemaKeywords.object,\n args: {\n properties: {},\n additionalProperties: [\n {\n keyword: schemaKeywords.integer,\n },\n {\n keyword: schemaKeywords.schema,\n args: {\n type: 'integer',\n format: 'int32',\n },\n },\n {\n keyword: schemaKeywords.optional,\n },\n ],\n },\n },\n {\n keyword: schemaKeywords.schema,\n args: {\n type: 'integer',\n format: 'int32',\n },\n },\n {\n keyword: schemaKeywords.optional,\n },\n ],\n },\n]\n\nexport const schemas = {\n basic,\n full,\n}\n"],"mappings":";;;AAEA,MAAMA,QAAiD;CACrD;EACE,MAAM;EACN,QAAQ,EACN,SAAS,eAAe,KACzB;EACF;CACD;EACE,MAAM;EACN,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F;EACF;CACF;AAED,MAAa,UAAU;CACrB;CACA;CACD"}
1
+ {"version":3,"file":"mocks.js","names":["basic: Array<{ name: string; schema: Schema }>","full: Array<{ name: string; schema: Schema[] }>"],"sources":["../src/mocks/schemas.ts"],"sourcesContent":["import { type Schema, schemaKeywords } from '../SchemaMapper'\n\nconst basic: Array<{ name: string; schema: Schema }> = [\n {\n name: 'any',\n schema: {\n keyword: schemaKeywords.any,\n },\n },\n {\n name: 'unknown',\n schema: {\n keyword: schemaKeywords.unknown,\n },\n },\n {\n name: 'string',\n schema: {\n keyword: schemaKeywords.string,\n },\n },\n {\n name: 'number',\n schema: {\n keyword: schemaKeywords.number,\n },\n },\n {\n name: 'integer',\n schema: {\n keyword: schemaKeywords.integer,\n },\n },\n {\n name: 'boolean',\n schema: {\n keyword: schemaKeywords.boolean,\n },\n },\n {\n name: 'primitiveDate',\n schema: {\n keyword: schemaKeywords.date,\n args: {\n type: 'date',\n },\n },\n },\n {\n name: 'date',\n schema: {\n keyword: schemaKeywords.date,\n args: {\n type: 'string',\n },\n },\n },\n {\n name: 'time',\n schema: {\n keyword: schemaKeywords.time,\n args: {\n type: 'string',\n },\n },\n },\n {\n name: 'stringOffset',\n schema: {\n keyword: schemaKeywords.datetime,\n args: {\n offset: true,\n },\n },\n },\n {\n name: 'stringLocal',\n schema: {\n keyword: schemaKeywords.datetime,\n args: {\n local: true,\n },\n },\n },\n {\n name: 'datetime',\n schema: {\n keyword: schemaKeywords.datetime,\n args: {\n offset: false,\n },\n },\n },\n {\n name: 'nullable',\n schema: {\n keyword: schemaKeywords.nullable,\n },\n },\n {\n name: 'undefined',\n schema: {\n keyword: schemaKeywords.undefined,\n },\n },\n {\n name: 'min',\n schema: {\n keyword: schemaKeywords.min,\n args: 2,\n },\n },\n {\n name: 'max',\n schema: {\n keyword: schemaKeywords.max,\n args: 2,\n },\n },\n {\n name: 'matchesReg',\n schema: {\n keyword: schemaKeywords.matches,\n args: '/node_modules/', // pure regexp\n },\n },\n {\n name: 'matches',\n schema: {\n keyword: schemaKeywords.matches,\n args: '^[A-Z]{2}$',\n },\n },\n {\n name: 'const',\n schema: {\n keyword: schemaKeywords.const,\n args: {\n name: '',\n value: '',\n format: schemaKeywords.string,\n },\n },\n },\n {\n name: 'ref',\n schema: {\n keyword: schemaKeywords.ref,\n args: {\n $ref: '$ref',\n name: 'Pet',\n path: './pet.ts',\n isImportable: true,\n },\n },\n },\n {\n name: 'enum',\n schema: {\n keyword: schemaKeywords.enum,\n args: {\n name: 'enum',\n typeName: 'Enum',\n asConst: false,\n items: [\n { name: 'A', value: 'A', format: schemaKeywords.string },\n { name: 'B', value: 'B', format: schemaKeywords.string },\n { name: 'C', value: 'C', format: schemaKeywords.string },\n { name: 2, value: 2, format: schemaKeywords.number },\n ],\n },\n },\n },\n {\n name: 'enumLiteralBoolean',\n schema: {\n keyword: schemaKeywords.enum,\n args: {\n asConst: true,\n items: [\n {\n format: 'boolean',\n name: 'true',\n value: true,\n },\n {\n format: 'boolean',\n name: 'false',\n value: false,\n },\n ],\n name: 'PetEnumLiteral',\n typeName: 'PetEnumLiteral',\n },\n },\n },\n {\n name: 'tuple',\n schema: {\n keyword: schemaKeywords.tuple,\n args: {\n items: [],\n },\n },\n },\n {\n name: 'tupleMulti',\n schema: {\n keyword: schemaKeywords.tuple,\n args: {\n items: [{ keyword: schemaKeywords.string }, { keyword: schemaKeywords.number }],\n },\n },\n },\n {\n name: 'array',\n schema: {\n keyword: schemaKeywords.array,\n args: {\n items: [\n {\n keyword: schemaKeywords.union,\n args: [{ keyword: schemaKeywords.number }, { keyword: schemaKeywords.string }],\n },\n ],\n },\n },\n },\n {\n name: 'arrayEmpty',\n schema: {\n keyword: schemaKeywords.array,\n args: {\n items: [],\n },\n },\n },\n {\n name: 'arrayRef',\n schema: {\n keyword: schemaKeywords.array,\n args: {\n items: [\n {\n keyword: schemaKeywords.ref,\n\n args: { name: 'Pet', $ref: '#component/schema/Pet', path: './pet.ts', isImportable: true },\n },\n ],\n },\n },\n },\n {\n name: 'arrayAdvanced',\n schema: {\n keyword: schemaKeywords.array,\n args: {\n items: [{ keyword: schemaKeywords.min, args: 1 }, { keyword: schemaKeywords.max, args: 10 }, { keyword: schemaKeywords.number }],\n min: 3,\n max: 10,\n },\n },\n },\n {\n name: 'arrayRegex',\n schema: {\n keyword: schemaKeywords.array,\n args: {\n items: [{ keyword: schemaKeywords.matches, args: '^[a-zA-Z0-9]{1,13}$' }],\n min: 3,\n max: 10,\n },\n },\n },\n {\n name: 'union',\n schema: {\n keyword: schemaKeywords.union,\n args: [{ keyword: schemaKeywords.string }, { keyword: schemaKeywords.number }],\n },\n },\n {\n name: 'unionOne',\n schema: {\n keyword: schemaKeywords.union,\n args: [{ keyword: schemaKeywords.string }],\n },\n },\n {\n name: 'catchall',\n schema: {\n keyword: schemaKeywords.object,\n args: {\n properties: {},\n additionalProperties: [\n {\n keyword: schemaKeywords.ref,\n args: { name: 'Pet', $ref: '#component/schema/Pet', path: './Pet.ts', isImportable: true },\n },\n ],\n },\n },\n },\n {\n name: 'and',\n schema: {\n keyword: schemaKeywords.and,\n args: [\n {\n keyword: schemaKeywords.object,\n args: {\n properties: {\n street: [{ keyword: schemaKeywords.string }],\n },\n additionalProperties: [],\n },\n },\n {\n keyword: schemaKeywords.object,\n args: {\n properties: {\n city: [{ keyword: schemaKeywords.string }],\n },\n additionalProperties: [],\n },\n },\n ],\n },\n },\n {\n name: 'object',\n schema: {\n keyword: schemaKeywords.object,\n args: {\n properties: {\n firstName: [{ keyword: schemaKeywords.string }, { keyword: schemaKeywords.min, args: 2 }],\n address: [{ keyword: schemaKeywords.string }, { keyword: schemaKeywords.nullable }, { keyword: schemaKeywords.describe, args: '\"Your address\"' }],\n },\n additionalProperties: [],\n },\n },\n },\n {\n name: 'objectOptional',\n schema: {\n keyword: schemaKeywords.object,\n args: {\n properties: {\n firstName: [{ keyword: schemaKeywords.string }, { keyword: schemaKeywords.optional }, { keyword: schemaKeywords.min, args: 2 }],\n address: [{ keyword: schemaKeywords.string }, { keyword: schemaKeywords.nullable }, { keyword: schemaKeywords.describe, args: '\"Your address\"' }],\n },\n additionalProperties: [],\n },\n },\n },\n {\n name: 'objectArray',\n schema: {\n keyword: schemaKeywords.object,\n args: {\n properties: {\n ids: [\n {\n keyword: schemaKeywords.array,\n args: {\n items: [{ keyword: schemaKeywords.matches, args: '^[a-zA-Z0-9]{1,13}$' }],\n min: 3,\n max: 10,\n },\n },\n ],\n },\n additionalProperties: [],\n },\n },\n },\n {\n name: 'objectDates',\n schema: {\n keyword: schemaKeywords.object,\n args: {\n properties: {\n dateTime: [{ keyword: schemaKeywords.datetime, args: { offset: true } }],\n date: [{ keyword: schemaKeywords.date, args: { type: 'string' } }],\n time: [{ keyword: schemaKeywords.time, args: { type: 'string' } }],\n nativeDate: [{ keyword: schemaKeywords.date, args: { type: 'date' } }],\n },\n additionalProperties: [],\n },\n },\n },\n {\n name: 'objectAnd',\n schema: {\n keyword: schemaKeywords.object,\n args: {\n properties: {\n firstName: [\n { keyword: schemaKeywords.deprecated },\n { keyword: schemaKeywords.default, args: 'test' },\n {\n keyword: schemaKeywords.min,\n args: 2,\n },\n {\n keyword: schemaKeywords.string,\n },\n ],\n age: [\n { keyword: schemaKeywords.example, args: '2' },\n { keyword: schemaKeywords.default, args: 2 },\n {\n keyword: schemaKeywords.min,\n args: 3,\n },\n {\n keyword: schemaKeywords.number,\n },\n ],\n address: [\n {\n keyword: schemaKeywords.and,\n args: [\n {\n keyword: schemaKeywords.object,\n args: {\n properties: {\n street: [{ keyword: schemaKeywords.string }],\n },\n additionalProperties: [],\n },\n },\n {\n keyword: schemaKeywords.object,\n args: {\n properties: {\n city: [{ keyword: schemaKeywords.string }],\n },\n additionalProperties: [],\n },\n },\n ],\n },\n { keyword: schemaKeywords.nullable },\n { keyword: schemaKeywords.describe, args: 'Your address' },\n ],\n },\n additionalProperties: [],\n },\n },\n },\n {\n name: 'objectEnum',\n schema: {\n keyword: schemaKeywords.object,\n args: {\n properties: {\n version: [\n {\n keyword: schemaKeywords.schema,\n args: {\n format: 'string',\n type: 'string',\n },\n },\n {\n keyword: schemaKeywords.enum,\n args: {\n name: 'enum',\n typeName: 'Enum',\n asConst: false,\n items: [\n { name: 'A', value: 'A', format: schemaKeywords.string },\n { name: 'B', value: 'B', format: schemaKeywords.string },\n { name: 'C', value: 'C', format: schemaKeywords.string },\n { name: 2, value: 2, format: schemaKeywords.number },\n ],\n },\n },\n {\n keyword: schemaKeywords.min,\n args: 4,\n },\n { keyword: schemaKeywords.describe, args: 'Your address' },\n ],\n },\n additionalProperties: [],\n },\n },\n },\n {\n name: 'objectObjectEnum',\n schema: {\n keyword: schemaKeywords.object,\n args: {\n properties: {\n prop1: [\n {\n keyword: schemaKeywords.object,\n args: {\n properties: {\n prop2: [\n {\n keyword: schemaKeywords.schema,\n args: { format: 'string', type: 'string' },\n },\n {\n keyword: schemaKeywords.enum,\n args: {\n name: 'enum',\n typeName: 'Enum',\n asConst: false,\n items: [\n { name: 'A', value: 'A', format: schemaKeywords.string },\n { name: 'B', value: 'B', format: schemaKeywords.string },\n ],\n },\n },\n ],\n },\n additionalProperties: [],\n },\n },\n ],\n },\n additionalProperties: [],\n },\n },\n },\n {\n name: 'objectArrayObject',\n schema: {\n keyword: schemaKeywords.object,\n args: {\n properties: {\n ids: [\n {\n keyword: schemaKeywords.array,\n args: {\n items: [\n {\n keyword: schemaKeywords.object,\n args: {\n properties: {\n enum: [\n {\n keyword: schemaKeywords.schema,\n args: {\n format: 'string',\n type: 'string',\n },\n },\n {\n keyword: schemaKeywords.enum,\n args: {\n name: 'enum',\n typeName: 'Enum',\n asConst: false,\n items: [\n { name: 'A', value: 'A', format: schemaKeywords.string },\n { name: 'B', value: 'B', format: schemaKeywords.string },\n { name: 'C', value: 'C', format: schemaKeywords.string },\n { name: 2, value: 2, format: schemaKeywords.number },\n ],\n },\n },\n ],\n },\n additionalProperties: [],\n },\n },\n ],\n min: 3,\n max: 10,\n },\n },\n ],\n },\n additionalProperties: [],\n },\n },\n },\n {\n name: 'objectEmpty',\n schema: {\n keyword: schemaKeywords.object,\n args: {\n properties: {},\n additionalProperties: [],\n },\n },\n },\n {\n name: 'default',\n schema: {\n keyword: schemaKeywords.default,\n },\n },\n {\n name: 'default',\n schema: {\n keyword: schemaKeywords.default,\n args: 'default',\n },\n },\n {\n name: 'blob',\n schema: {\n keyword: schemaKeywords.blob,\n },\n },\n {\n name: 'nullableAdditionalProperties',\n schema: {\n keyword: schemaKeywords.object,\n args: {\n properties: {},\n additionalProperties: [\n {\n keyword: schemaKeywords.string,\n },\n {\n args: {\n format: undefined,\n type: schemaKeywords.string,\n },\n keyword: schemaKeywords.schema,\n },\n {\n keyword: schemaKeywords.nullable,\n },\n ],\n },\n },\n },\n]\n\nconst full: Array<{ name: string; schema: Schema[] }> = [\n {\n name: 'Upload',\n schema: [\n {\n keyword: schemaKeywords.blob,\n },\n ],\n },\n {\n name: 'PageSizeNumber',\n schema: [\n {\n keyword: schemaKeywords.number,\n },\n {\n keyword: schemaKeywords.default,\n args: 10,\n },\n ],\n },\n {\n name: 'PageSizeInteger',\n schema: [\n {\n keyword: schemaKeywords.integer,\n },\n {\n keyword: schemaKeywords.default,\n args: 10,\n },\n ],\n },\n {\n name: 'Object',\n schema: [\n { keyword: schemaKeywords.nullable },\n { keyword: schemaKeywords.describe, args: 'Your address' },\n {\n keyword: schemaKeywords.object,\n args: {\n properties: {\n firstName: [\n { keyword: schemaKeywords.deprecated },\n { keyword: schemaKeywords.default, args: 'test' },\n {\n keyword: schemaKeywords.min,\n args: 2,\n },\n {\n keyword: schemaKeywords.string,\n },\n ],\n age: [\n { keyword: schemaKeywords.example, args: '2' },\n { keyword: schemaKeywords.default, args: 2 },\n {\n keyword: schemaKeywords.min,\n args: 2,\n },\n {\n keyword: schemaKeywords.number,\n },\n ],\n address: [\n {\n keyword: schemaKeywords.and,\n args: [\n { keyword: schemaKeywords.string },\n {\n keyword: schemaKeywords.object,\n args: {\n properties: {\n street: [{ keyword: schemaKeywords.string }],\n city: [{ keyword: schemaKeywords.string }],\n },\n additionalProperties: [],\n },\n },\n ],\n },\n { keyword: schemaKeywords.nullable },\n { keyword: schemaKeywords.describe, args: 'Your address' },\n ],\n },\n additionalProperties: [],\n },\n },\n ],\n },\n {\n name: 'Order',\n schema: [\n {\n keyword: schemaKeywords.schema,\n args: {\n type: 'object',\n },\n },\n {\n keyword: schemaKeywords.object,\n args: {\n properties: {\n status: [\n {\n keyword: schemaKeywords.enum,\n args: {\n name: 'orderStatus',\n asConst: false,\n typeName: 'OrderStatus',\n items: [\n { name: 'Placed', value: 'placed', format: 'string' },\n { name: 'Approved', value: 'approved', format: 'string' },\n ],\n },\n },\n ],\n },\n additionalProperties: [],\n },\n },\n ],\n },\n {\n name: 'nullableAdditionalProperties',\n schema: [\n {\n keyword: schemaKeywords.object,\n args: {\n properties: {},\n additionalProperties: [\n {\n keyword: schemaKeywords.string,\n },\n {\n args: {\n format: undefined,\n type: schemaKeywords.string,\n },\n keyword: schemaKeywords.schema,\n },\n {\n keyword: schemaKeywords.number,\n },\n ],\n },\n },\n ],\n },\n {\n name: 'Record',\n schema: [\n {\n keyword: schemaKeywords.object,\n args: {\n properties: {},\n additionalProperties: [\n {\n keyword: schemaKeywords.integer,\n },\n {\n keyword: schemaKeywords.schema,\n args: {\n type: 'integer',\n format: 'int32',\n },\n },\n {\n keyword: schemaKeywords.optional,\n },\n ],\n },\n },\n {\n keyword: schemaKeywords.schema,\n args: {\n type: 'integer',\n format: 'int32',\n },\n },\n {\n keyword: schemaKeywords.optional,\n },\n ],\n },\n]\n\nexport const schemas = {\n basic,\n full,\n}\n"],"mappings":";;;AAEA,MAAMA,QAAiD;CACrD;EACE,MAAM;EACN,QAAQ,EACN,SAAS,eAAe,KACzB;EACF;CACD;EACE,MAAM;EACN,QAAQ,EACN,SAAS,eAAe,SACzB;EACF;CACD;EACE,MAAM;EACN,QAAQ,EACN,SAAS,eAAe,QACzB;EACF;CACD;EACE,MAAM;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;OACJ,QAAQ;OACR,MAAM,eAAe;OACtB;MACD,SAAS,eAAe;MACzB;KACD,EACE,SAAS,eAAe,QACzB;KACF;IACF;GACF,CACF;EACF;CACD;EACE,MAAM;EACN,QAAQ;GACN;IACE,SAAS,eAAe;IACxB,MAAM;KACJ,YAAY,EAAE;KACd,sBAAsB;MACpB,EACE,SAAS,eAAe,SACzB;MACD;OACE,SAAS,eAAe;OACxB,MAAM;QACJ,MAAM;QACN,QAAQ;QACT;OACF;MACD,EACE,SAAS,eAAe,UACzB;MACF;KACF;IACF;GACD;IACE,SAAS,eAAe;IACxB,MAAM;KACJ,MAAM;KACN,QAAQ;KACT;IACF;GACD,EACE,SAAS,eAAe,UACzB;GACF;EACF;CACF;AAED,MAAa,UAAU;CACrB;CACA;CACD"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kubb/plugin-oas",
3
- "version": "4.11.0",
3
+ "version": "4.11.1",
4
4
  "description": "OpenAPI Specification (OAS) plugin for Kubb, providing core functionality for parsing and processing OpenAPI/Swagger schemas for code generation.",
5
5
  "keywords": [
6
6
  "openapi",
@@ -83,8 +83,8 @@
83
83
  "@stoplight/yaml": "^4.3.0",
84
84
  "p-limit": "^7.2.0",
85
85
  "remeda": "^2.32.0",
86
- "@kubb/core": "4.11.0",
87
- "@kubb/oas": "4.11.0"
86
+ "@kubb/core": "4.11.1",
87
+ "@kubb/oas": "4.11.1"
88
88
  },
89
89
  "peerDependencies": {
90
90
  "@kubb/react-fabric": "0.5.4"
@@ -305,7 +305,26 @@ const basic: Array<{ name: string; schema: Schema }> = [
305
305
  name: 'and',
306
306
  schema: {
307
307
  keyword: schemaKeywords.and,
308
- args: [{ keyword: schemaKeywords.string }, { keyword: schemaKeywords.number }],
308
+ args: [
309
+ {
310
+ keyword: schemaKeywords.object,
311
+ args: {
312
+ properties: {
313
+ street: [{ keyword: schemaKeywords.string }],
314
+ },
315
+ additionalProperties: [],
316
+ },
317
+ },
318
+ {
319
+ keyword: schemaKeywords.object,
320
+ args: {
321
+ properties: {
322
+ city: [{ keyword: schemaKeywords.string }],
323
+ },
324
+ additionalProperties: [],
325
+ },
326
+ },
327
+ ],
309
328
  },
310
329
  },
311
330
  {
@@ -401,7 +420,26 @@ const basic: Array<{ name: string; schema: Schema }> = [
401
420
  address: [
402
421
  {
403
422
  keyword: schemaKeywords.and,
404
- args: [{ keyword: schemaKeywords.string }, { keyword: schemaKeywords.number }],
423
+ args: [
424
+ {
425
+ keyword: schemaKeywords.object,
426
+ args: {
427
+ properties: {
428
+ street: [{ keyword: schemaKeywords.string }],
429
+ },
430
+ additionalProperties: [],
431
+ },
432
+ },
433
+ {
434
+ keyword: schemaKeywords.object,
435
+ args: {
436
+ properties: {
437
+ city: [{ keyword: schemaKeywords.string }],
438
+ },
439
+ additionalProperties: [],
440
+ },
441
+ },
442
+ ],
405
443
  },
406
444
  { keyword: schemaKeywords.nullable },
407
445
  { keyword: schemaKeywords.describe, args: 'Your address' },
@@ -664,7 +702,19 @@ const full: Array<{ name: string; schema: Schema[] }> = [
664
702
  address: [
665
703
  {
666
704
  keyword: schemaKeywords.and,
667
- args: [{ keyword: schemaKeywords.string }, { keyword: schemaKeywords.number }],
705
+ args: [
706
+ { keyword: schemaKeywords.string },
707
+ {
708
+ keyword: schemaKeywords.object,
709
+ args: {
710
+ properties: {
711
+ street: [{ keyword: schemaKeywords.string }],
712
+ city: [{ keyword: schemaKeywords.string }],
713
+ },
714
+ additionalProperties: [],
715
+ },
716
+ },
717
+ ],
668
718
  },
669
719
  { keyword: schemaKeywords.nullable },
670
720
  { keyword: schemaKeywords.describe, args: 'Your address' },