@kubb/plugin-oas 0.0.0-canary-20251103140549 → 0.0.0-canary-20251103161135

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.
@@ -1 +1 @@
1
- {"version":3,"file":"SchemaMapper-BUV8vhg0.cjs","names":[],"sources":["../src/SchemaMapper.ts"],"sourcesContent":["import type { KubbFile } from '@kubb/fabric-core/types'\n\nexport type SchemaKeywordMapper = {\n object: {\n keyword: 'object'\n args: {\n properties: { [x: string]: Schema[] }\n additionalProperties: Schema[]\n strict?: boolean\n }\n }\n url: { keyword: 'url' }\n readOnly: { keyword: 'readOnly' }\n writeOnly: { keyword: 'writeOnly' }\n uuid: { keyword: 'uuid' }\n email: { keyword: 'email' }\n firstName: { keyword: 'firstName' }\n lastName: { keyword: 'lastName' }\n phone: { keyword: 'phone' }\n password: { keyword: 'password' }\n date: { keyword: 'date'; args: { type?: 'date' | 'string' } }\n time: { keyword: 'time'; args: { type?: 'date' | 'string' } }\n datetime: { keyword: 'datetime'; args: { offset?: boolean; local?: boolean } }\n tuple: { keyword: 'tuple'; args: { items: Schema[]; min?: number; max?: number; rest?: Schema } }\n array: {\n keyword: 'array'\n args: { items: Schema[]; min?: number; max?: number; unique?: boolean }\n }\n enum: {\n keyword: 'enum'\n args: {\n name: string\n typeName: string\n asConst: boolean\n items: Array<{\n name: string | number\n format: 'string' | 'number' | 'boolean'\n value?: string | number | boolean\n }>\n }\n }\n and: { keyword: 'and'; args: Schema[] }\n const: {\n keyword: 'const'\n args: {\n name: string | number\n format: 'string' | 'number' | 'boolean'\n value?: string | number | boolean\n }\n }\n union: { keyword: 'union'; args: Schema[] }\n ref: {\n keyword: 'ref'\n args: {\n name: string\n $ref: string\n /**\n * Full qualified path.\n */\n path: KubbFile.OptionalPath\n /**\n * When true `File.Import` will be used.\n * When false a reference will be used inside the current file.\n */\n isImportable: boolean\n }\n }\n matches: { keyword: 'matches'; args?: string }\n boolean: { keyword: 'boolean' }\n default: { keyword: 'default'; args: string | number | boolean }\n string: { keyword: 'string' }\n integer: { keyword: 'integer' }\n number: { keyword: 'number' }\n max: { keyword: 'max'; args: number }\n min: { keyword: 'min'; args: number }\n exclusiveMaximum: { keyword: 'exclusiveMaximum'; args: number }\n exclusiveMinimum: { keyword: 'exclusiveMinimum'; args: number }\n describe: { keyword: 'describe'; args: string }\n example: { keyword: 'example'; args: string }\n deprecated: { keyword: 'deprecated' }\n optional: { keyword: 'optional' }\n undefined: { keyword: 'undefined' }\n nullish: { keyword: 'nullish' }\n nullable: { keyword: 'nullable' }\n null: { keyword: 'null' }\n any: { keyword: 'any' }\n unknown: { keyword: 'unknown' }\n void: { keyword: 'void' }\n blob: { keyword: 'blob' }\n schema: { keyword: 'schema'; args: { type: 'string' | 'number' | 'integer' | 'boolean' | 'array' | 'object'; format?: string } }\n name: { keyword: 'name'; args: string }\n catchall: { keyword: 'catchall' }\n interface: { keyword: 'interface' }\n}\n\nexport const schemaKeywords = {\n any: 'any',\n unknown: 'unknown',\n number: 'number',\n integer: 'integer',\n string: 'string',\n boolean: 'boolean',\n undefined: 'undefined',\n nullable: 'nullable',\n null: 'null',\n nullish: 'nullish',\n array: 'array',\n tuple: 'tuple',\n enum: 'enum',\n union: 'union',\n datetime: 'datetime',\n date: 'date',\n email: 'email',\n uuid: 'uuid',\n url: 'url',\n void: 'void',\n /* intersection */\n default: 'default',\n const: 'const',\n and: 'and',\n describe: 'describe',\n min: 'min',\n max: 'max',\n exclusiveMinimum: 'exclusiveMinimum',\n exclusiveMaximum: 'exclusiveMaximum',\n optional: 'optional',\n readOnly: 'readOnly',\n writeOnly: 'writeOnly',\n\n // custom ones\n object: 'object',\n ref: 'ref',\n matches: 'matches',\n firstName: 'firstName',\n lastName: 'lastName',\n password: 'password',\n phone: 'phone',\n blob: 'blob',\n deprecated: 'deprecated',\n example: 'example',\n schema: 'schema',\n catchall: 'catchall',\n time: 'time',\n name: 'name',\n interface: 'interface',\n} satisfies {\n [K in keyof SchemaKeywordMapper]: SchemaKeywordMapper[K]['keyword']\n}\n\nexport type SchemaKeyword = keyof SchemaKeywordMapper\n\nexport type SchemaMapper<T = string | null | undefined> = {\n [K in keyof SchemaKeywordMapper]: (() => T | undefined) | undefined\n}\n\nexport type SchemaKeywordBase<T> = {\n keyword: SchemaKeyword\n args: T\n}\n\nexport type Schema = { keyword: string } | SchemaKeywordMapper[keyof SchemaKeywordMapper]\n\nexport type SchemaTree = {\n parent: Schema | undefined\n current: Schema\n siblings: Schema[]\n /**\n * this will be equal to the key of a property(object)\n */\n name?: string\n}\n\nexport function isKeyword<T extends Schema, K extends keyof SchemaKeywordMapper>(meta: T, keyword: K): meta is Extract<T, SchemaKeywordMapper[K]> {\n return meta.keyword === keyword\n}\n"],"mappings":";;AA+FA,MAAa,iBAAiB;CAC5B,KAAK;CACL,SAAS;CACT,QAAQ;CACR,SAAS;CACT,QAAQ;CACR,SAAS;CACT,WAAW;CACX,UAAU;CACV,MAAM;CACN,SAAS;CACT,OAAO;CACP,OAAO;CACP,MAAM;CACN,OAAO;CACP,UAAU;CACV,MAAM;CACN,OAAO;CACP,MAAM;CACN,KAAK;CACL,MAAM;CAEN,SAAS;CACT,OAAO;CACP,KAAK;CACL,UAAU;CACV,KAAK;CACL,KAAK;CACL,kBAAkB;CAClB,kBAAkB;CAClB,UAAU;CACV,UAAU;CACV,WAAW;CAGX,QAAQ;CACR,KAAK;CACL,SAAS;CACT,WAAW;CACX,UAAU;CACV,UAAU;CACV,OAAO;CACP,MAAM;CACN,YAAY;CACZ,SAAS;CACT,QAAQ;CACR,UAAU;CACV,MAAM;CACN,MAAM;CACN,WAAW;CACZ;AA2BD,SAAgB,UAAiE,MAAS,SAAwD;AAChJ,QAAO,KAAK,YAAY"}
1
+ {"version":3,"file":"SchemaMapper-BUV8vhg0.cjs","names":[],"sources":["../src/SchemaMapper.ts"],"sourcesContent":["import type { KubbFile } from '@kubb/fabric-core/types'\nimport type { SchemaObject } from '@kubb/oas'\n\nexport type SchemaKeywordMapper = {\n object: {\n keyword: 'object'\n args: {\n properties: { [x: string]: Schema[] }\n additionalProperties: Schema[]\n strict?: boolean\n }\n }\n url: { keyword: 'url' }\n readOnly: { keyword: 'readOnly' }\n writeOnly: { keyword: 'writeOnly' }\n uuid: { keyword: 'uuid' }\n email: { keyword: 'email' }\n firstName: { keyword: 'firstName' }\n lastName: { keyword: 'lastName' }\n phone: { keyword: 'phone' }\n password: { keyword: 'password' }\n date: { keyword: 'date'; args: { type?: 'date' | 'string' } }\n time: { keyword: 'time'; args: { type?: 'date' | 'string' } }\n datetime: { keyword: 'datetime'; args: { offset?: boolean; local?: boolean } }\n tuple: { keyword: 'tuple'; args: { items: Schema[]; min?: number; max?: number; rest?: Schema } }\n array: {\n keyword: 'array'\n args: { items: Schema[]; min?: number; max?: number; unique?: boolean }\n }\n enum: {\n keyword: 'enum'\n args: {\n name: string\n typeName: string\n asConst: boolean\n items: Array<{\n name: string | number\n format: 'string' | 'number' | 'boolean'\n value?: string | number | boolean\n }>\n }\n }\n and: { keyword: 'and'; args: Schema[] }\n const: {\n keyword: 'const'\n args: {\n name: string | number\n format: 'string' | 'number' | 'boolean'\n value?: string | number | boolean\n }\n }\n union: { keyword: 'union'; args: Schema[] }\n ref: {\n keyword: 'ref'\n args: {\n name: string\n $ref: string\n /**\n * Full qualified path.\n */\n path: KubbFile.OptionalPath\n /**\n * When true `File.Import` will be used.\n * When false a reference will be used inside the current file.\n */\n isImportable: boolean\n }\n }\n matches: { keyword: 'matches'; args?: string }\n boolean: { keyword: 'boolean' }\n default: { keyword: 'default'; args: string | number | boolean }\n string: { keyword: 'string' }\n integer: { keyword: 'integer' }\n number: { keyword: 'number' }\n max: { keyword: 'max'; args: number }\n min: { keyword: 'min'; args: number }\n exclusiveMaximum: { keyword: 'exclusiveMaximum'; args: number }\n exclusiveMinimum: { keyword: 'exclusiveMinimum'; args: number }\n describe: { keyword: 'describe'; args: string }\n example: { keyword: 'example'; args: string }\n deprecated: { keyword: 'deprecated' }\n optional: { keyword: 'optional' }\n undefined: { keyword: 'undefined' }\n nullish: { keyword: 'nullish' }\n nullable: { keyword: 'nullable' }\n null: { keyword: 'null' }\n any: { keyword: 'any' }\n unknown: { keyword: 'unknown' }\n void: { keyword: 'void' }\n blob: { keyword: 'blob' }\n schema: { keyword: 'schema'; args: { type: 'string' | 'number' | 'integer' | 'boolean' | 'array' | 'object'; format?: string } }\n name: { keyword: 'name'; args: string }\n catchall: { keyword: 'catchall' }\n interface: { keyword: 'interface' }\n}\n\nexport const schemaKeywords = {\n any: 'any',\n unknown: 'unknown',\n number: 'number',\n integer: 'integer',\n string: 'string',\n boolean: 'boolean',\n undefined: 'undefined',\n nullable: 'nullable',\n null: 'null',\n nullish: 'nullish',\n array: 'array',\n tuple: 'tuple',\n enum: 'enum',\n union: 'union',\n datetime: 'datetime',\n date: 'date',\n email: 'email',\n uuid: 'uuid',\n url: 'url',\n void: 'void',\n /* intersection */\n default: 'default',\n const: 'const',\n and: 'and',\n describe: 'describe',\n min: 'min',\n max: 'max',\n exclusiveMinimum: 'exclusiveMinimum',\n exclusiveMaximum: 'exclusiveMaximum',\n optional: 'optional',\n readOnly: 'readOnly',\n writeOnly: 'writeOnly',\n\n // custom ones\n object: 'object',\n ref: 'ref',\n matches: 'matches',\n firstName: 'firstName',\n lastName: 'lastName',\n password: 'password',\n phone: 'phone',\n blob: 'blob',\n deprecated: 'deprecated',\n example: 'example',\n schema: 'schema',\n catchall: 'catchall',\n time: 'time',\n name: 'name',\n interface: 'interface',\n} satisfies {\n [K in keyof SchemaKeywordMapper]: SchemaKeywordMapper[K]['keyword']\n}\n\nexport type SchemaKeyword = keyof SchemaKeywordMapper\n\nexport type SchemaMapper<T = string | null | undefined> = {\n [K in keyof SchemaKeywordMapper]: (() => T | undefined) | undefined\n}\n\nexport type SchemaKeywordBase<T> = {\n keyword: SchemaKeyword\n args: T\n}\n\nexport type Schema = { keyword: string } | SchemaKeywordMapper[keyof SchemaKeywordMapper]\n\nexport type SchemaTree = {\n schema: SchemaObject\n parent: Schema | undefined\n current: Schema\n siblings: Schema[]\n /**\n * this will be equal to the key of a property(object)\n */\n name?: string\n}\n\nexport function isKeyword<T extends Schema, K extends keyof SchemaKeywordMapper>(meta: T, keyword: K): meta is Extract<T, SchemaKeywordMapper[K]> {\n return meta.keyword === keyword\n}\n"],"mappings":";;AAgGA,MAAa,iBAAiB;CAC5B,KAAK;CACL,SAAS;CACT,QAAQ;CACR,SAAS;CACT,QAAQ;CACR,SAAS;CACT,WAAW;CACX,UAAU;CACV,MAAM;CACN,SAAS;CACT,OAAO;CACP,OAAO;CACP,MAAM;CACN,OAAO;CACP,UAAU;CACV,MAAM;CACN,OAAO;CACP,MAAM;CACN,KAAK;CACL,MAAM;CAEN,SAAS;CACT,OAAO;CACP,KAAK;CACL,UAAU;CACV,KAAK;CACL,KAAK;CACL,kBAAkB;CAClB,kBAAkB;CAClB,UAAU;CACV,UAAU;CACV,WAAW;CAGX,QAAQ;CACR,KAAK;CACL,SAAS;CACT,WAAW;CACX,UAAU;CACV,UAAU;CACV,OAAO;CACP,MAAM;CACN,YAAY;CACZ,SAAS;CACT,QAAQ;CACR,UAAU;CACV,MAAM;CACN,MAAM;CACN,WAAW;CACZ;AA4BD,SAAgB,UAAiE,MAAS,SAAwD;AAChJ,QAAO,KAAK,YAAY"}
@@ -1,5 +1,16 @@
1
1
  import { KubbFile } from "@kubb/fabric-core/types";
