@kubb/adapter-oas 5.0.0-alpha.3 → 5.0.0-alpha.5

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kubb/adapter-oas",
3
- "version": "5.0.0-alpha.3",
3
+ "version": "5.0.0-alpha.5",
4
4
  "description": "OpenAPI / Swagger adapter for Kubb — converts OAS input into a @kubb/ast RootNode.",
5
5
  "keywords": [
6
6
  "openapi",
@@ -36,8 +36,8 @@
36
36
  "!/**/__snapshots__/**"
37
37
  ],
38
38
  "dependencies": {
39
- "@kubb/fabric-core": "0.13.3",
40
- "@redocly/openapi-core": "^2.22.1",
39
+ "@kubb/fabric-core": "0.14.0",
40
+ "@redocly/openapi-core": "^2.23.0",
41
41
  "@stoplight/yaml": "^4.3.0",
42
42
  "fflate": "^0.8.2",
43
43
  "jsonpointer": "^5.0.1",
@@ -46,8 +46,8 @@
46
46
  "openapi-types": "^12.1.3",
47
47
  "remeda": "^2.33.6",
48
48
  "swagger2openapi": "^7.0.8",
49
- "@kubb/ast": "5.0.0-alpha.3",
50
- "@kubb/core": "5.0.0-alpha.3"
49
+ "@kubb/ast": "5.0.0-alpha.5",
50
+ "@kubb/core": "5.0.0-alpha.5"
51
51
  },
52
52
  "devDependencies": {
53
53
  "@types/swagger2openapi": "^7.0.4",
package/src/parser.ts CHANGED
@@ -569,6 +569,10 @@ export function createOasParser(oas: Oas, { contentType, collisionDetection }: O
569
569
  if (specialType === 'number' || specialType === 'integer' || specialType === 'bigint') {
570
570
  return createSchema({ ...base, primitive: specialPrimitive, type: specialType })
571
571
  }
572
+ if (specialType === 'url') {
573
+ return createSchema({ ...base, primitive: 'string' as const, type: 'url' })
574
+ }
575
+
572
576
  return createSchema({ ...base, primitive: specialPrimitive, type: specialType as ScalarSchemaType })
573
577
  }
574
578
 
@@ -969,7 +973,7 @@ export function createOasParser(oas: Oas, { contentType, collisionDetection }: O
969
973
  in: param['in'] as ParameterLocation,
970
974
  schema: {
971
975
  ...schema,
972
- optional: (!required || !!schema.optional) ? true : undefined,
976
+ optional: !required || !!schema.optional ? true : undefined,
973
977
  },
974
978
  required,
975
979
  })