@kubb/oas 4.12.4 → 4.12.6

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.12.4",
3
+ "version": "4.12.6",
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",
package/src/utils.ts CHANGED
@@ -139,7 +139,7 @@ export async function merge(pathOrApi: Array<string | OASDocument>, { oasClass =
139
139
  export function parseFromConfig(config: Config, oasClass: typeof Oas = Oas): Promise<Oas> {
140
140
  if ('data' in config.input) {
141
141
  if (typeof config.input.data === 'object') {
142
- const api: OasTypes.OASDocument = JSON.parse(JSON.stringify(config.input.data)) as OasTypes.OASDocument
142
+ const api: OasTypes.OASDocument = structuredClone(config.input.data) as OasTypes.OASDocument
143
143
  return parse(api, { oasClass })
144
144
  }
145
145