@kubb/oas
Advanced tools
Comparing version 0.0.0-canary-20240429225457 to 0.0.0-canary-20240430202901
@@ -38,4 +38,4 @@ export { H as HttpMethods, O as Oas, S as SchemaObject, c as contentType } from './Oas-BEe7KZDj.js'; | ||
filterSet?: { | ||
methods?: Array<'get' | 'post' | 'put' | 'patch' | 'delete' | 'options' | 'trace' | 'head'> | ||
inverseMethods?: Array<'get' | 'post' | 'put' | 'patch' | 'delete' | 'options' | 'trace' | 'head'> | ||
methods?: Array<'get' | 'post' | 'put' | 'patch' | 'delete' | 'options' | 'trace' | 'head' | 'parameters'> | ||
inverseMethods?: Array<'get' | 'post' | 'put' | 'patch' | 'delete' | 'options' | 'trace' | 'head' | 'parameters'> | ||
tags?: Array<string> | ||
@@ -42,0 +42,0 @@ inverseTags?: Array<string> |
@@ -7,3 +7,3 @@ import { | ||
isRequired | ||
} from "./chunk-77RG7VLQ.js"; | ||
} from "./chunk-CZ4K2DXZ.js"; | ||
@@ -10,0 +10,0 @@ // src/types.ts |
@@ -28,4 +28,4 @@ import { O as Oas } from './Oas-BEe7KZDj.js'; | ||
filterSet?: { | ||
methods?: Array<'get' | 'post' | 'put' | 'patch' | 'delete' | 'options' | 'trace' | 'head'>; | ||
inverseMethods?: Array<'get' | 'post' | 'put' | 'patch' | 'delete' | 'options' | 'trace' | 'head'>; | ||
methods?: Array<'get' | 'post' | 'put' | 'patch' | 'delete' | 'options' | 'trace' | 'head' | 'parameters'>; | ||
inverseMethods?: Array<'get' | 'post' | 'put' | 'patch' | 'delete' | 'options' | 'trace' | 'head' | 'parameters'>; | ||
tags?: Array<string>; | ||
@@ -32,0 +32,0 @@ inverseTags?: Array<string>; |
@@ -5,3 +5,3 @@ import { | ||
isOpenApiV2Document | ||
} from "./chunk-77RG7VLQ.js"; | ||
} from "./chunk-CZ4K2DXZ.js"; | ||
@@ -23,3 +23,5 @@ // src/parser/index.ts | ||
if (isOpenApiV2Document(document)) { | ||
const { openapi } = await swagger2openapi.convertObj(document, { anchors: true }); | ||
const { openapi } = await swagger2openapi.convertObj(document, { | ||
anchors: true | ||
}); | ||
const oas2 = await filterAndSort(openapi, options); | ||
@@ -26,0 +28,0 @@ return new Oas({ oas: oas2 }); |
{ | ||
"name": "@kubb/oas", | ||
"version": "0.0.0-canary-20240429225457", | ||
"version": "0.0.0-canary-20240430202901", | ||
"description": "Oas helpers", | ||
@@ -67,5 +67,5 @@ "keywords": [ | ||
"typescript": "^5.4.5", | ||
"@kubb/biome-config": "0.1.0", | ||
"@kubb/ts-config": "0.1.0", | ||
"@kubb/tsup-config": "1.1.8", | ||
"@kubb/biome-config": "0.1.0" | ||
"@kubb/tsup-config": "1.1.8" | ||
}, | ||
@@ -72,0 +72,0 @@ "engines": { |
@@ -32,4 +32,4 @@ import OASNormalize from 'oas-normalize' | ||
filterSet?: { | ||
methods?: Array<'get' | 'post' | 'put' | 'patch' | 'delete' | 'options' | 'trace' | 'head'> | ||
inverseMethods?: Array<'get' | 'post' | 'put' | 'patch' | 'delete' | 'options' | 'trace' | 'head'> | ||
methods?: Array<'get' | 'post' | 'put' | 'patch' | 'delete' | 'options' | 'trace' | 'head' | 'parameters'> | ||
inverseMethods?: Array<'get' | 'post' | 'put' | 'patch' | 'delete' | 'options' | 'trace' | 'head' | 'parameters'> | ||
tags?: Array<string> | ||
@@ -68,3 +68,5 @@ inverseTags?: Array<string> | ||
if (isOpenApiV2Document(document)) { | ||
const { openapi } = await swagger2openapi.convertObj(document, { anchors: true }) | ||
const { openapi } = await swagger2openapi.convertObj(document, { | ||
anchors: true, | ||
}) | ||
@@ -71,0 +73,0 @@ const oas = await filterAndSort(openapi as OASDocument, options) |
@@ -24,4 +24,4 @@ declare module 'openapi-format' { | ||
filterSet?: { | ||
methods?: Array<'get' | 'post' | 'put' | 'patch' | 'delete' | 'options' | 'trace' | 'head'> | ||
inverseMethods?: Array<'get' | 'post' | 'put' | 'patch' | 'delete' | 'options' | 'trace' | 'head'> | ||
methods?: Array<'get' | 'post' | 'put' | 'patch' | 'delete' | 'options' | 'trace' | 'head' | 'parameters'> | ||
inverseMethods?: Array<'get' | 'post' | 'put' | 'patch' | 'delete' | 'options' | 'trace' | 'head' | 'parameters'> | ||
tags?: Array<string> | ||
@@ -28,0 +28,0 @@ inverseTags?: Array<string> |
@@ -65,3 +65,3 @@ import { isRef, isSchema } from 'oas/types' | ||
filterSet: { | ||
inverseMethods: ['get', 'put', 'post', 'delete', 'patch', 'head', 'options', 'trace'], | ||
inverseMethods: ['get', 'put', 'post', 'delete', 'patch', 'head', 'options', 'trace', 'parameters'], | ||
unusedComponents: options.filterSet ? ['requestBodies', 'schemas', 'parameters', 'responses'] : [], | ||
@@ -68,0 +68,0 @@ ...options.filterSet, |
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
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
147595
1918