@kubb/oas
Advanced tools
Comparing version 0.0.0-canary-20250124174549 to 0.0.0-canary-20250204223927
@@ -24,3 +24,3 @@ import { matchesMimeType } from 'oas/utils'; | ||
#options = {}; | ||
document = void 0; | ||
document = undefined; | ||
constructor({ oas, user }, options = {}) { | ||
@@ -63,3 +63,3 @@ if (typeof oas === "string") { | ||
const schemas = this.api.components?.schemas || {}; | ||
Object.entries(schemas).forEach(([key, schemaObject]) => { | ||
Object.entries(schemas).forEach(([_key, schemaObject]) => { | ||
if ("discriminator" in schemaObject) { | ||
@@ -116,3 +116,3 @@ const { mapping = {}, propertyName } = schemaObject.discriminator || {}; | ||
} | ||
let availablecontentType = void 0; | ||
let availablecontentType = undefined; | ||
const contentTypes = Object.keys(responseBody.content); | ||
@@ -141,3 +141,3 @@ contentTypes.forEach((mt) => { | ||
const schema2 = operation.schema.responses[key]; | ||
const $ref = isReference(schema2) ? schema2.$ref : void 0; | ||
const $ref = isReference(schema2) ? schema2.$ref : undefined; | ||
if (schema2 && $ref) { | ||
@@ -167,7 +167,7 @@ operation.schema.responses[key] = this.get($ref); | ||
if (requestBody === false) { | ||
return void 0; | ||
return undefined; | ||
} | ||
const schema = Array.isArray(requestBody) ? requestBody[1].schema : requestBody.schema; | ||
if (!schema) { | ||
return void 0; | ||
return undefined; | ||
} | ||
@@ -187,3 +187,3 @@ return this.dereferenceWithRef(schema); | ||
const property = pathParameters.content?.[contentType]?.schema ?? pathParameters.schema; | ||
const required = [...schema.required || [], pathParameters.required ? pathParameters.name : void 0].filter(Boolean); | ||
const required = [...schema.required || [], pathParameters.required ? pathParameters.name : undefined].filter(Boolean); | ||
return { | ||
@@ -190,0 +190,0 @@ ...schema, |
{ | ||
"name": "@kubb/oas", | ||
"version": "0.0.0-canary-20250124174549", | ||
"version": "0.0.0-canary-20250204223927", | ||
"description": "Oas helpers", | ||
@@ -51,10 +51,10 @@ "keywords": [ | ||
"dependencies": { | ||
"@redocly/openapi-core": "^1.27.2", | ||
"@redocly/openapi-core": "^1.28.2", | ||
"hotscript": "^1.0.13", | ||
"json-schema-to-ts": "^3.1.1", | ||
"jsonpointer": "^5.0.1", | ||
"oas": "^25.2.2", | ||
"oas": "^25.3.0", | ||
"oas-normalize": "^11.1.4", | ||
"openapi-types": "^12.1.3", | ||
"remeda": "^2.20.0", | ||
"remeda": "^2.20.1", | ||
"swagger2openapi": "^7.0.8", | ||
@@ -67,6 +67,6 @@ "ts-toolbelt": "^9.6.0" | ||
"expect-type": "^1.1.0", | ||
"tsup": "^8.3.5", | ||
"tsup": "^8.3.6", | ||
"typescript": "^5.7.3", | ||
"@kubb/config-ts": "0.0.0-canary-20250124174549", | ||
"@kubb/config-tsup": "0.0.0-canary-20250124174549" | ||
"@kubb/config-ts": "0.0.0-canary-20250204223927", | ||
"@kubb/config-tsup": "0.0.0-canary-20250204223927" | ||
}, | ||
@@ -73,0 +73,0 @@ "engines": { |
@@ -67,3 +67,3 @@ import BaseOas from 'oas' | ||
Object.entries(schemas).forEach(([key, schemaObject]) => { | ||
Object.entries(schemas).forEach(([_key, schemaObject]) => { | ||
if ('discriminator' in schemaObject) { | ||
@@ -70,0 +70,0 @@ const { mapping = {}, propertyName } = (schemaObject.discriminator || {}) as OpenAPIV3.DiscriminatorObject |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
126902
+ Added@redocly/openapi-core@1.28.5(transitive)
+ Addedtype-fest@4.34.1(transitive)
- Removed@redocly/openapi-core@1.28.3(transitive)
- Removedtype-fest@4.33.0(transitive)
Updatedoas@^25.3.0
Updatedremeda@^2.20.1