2
+ import * as OasTypes from "oas/types";
3
+ import { HttpMethods as HttpMethod } from "oas/types";
4
+ import { Operation as Operation$1 } from "oas/operation";
5
+ import { OpenAPIV3 as OpenAPIV3$1, OpenAPIV3_1 } from "openapi-types";
2
6
 
7
+ //#region ../oas/src/types.d.ts
8
+ type contentType = 'application/json' | (string & {});
9
+ type SchemaObject$1 = OasTypes.SchemaObject & {
10
+ 'x-nullable'?: boolean;
11
+ $ref?: string;
12
+ };
13
+ //#endregion
3
14
  //#region src/SchemaMapper.d.ts
4
15
  type SchemaKeywordMapper = {
5
16
  object: {
@@ -271,6 +282,7 @@ type Schema = {
271
282
  keyword: string;
272
283
  } | SchemaKeywordMapper[keyof SchemaKeywordMapper];
273
284
  type SchemaTree = {
285
+ schema: SchemaObject$1;
274
286
  parent: Schema | undefined;
275
287
  current: Schema;
276
288
  siblings: Schema[];
@@ -281,5 +293,5 @@ type SchemaTree = {
281
293
  };
282
294
  declare function isKeyword<T extends Schema, K extends keyof SchemaKeywordMapper>(meta: T, keyword: K): meta is Extract<T, SchemaKeywordMapper[K]>;
283
295
  //#endregion
284
- export { SchemaMapper as a, schemaKeywords as c, SchemaKeywordMapper as i, SchemaKeyword as n, SchemaTree as o, SchemaKeywordBase as r, isKeyword as s, Schema as t };
285
- //# sourceMappingURL=SchemaMapper-m5TKynWt.d.ts.map
296
+ export { SchemaMapper as a, schemaKeywords as c, OpenAPIV3$1 as d, OpenAPIV3_1 as f, contentType as h, SchemaKeywordMapper as i, HttpMethod as l, SchemaObject$1 as m, SchemaKeyword as n, SchemaTree as o, Operation$1 as p, SchemaKeywordBase as r, isKeyword as s, Schema as t, OasTypes as u };
297
+ //# sourceMappingURL=SchemaMapper-CgGWx6jF.d.cts.map
@@ -1,5 +1,16 @@
1
1
  import { KubbFile } from "@kubb/fabric-core/types";
2
+ import * as OasTypes from "oas/types";
3
+ import { HttpMethods as HttpMethod } from "oas/types";
4
+ import { Operation as Operation$1 } from "oas/operation";
5
+ import { OpenAPIV3 as OpenAPIV3$1, OpenAPIV3_1 } from "openapi-types";
2
6
 
7
+ //#region ../oas/src/types.d.ts
8
+ type contentType = 'application/json' | (string & {});
9
+ type SchemaObject$1 = OasTypes.SchemaObject & {
10
+ 'x-nullable'?: boolean;
11
+ $ref?: string;
12
+ };
13
+ //#endregion
3
14
  //#region src/SchemaMapper.d.ts
4
15
  type SchemaKeywordMapper = {
5
16
  object: {
@@ -271,6 +282,7 @@ type Schema = {
271
282
  keyword: string;
272
283
  } | SchemaKeywordMapper[keyof SchemaKeywordMapper];
273
284
  type SchemaTree = {
285
+ schema: SchemaObject$1;
274
286
  parent: Schema | undefined;
275
287
  current: Schema;
276
288
  siblings: Schema[];
@@ -281,5 +293,5 @@ type SchemaTree = {
281
293
  };
282
294
  declare function isKeyword<T extends Schema, K extends keyof SchemaKeywordMapper>(meta: T, keyword: K): meta is Extract<T, SchemaKeywordMapper[K]>;
283
295
  //#endregion
284
- export { SchemaMapper as a, schemaKeywords as c, SchemaKeywordMapper as i, SchemaKeyword as n, SchemaTree as o, SchemaKeywordBase as r, isKeyword as s, Schema as t };
285
- //# sourceMappingURL=SchemaMapper-CX7sIIuZ.d.cts.map
296
+ export { SchemaMapper as a, schemaKeywords as c, OpenAPIV3$1 as d, OpenAPIV3_1 as f, contentType as h, SchemaKeywordMapper as i, HttpMethod as l, SchemaObject$1 as m, SchemaKeyword as n, SchemaTree as o, Operation$1 as p, SchemaKeywordBase as r, isKeyword as s, Schema as t, OasTypes as u };
297
+ //# sourceMappingURL=SchemaMapper-Cj3vjPGs.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"SchemaMapper-D30tqRoX.js","names":[],"sources":["../src/SchemaMapper.ts"],"sourcesContent":["import type { KubbFile } from '@kubb/fabric-core/types'\n\nexport type SchemaKeywordMapper = {\n object: {\n keyword: 'object'\n args: {\n properties: { [x: string]: Schema[] }\n additionalProperties: Schema[]\n strict?: boolean\n }\n }\n url: { keyword: 'url' }\n readOnly: { keyword: 'readOnly' }\n writeOnly: { keyword: 'writeOnly' }\n uuid: { keyword: 'uuid' }\n email: { keyword: 'email' }\n firstName: { keyword: 'firstName' }\n lastName: { keyword: 'lastName' }\n phone: { keyword: 'phone' }\n password: { keyword: 'password' }\n date: { keyword: 'date'; args: { type?: 'date' | 'string' } }\n time: { keyword: 'time'; args: { type?: 'date' | 'string' } }\n datetime: { keyword: 'datetime'; args: { offset?: boolean; local?: boolean } }\n tuple: { keyword: 'tuple'; args: { items: Schema[]; min?: number; max?: number; rest?: Schema } }\n array: {\n keyword: 'array'\n args: { items: Schema[]; min?: number; max?: number; unique?: boolean }\n }\n enum: {\n keyword: 'enum'\n args: {\n name: string\n typeName: string\n asConst: boolean\n items: Array<{\n name: string | number\n format: 'string' | 'number' | 'boolean'\n value?: string | number | boolean\n }>\n }\n }\n and: { keyword: 'and'; args: Schema[] }\n const: {\n keyword: 'const'\n args: {\n name: string | number\n format: 'string' | 'number' | 'boolean'\n value?: string | number | boolean\n }\n }\n union: { keyword: 'union'; args: Schema[] }\n ref: {\n keyword: 'ref'\n args: {\n name: string\n $ref: string\n /**\n * Full qualified path.\n */\n path: KubbFile.OptionalPath\n /**\n * When true `File.Import` will be used.\n * When false a reference will be used inside the current file.\n */\n isImportable: boolean\n }\n }\n matches: { keyword: 'matches'; args?: string }\n boolean: { keyword: 'boolean' }\n default: { keyword: 'default'; args: string | number | boolean }\n string: { keyword: 'string' }\n integer: { keyword: 'integer' }\n number: { keyword: 'number' }\n max: { keyword: 'max'; args: number }\n min: { keyword: 'min'; args: number }\n exclusiveMaximum: { keyword: 'exclusiveMaximum'; args: number }\n exclusiveMinimum: { keyword: 'exclusiveMinimum'; args: number }\n describe: { keyword: 'describe'; args: string }\n example: { keyword: 'example'; args: string }\n deprecated: { keyword: 'deprecated' }\n optional: { keyword: 'optional' }\n undefined: { keyword: 'undefined' }\n nullish: { keyword: 'nullish' }\n nullable: { keyword: 'nullable' }\n null: { keyword: 'null' }\n any: { keyword: 'any' }\n unknown: { keyword: 'unknown' }\n void: { keyword: 'void' }\n blob: { keyword: 'blob' }\n schema: { keyword: 'schema'; args: { type: 'string' | 'number' | 'integer' | 'boolean' | 'array' | 'object'; format?: string } }\n name: { keyword: 'name'; args: string }\n catchall: { keyword: 'catchall' }\n interface: { keyword: 'interface' }\n}\n\nexport const schemaKeywords = {\n any: 'any',\n unknown: 'unknown',\n number: 'number',\n integer: 'integer',\n string: 'string',\n boolean: 'boolean',\n undefined: 'undefined',\n nullable: 'nullable',\n null: 'null',\n nullish: 'nullish',\n array: 'array',\n tuple: 'tuple',\n enum: 'enum',\n union: 'union',\n datetime: 'datetime',\n date: 'date',\n email: 'email',\n uuid: 'uuid',\n url: 'url',\n void: 'void',\n /* intersection */\n default: 'default',\n const: 'const',\n and: 'and',\n describe: 'describe',\n min: 'min',\n max: 'max',\n exclusiveMinimum: 'exclusiveMinimum',\n exclusiveMaximum: 'exclusiveMaximum',\n optional: 'optional',\n readOnly: 'readOnly',\n writeOnly: 'writeOnly',\n\n // custom ones\n object: 'object',\n ref: 'ref',\n matches: 'matches',\n firstName: 'firstName',\n lastName: 'lastName',\n password: 'password',\n phone: 'phone',\n blob: 'blob',\n deprecated: 'deprecated',\n example: 'example',\n schema: 'schema',\n catchall: 'catchall',\n time: 'time',\n name: 'name',\n interface: 'interface',\n} satisfies {\n [K in keyof SchemaKeywordMapper]: SchemaKeywordMapper[K]['keyword']\n}\n\nexport type SchemaKeyword = keyof SchemaKeywordMapper\n\nexport type SchemaMapper<T = string | null | undefined> = {\n [K in keyof SchemaKeywordMapper]: (() => T | undefined) | undefined\n}\n\nexport type SchemaKeywordBase<T> = {\n keyword: SchemaKeyword\n args: T\n}\n\nexport type Schema = { keyword: string } | SchemaKeywordMapper[keyof SchemaKeywordMapper]\n\nexport type SchemaTree = {\n parent: Schema | undefined\n current: Schema\n siblings: Schema[]\n /**\n * this will be equal to the key of a property(object)\n */\n name?: string\n}\n\nexport function isKeyword<T extends Schema, K extends keyof SchemaKeywordMapper>(meta: T, keyword: K): meta is Extract<T, SchemaKeywordMapper[K]> {\n return meta.keyword === keyword\n}\n"],"mappings":";AA+FA,MAAa,iBAAiB;CAC5B,KAAK;CACL,SAAS;CACT,QAAQ;CACR,SAAS;CACT,QAAQ;CACR,SAAS;CACT,WAAW;CACX,UAAU;CACV,MAAM;CACN,SAAS;CACT,OAAO;CACP,OAAO;CACP,MAAM;CACN,OAAO;CACP,UAAU;CACV,MAAM;CACN,OAAO;CACP,MAAM;CACN,KAAK;CACL,MAAM;CAEN,SAAS;CACT,OAAO;CACP,KAAK;CACL,UAAU;CACV,KAAK;CACL,KAAK;CACL,kBAAkB;CAClB,kBAAkB;CAClB,UAAU;CACV,UAAU;CACV,WAAW;CAGX,QAAQ;CACR,KAAK;CACL,SAAS;CACT,WAAW;CACX,UAAU;CACV,UAAU;CACV,OAAO;CACP,MAAM;CACN,YAAY;CACZ,SAAS;CACT,QAAQ;CACR,UAAU;CACV,MAAM;CACN,MAAM;CACN,WAAW;CACZ;AA2BD,SAAgB,UAAiE,MAAS,SAAwD;AAChJ,QAAO,KAAK,YAAY"}
1
+ {"version":3,"file":"SchemaMapper-D30tqRoX.js","names":[],"sources":["../src/SchemaMapper.ts"],"sourcesContent":["import type { KubbFile } from '@kubb/fabric-core/types'\nimport type { SchemaObject } from '@kubb/oas'\n\nexport type SchemaKeywordMapper = {\n object: {\n keyword: 'object'\n args: {\n properties: { [x: string]: Schema[] }\n additionalProperties: Schema[]\n strict?: boolean\n }\n }\n url: { keyword: 'url' }\n readOnly: { keyword: 'readOnly' }\n writeOnly: { keyword: 'writeOnly' }\n uuid: { keyword: 'uuid' }\n email: { keyword: 'email' }\n firstName: { keyword: 'firstName' }\n lastName: { keyword: 'lastName' }\n phone: { keyword: 'phone' }\n password: { keyword: 'password' }\n date: { keyword: 'date'; args: { type?: 'date' | 'string' } }\n time: { keyword: 'time'; args: { type?: 'date' | 'string' } }\n datetime: { keyword: 'datetime'; args: { offset?: boolean; local?: boolean } }\n tuple: { keyword: 'tuple'; args: { items: Schema[]; min?: number; max?: number; rest?: Schema } }\n array: {\n keyword: 'array'\n args: { items: Schema[]; min?: number; max?: number; unique?: boolean }\n }\n enum: {\n keyword: 'enum'\n args: {\n name: string\n typeName: string\n asConst: boolean\n items: Array<{\n name: string | number\n format: 'string' | 'number' | 'boolean'\n value?: string | number | boolean\n }>\n }\n }\n and: { keyword: 'and'; args: Schema[] }\n const: {\n keyword: 'const'\n args: {\n name: string | number\n format: 'string' | 'number' | 'boolean'\n value?: string | number | boolean\n }\n }\n union: { keyword: 'union'; args: Schema[] }\n ref: {\n keyword: 'ref'\n args: {\n name: string\n $ref: string\n /**\n * Full qualified path.\n */\n path: KubbFile.OptionalPath\n /**\n * When true `File.Import` will be used.\n * When false a reference will be used inside the current file.\n */\n isImportable: boolean\n }\n }\n matches: { keyword: 'matches'; args?: string }\n boolean: { keyword: 'boolean' }\n default: { keyword: 'default'; args: string | number | boolean }\n string: { keyword: 'string' }\n integer: { keyword: 'integer' }\n number: { keyword: 'number' }\n max: { keyword: 'max'; args: number }\n min: { keyword: 'min'; args: number }\n exclusiveMaximum: { keyword: 'exclusiveMaximum'; args: number }\n exclusiveMinimum: { keyword: 'exclusiveMinimum'; args: number }\n describe: { keyword: 'describe'; args: string }\n example: { keyword: 'example'; args: string }\n deprecated: { keyword: 'deprecated' }\n optional: { keyword: 'optional' }\n undefined: { keyword: 'undefined' }\n nullish: { keyword: 'nullish' }\n nullable: { keyword: 'nullable' }\n null: { keyword: 'null' }\n any: { keyword: 'any' }\n unknown: { keyword: 'unknown' }\n void: { keyword: 'void' }\n blob: { keyword: 'blob' }\n schema: { keyword: 'schema'; args: { type: 'string' | 'number' | 'integer' | 'boolean' | 'array' | 'object'; format?: string } }\n name: { keyword: 'name'; args: string }\n catchall: { keyword: 'catchall' }\n interface: { keyword: 'interface' }\n}\n\nexport const schemaKeywords = {\n any: 'any',\n unknown: 'unknown',\n number: 'number',\n integer: 'integer',\n string: 'string',\n boolean: 'boolean',\n undefined: 'undefined',\n nullable: 'nullable',\n null: 'null',\n nullish: 'nullish',\n array: 'array',\n tuple: 'tuple',\n enum: 'enum',\n union: 'union',\n datetime: 'datetime',\n date: 'date',\n email: 'email',\n uuid: 'uuid',\n url: 'url',\n void: 'void',\n /* intersection */\n default: 'default',\n const: 'const',\n and: 'and',\n describe: 'describe',\n min: 'min',\n max: 'max',\n exclusiveMinimum: 'exclusiveMinimum',\n exclusiveMaximum: 'exclusiveMaximum',\n optional: 'optional',\n readOnly: 'readOnly',\n writeOnly: 'writeOnly',\n\n // custom ones\n object: 'object',\n ref: 'ref',\n matches: 'matches',\n firstName: 'firstName',\n lastName: 'lastName',\n password: 'password',\n phone: 'phone',\n blob: 'blob',\n deprecated: 'deprecated',\n example: 'example',\n schema: 'schema',\n catchall: 'catchall',\n time: 'time',\n name: 'name',\n interface: 'interface',\n} satisfies {\n [K in keyof SchemaKeywordMapper]: SchemaKeywordMapper[K]['keyword']\n}\n\nexport type SchemaKeyword = keyof SchemaKeywordMapper\n\nexport type SchemaMapper<T = string | null | undefined> = {\n [K in keyof SchemaKeywordMapper]: (() => T | undefined) | undefined\n}\n\nexport type SchemaKeywordBase<T> = {\n keyword: SchemaKeyword\n args: T\n}\n\nexport type Schema = { keyword: string } | SchemaKeywordMapper[keyof SchemaKeywordMapper]\n\nexport type SchemaTree = {\n schema: SchemaObject\n parent: Schema | undefined\n current: Schema\n siblings: Schema[]\n /**\n * this will be equal to the key of a property(object)\n */\n name?: string\n}\n\nexport function isKeyword<T extends Schema, K extends keyof SchemaKeywordMapper>(meta: T, keyword: K): meta is Extract<T, SchemaKeywordMapper[K]> {\n return meta.keyword === keyword\n}\n"],"mappings":";AAgGA,MAAa,iBAAiB;CAC5B,KAAK;CACL,SAAS;CACT,QAAQ;CACR,SAAS;CACT,QAAQ;CACR,SAAS;CACT,WAAW;CACX,UAAU;CACV,MAAM;CACN,SAAS;CACT,OAAO;CACP,OAAO;CACP,MAAM;CACN,OAAO;CACP,UAAU;CACV,MAAM;CACN,OAAO;CACP,MAAM;CACN,KAAK;CACL,MAAM;CAEN,SAAS;CACT,OAAO;CACP,KAAK;CACL,UAAU;CACV,KAAK;CACL,KAAK;CACL,kBAAkB;CAClB,kBAAkB;CAClB,UAAU;CACV,UAAU;CACV,WAAW;CAGX,QAAQ;CACR,KAAK;CACL,SAAS;CACT,WAAW;CACX,UAAU;CACV,UAAU;CACV,OAAO;CACP,MAAM;CACN,YAAY;CACZ,SAAS;CACT,QAAQ;CACR,UAAU;CACV,MAAM;CACN,MAAM;CACN,WAAW;CACZ;AA4BD,SAAgB,UAAiE,MAAS,SAAwD;AAChJ,QAAO,KAAK,YAAY"}
@@ -1,11 +1,10 @@
1
- import { i as SchemaKeywordMapper, t as Schema } from "./SchemaMapper-m5TKynWt.js";
1
+ import { h as contentType, i as SchemaKeywordMapper, l as HttpMethod, m as SchemaObject$1, p as Operation$1, t as Schema, u as OasTypes } from "./SchemaMapper-Cj3vjPGs.js";
2
2
  import { Fabric, FileManager } from "@kubb/react-fabric";
3
3
  import { KubbFile } from "@kubb/fabric-core/types";
4
4
  import { ConsolaInstance, LogLevel } from "consola";
5
- import * as OasTypes from "oas/types";
6
- import { HttpMethods as HttpMethod, OASDocument, SchemaObject, User } from "oas/types";
7
- import { Operation, Operation as Operation$1 } from "oas/operation";
8
- import { OpenAPIV3, OpenAPIV3 as OpenAPIV3$1, OpenAPIV3_1 } from "openapi-types";
5
+ import { OASDocument, SchemaObject, User } from "oas/types";
6
+ import { Operation } from "oas/operation";
7
+ import { OpenAPIV3 } from "openapi-types";
9
8
  import * as oas_normalize_lib_types0 from "oas-normalize/lib/types";
10
9
  import BaseOas from "oas";
11
10
  import { KubbNode } from "@kubb/react-fabric/types";
@@ -522,13 +521,6 @@ type FileMetaBase = {
522
521
  pluginKey?: Plugin['key'];
523
522
  };
524
523
  //#endregion
525
- //#region ../oas/src/types.d.ts
526
- type contentType = 'application/json' | (string & {});
527
- type SchemaObject$1 = OasTypes.SchemaObject & {
528
- 'x-nullable'?: boolean;
529
- $ref?: string;
530
- };
531
- //#endregion
532
524
  //#region ../oas/src/Oas.d.ts
533
525
  type Options$2 = {
534
526
  contentType?: contentType;
@@ -864,5 +856,5 @@ type CoreGenerator<TOptions extends PluginFactoryOptions> = {
864
856
  };
865
857
  declare function createGenerator<TOptions extends PluginFactoryOptions>(generator: UserGenerator<TOptions>): CoreGenerator<TOptions>;
866
858
  //#endregion
867
- export { SchemaObject$1 as A, ResolvePathOptions as C, OpenAPIV3$1 as D, OasTypes as E, Plugin as F, PluginFactoryOptions as I, ResolveNameParams as L, FileMetaBase as M, Config as N, OpenAPIV3_1 as O, Output as P, UserPluginWithLifeCycle as R, Refs as S, Oas as T, OperationSchemas as _, createReactGenerator as a, PluginOas as b, SchemaGeneratorBuildOptions as c, OperationGenerator as d, OperationMethodResult as f, OperationSchema as g, Include as h, ReactGenerator as i, contentType as j, Operation$1 as k, SchemaGeneratorOptions as l, Exclude$1 as m, createGenerator as n, GetSchemaGeneratorOptions as o, API as p, Generator as r, SchemaGenerator as s, CoreGenerator as t, SchemaMethodResult as u, Options$1 as v, Resolver as w, Ref as x, Override as y };
868
- //# sourceMappingURL=createGenerator-DoZXEhFy.d.ts.map
859
+ export { PluginFactoryOptions as A, ResolvePathOptions as C, Config as D, FileMetaBase as E, UserPluginWithLifeCycle as M, Output as O, Refs as S, Oas as T, OperationSchemas as _, createReactGenerator as a, PluginOas as b, SchemaGeneratorBuildOptions as c, OperationGenerator as d, OperationMethodResult as f, OperationSchema as g, Include as h, ReactGenerator as i, ResolveNameParams as j, Plugin as k, SchemaGeneratorOptions as l, Exclude$1 as m, createGenerator as n, GetSchemaGeneratorOptions as o, API as p, Generator as r, SchemaGenerator as s, CoreGenerator as t, SchemaMethodResult as u, Options$1 as v, Resolver as w, Ref as x, Override as y };
860
+ //# sourceMappingURL=createGenerator-BvCDyuKS.d.ts.map
@@ -1,11 +1,10 @@
1
- import { i as SchemaKeywordMapper, t as Schema } from "./SchemaMapper-CX7sIIuZ.cjs";
1
+ import { h as contentType, i as SchemaKeywordMapper, l as HttpMethod, m as SchemaObject$1, p as Operation$1, t as Schema, u as OasTypes } from "./SchemaMapper-CgGWx6jF.cjs";
2
2
  import { KubbFile } from "@kubb/fabric-core/types";
3
3
  import { Fabric, FileManager } from "@kubb/react-fabric";
4
4
  import { ConsolaInstance, LogLevel } from "consola";
5
- import * as OasTypes from "oas/types";
6
- import { HttpMethods as HttpMethod, OASDocument, SchemaObject, User } from "oas/types";
7
- import { Operation, Operation as Operation$1 } from "oas/operation";
8
- import { OpenAPIV3, OpenAPIV3 as OpenAPIV3$1, OpenAPIV3_1 } from "openapi-types";
5
+ import { OASDocument, SchemaObject, User } from "oas/types";
6
+ import { Operation } from "oas/operation";
7
+ import { OpenAPIV3 } from "openapi-types";
9
8
  import * as oas_normalize_lib_types0 from "oas-normalize/lib/types";
10
9
  import BaseOas from "oas";
11
10
  import { KubbNode } from "@kubb/react-fabric/types";
@@ -522,13 +521,6 @@ type FileMetaBase = {
522
521
  pluginKey?: Plugin['key'];
523
522
  };
524
523
  //#endregion
525
- //#region ../oas/src/types.d.ts
526
- type contentType = 'application/json' | (string & {});
527
- type SchemaObject$1 = OasTypes.SchemaObject & {
528
- 'x-nullable'?: boolean;
529
- $ref?: string;
530
- };
531
- //#endregion
532
524
  //#region ../oas/src/Oas.d.ts
533
525
  type Options$2 = {
534
526
  contentType?: contentType;
@@ -864,5 +856,5 @@ type CoreGenerator<TOptions extends PluginFactoryOptions> = {
864
856
  };
865
857
  declare function createGenerator<TOptions extends PluginFactoryOptions>(generator: UserGenerator<TOptions>): CoreGenerator<TOptions>;
866
858
  //#endregion
867
- export { SchemaObject$1 as A, ResolvePathOptions as C, OpenAPIV3$1 as D, OasTypes as E, Plugin as F, PluginFactoryOptions as I, ResolveNameParams as L, FileMetaBase as M, Config as N, OpenAPIV3_1 as O, Output as P, UserPluginWithLifeCycle as R, Refs as S, Oas as T, OperationSchemas as _, createReactGenerator as a, PluginOas as b, SchemaGeneratorBuildOptions as c, OperationGenerator as d, OperationMethodResult as f, OperationSchema as g, Include as h, ReactGenerator as i, contentType as j, Operation$1 as k, SchemaGeneratorOptions as l, Exclude$1 as m, createGenerator as n, GetSchemaGeneratorOptions as o, API as p, Generator as r, SchemaGenerator as s, CoreGenerator as t, SchemaMethodResult as u, Options$1 as v, Resolver as w, Ref as x, Override as y };
868
- //# sourceMappingURL=createGenerator-BZv3BSD_.d.cts.map
859
+ export { PluginFactoryOptions as A, ResolvePathOptions as C, Config as D, FileMetaBase as E, UserPluginWithLifeCycle as M, Output as O, Refs as S, Oas as T, OperationSchemas as _, createReactGenerator as a, PluginOas as b, SchemaGeneratorBuildOptions as c, OperationGenerator as d, OperationMethodResult as f, OperationSchema as g, Include as h, ReactGenerator as i, ResolveNameParams as j, Plugin as k, SchemaGeneratorOptions as l, Exclude$1 as m, createGenerator as n, GetSchemaGeneratorOptions as o, API as p, Generator as r, SchemaGenerator as s, CoreGenerator as t, SchemaMethodResult as u, Options$1 as v, Resolver as w, Ref as x, Override as y };
860
+ //# sourceMappingURL=createGenerator-CPNglV1d.d.cts.map
@@ -1,5 +1,5 @@
1
- import { a as createReactGenerator, b as PluginOas, n as createGenerator, r as Generator, t as CoreGenerator } from "./createGenerator-BZv3BSD_.cjs";
2
- import "./SchemaMapper-CX7sIIuZ.cjs";
1
+ import { a as createReactGenerator, b as PluginOas, n as createGenerator, r as Generator, t as CoreGenerator } from "./createGenerator-CPNglV1d.cjs";
2
+ import "./SchemaMapper-CgGWx6jF.cjs";
3
3
 
4
4
  //#region src/generators/jsonGenerator.d.ts
5
5
  declare const jsonGenerator: CoreGenerator<PluginOas>;
@@ -1,5 +1,5 @@
1
- import { a as createReactGenerator, b as PluginOas, n as createGenerator, r as Generator, t as CoreGenerator } from "./createGenerator-DoZXEhFy.js";
2
- import "./SchemaMapper-m5TKynWt.js";
1
+ import { a as createReactGenerator, b as PluginOas, n as createGenerator, r as Generator, t as CoreGenerator } from "./createGenerator-BvCDyuKS.js";
2
+ import "./SchemaMapper-Cj3vjPGs.js";
3
3
 
4
4
  //#region src/generators/jsonGenerator.d.ts
5
5
  declare const jsonGenerator: CoreGenerator<PluginOas>;
package/dist/hooks.d.cts CHANGED
@@ -1,5 +1,5 @@
1
- import { F as Plugin, L as ResolveNameParams, M as FileMetaBase, T as Oas, _ as OperationSchemas, d as OperationGenerator, k as Operation } from "./createGenerator-BZv3BSD_.cjs";
2
- import { t as Schema } from "./SchemaMapper-CX7sIIuZ.cjs";
1
+ import { E as FileMetaBase, T as Oas, _ as OperationSchemas, d as OperationGenerator, j as ResolveNameParams, k as Plugin } from "./createGenerator-CPNglV1d.cjs";
2
+ import { p as Operation, t as Schema } from "./SchemaMapper-CgGWx6jF.cjs";
3
3
  import { KubbFile } from "@kubb/fabric-core/types";
4
4
 
5
5
  //#region src/hooks/useOas.d.ts
package/dist/hooks.d.ts CHANGED
@@ -1,5 +1,5 @@
1
- import { F as Plugin, L as ResolveNameParams, M as FileMetaBase, T as Oas, _ as OperationSchemas, d as OperationGenerator, k as Operation } from "./createGenerator-DoZXEhFy.js";
2
- import { t as Schema } from "./SchemaMapper-m5TKynWt.js";
1
+ import { E as FileMetaBase, T as Oas, _ as OperationSchemas, d as OperationGenerator, j as ResolveNameParams, k as Plugin } from "./createGenerator-BvCDyuKS.js";
2
+ import { p as Operation, t as Schema } from "./SchemaMapper-Cj3vjPGs.js";
3
3
  import { KubbFile } from "@kubb/fabric-core/types";
4
4
 
5
5
  //#region src/hooks/useOas.d.ts
package/dist/index.d.cts CHANGED
@@ -1,5 +1,5 @@
1
- import { A as SchemaObject, C as ResolvePathOptions, F as Plugin, I as PluginFactoryOptions, N as Config, R as UserPluginWithLifeCycle, S as Refs, _ as OperationSchemas, b as PluginOas, c as SchemaGeneratorBuildOptions, d as OperationGenerator, f as OperationMethodResult, g as OperationSchema, h as Include, i as ReactGenerator, k as Operation, l as SchemaGeneratorOptions, m as Exclude, o as GetSchemaGeneratorOptions, p as API, s as SchemaGenerator, u as SchemaMethodResult, v as Options, w as Resolver, x as Ref, y as Override } from "./createGenerator-BZv3BSD_.cjs";
2
- import { a as SchemaMapper, c as schemaKeywords, i as SchemaKeywordMapper, n as SchemaKeyword, o as SchemaTree, r as SchemaKeywordBase, s as isKeyword, t as Schema } from "./SchemaMapper-CX7sIIuZ.cjs";
1
+ import { A as PluginFactoryOptions, C as ResolvePathOptions, D as Config, M as UserPluginWithLifeCycle, S as Refs, _ as OperationSchemas, b as PluginOas, c as SchemaGeneratorBuildOptions, d as OperationGenerator, f as OperationMethodResult, g as OperationSchema, h as Include, i as ReactGenerator, k as Plugin, l as SchemaGeneratorOptions, m as Exclude, o as GetSchemaGeneratorOptions, p as API, s as SchemaGenerator, u as SchemaMethodResult, v as Options, w as Resolver, x as Ref, y as Override } from "./createGenerator-CPNglV1d.cjs";
2
+ import { a as SchemaMapper, c as schemaKeywords, i as SchemaKeywordMapper, m as SchemaObject, n as SchemaKeyword, o as SchemaTree, p as Operation, r as SchemaKeywordBase, s as isKeyword, t as Schema } from "./SchemaMapper-CgGWx6jF.cjs";
3
3
  import { Fabric } from "@kubb/react-fabric";
4
4
 
5
5
  //#region src/plugin.d.ts
package/dist/index.d.ts CHANGED
@@ -1,5 +1,5 @@
1
- import { A as SchemaObject, C as ResolvePathOptions, F as Plugin, I as PluginFactoryOptions, N as Config, R as UserPluginWithLifeCycle, S as Refs, _ as OperationSchemas, b as PluginOas, c as SchemaGeneratorBuildOptions, d as OperationGenerator, f as OperationMethodResult, g as OperationSchema, h as Include, i as ReactGenerator, k as Operation, l as SchemaGeneratorOptions, m as Exclude, o as GetSchemaGeneratorOptions, p as API, s as SchemaGenerator, u as SchemaMethodResult, v as Options, w as Resolver, x as Ref, y as Override } from "./createGenerator-DoZXEhFy.js";
2
- import { a as SchemaMapper, c as schemaKeywords, i as SchemaKeywordMapper, n as SchemaKeyword, o as SchemaTree, r as SchemaKeywordBase, s as isKeyword, t as Schema } from "./SchemaMapper-m5TKynWt.js";
1
+ import { A as PluginFactoryOptions, C as ResolvePathOptions, D as Config, M as UserPluginWithLifeCycle, S as Refs, _ as OperationSchemas, b as PluginOas, c as SchemaGeneratorBuildOptions, d as OperationGenerator, f as OperationMethodResult, g as OperationSchema, h as Include, i as ReactGenerator, k as Plugin, l as SchemaGeneratorOptions, m as Exclude, o as GetSchemaGeneratorOptions, p as API, s as SchemaGenerator, u as SchemaMethodResult, v as Options, w as Resolver, x as Ref, y as Override } from "./createGenerator-BvCDyuKS.js";
2
+ import { a as SchemaMapper, c as schemaKeywords, i as SchemaKeywordMapper, m as SchemaObject, n as SchemaKeyword, o as SchemaTree, p as Operation, r as SchemaKeywordBase, s as isKeyword, t as Schema } from "./SchemaMapper-Cj3vjPGs.js";
3
3
  import { Fabric } from "@kubb/react-fabric";
4
4
 
5
5
  //#region src/plugin.d.ts
package/dist/mocks.d.cts CHANGED
@@ -1,4 +1,4 @@
1
- import { t as Schema } from "./SchemaMapper-CX7sIIuZ.cjs";
1
+ import { t as Schema } from "./SchemaMapper-CgGWx6jF.cjs";
2
2
 
3
3
  //#region src/mocks/schemas.d.ts
4
4
  declare const schemas: {
package/dist/mocks.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { t as Schema } from "./SchemaMapper-m5TKynWt.js";
1
+ import { t as Schema } from "./SchemaMapper-Cj3vjPGs.js";
2
2
 
3
3
  //#region src/mocks/schemas.d.ts
4
4
  declare const schemas: {
package/dist/utils.d.cts CHANGED
@@ -1,5 +1,5 @@
1
- import { A as SchemaObject$1, D as OpenAPIV3$1, E as OasTypes, N as Config, O as OpenAPIV3_1, P as Output, T as Oas, g as OperationSchema, j as contentType, k as Operation } from "./createGenerator-BZv3BSD_.cjs";
2
- import "./SchemaMapper-CX7sIIuZ.cjs";
1
+ import { D as Config, O as Output, T as Oas, g as OperationSchema } from "./createGenerator-CPNglV1d.cjs";
2
+ import { d as OpenAPIV3$1, f as OpenAPIV3_1, h as contentType, m as SchemaObject$1, p as Operation, u as OasTypes } from "./SchemaMapper-CgGWx6jF.cjs";
3
3
  import { OASDocument, SchemaObject } from "oas/types";
4
4
  import { OpenAPIV3 } from "openapi-types";
5
5
  import { Params } from "@kubb/react-fabric/types";
package/dist/utils.d.ts CHANGED
@@ -1,5 +1,5 @@
1
- import { A as SchemaObject$1, D as OpenAPIV3$1, E as OasTypes, N as Config, O as OpenAPIV3_1, P as Output, T as Oas, g as OperationSchema, j as contentType, k as Operation } from "./createGenerator-DoZXEhFy.js";
2
- import "./SchemaMapper-m5TKynWt.js";
1
+ import { D as Config, O as Output, T as Oas, g as OperationSchema } from "./createGenerator-BvCDyuKS.js";
2
+ import { d as OpenAPIV3$1, f as OpenAPIV3_1, h as contentType, m as SchemaObject$1, p as Operation, u as OasTypes } from "./SchemaMapper-Cj3vjPGs.js";
3
3
  import { OASDocument, SchemaObject } from "oas/types";
4
4
  import { OpenAPIV3 } from "openapi-types";
5
5
  import { Params } from "@kubb/react-fabric/types";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kubb/plugin-oas",
3
- "version": "0.0.0-canary-20251103140549",
3
+ "version": "0.0.0-canary-20251103161135",
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": "0.0.0-canary-20251103140549",
87
- "@kubb/oas": "0.0.0-canary-20251103140549"
86
+ "@kubb/core": "0.0.0-canary-20251103161135",
87
+ "@kubb/oas": "0.0.0-canary-20251103161135"
88
88
  },
89
89
  "devDependencies": {},
90
90
  "peerDependencies": {
@@ -1,4 +1,5 @@
1
1
  import type { KubbFile } from '@kubb/fabric-core/types'
2
+ import type { SchemaObject } from '@kubb/oas'
2
3
 
3
4
  export type SchemaKeywordMapper = {
4
5
  object: {
@@ -161,6 +162,7 @@ export type SchemaKeywordBase<T> = {
161
162
  export type Schema = { keyword: string } | SchemaKeywordMapper[keyof SchemaKeywordMapper]
162
163
 
163
164
  export type SchemaTree = {
165
+ schema: SchemaObject
164
166
  parent: Schema | undefined
165
167
  current: Schema
166
168
  siblings: Schema[]