@kubb/oas 4.21.2 → 4.22.0

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/oas",
3
- "version": "4.21.2",
3
+ "version": "4.22.0",
4
4
  "description": "OpenAPI Specification (OAS) utilities and helpers for Kubb, providing parsing, normalization, and manipulation of OpenAPI/Swagger schemas.",
5
5
  "keywords": [
6
6
  "openapi",
@@ -53,14 +53,14 @@
53
53
  }
54
54
  ],
55
55
  "dependencies": {
56
- "@redocly/openapi-core": "^2.16.0",
56
+ "@redocly/openapi-core": "^2.17.0",
57
57
  "jsonpointer": "^5.0.1",
58
58
  "oas": "^28.9.0",
59
59
  "oas-normalize": "^15.7.1",
60
60
  "openapi-types": "^12.1.3",
61
- "remeda": "^2.33.5",
61
+ "remeda": "^2.33.6",
62
62
  "swagger2openapi": "^7.0.8",
63
- "@kubb/core": "4.21.2"
63
+ "@kubb/core": "4.22.0"
64
64
  },
65
65
  "devDependencies": {
66
66
  "@stoplight/yaml": "^4.3.0",
package/src/utils.ts CHANGED
@@ -2,6 +2,7 @@ import path from 'node:path'
2
2
  import type { Config } from '@kubb/core'
3
3
  import { pascalCase } from '@kubb/core/transformers'
4
4
  import { URLPath } from '@kubb/core/utils'
5
+ import { bundle, loadConfig } from '@redocly/openapi-core'
5
6
  import yaml from '@stoplight/yaml'
6
7
  import type { ParameterObject, SchemaObject } from 'oas/types'
7
8
  import { isRef, isSchema } from 'oas/types'
@@ -164,8 +165,6 @@ export async function parse(
164
165
  pathOrApi: string | Document,
165
166
  { oasClass = Oas, canBundle = true, enablePaths = true }: { oasClass?: typeof Oas; canBundle?: boolean; enablePaths?: boolean } = {},
166
167
  ): Promise<Oas> {
167
- const { loadConfig, bundle } = await import('@redocly/openapi-core')
168
-
169
168
  if (typeof pathOrApi === 'string' && canBundle) {
170
169
  // resolve external refs
171
170
  const config = await loadConfig()