Skip to content
This repository was archived by the owner on Jan 6, 2025. It is now read-only.

Commit 88d427d

Browse files
authored
Merge pull request #12 from wrtnio/features/schema
Fix `ISwaggerSchema.IOneOf` type.
2 parents 982e635 + c3cc774 commit 88d427d

File tree

2 files changed

+7
-4
lines changed

2 files changed

+7
-4
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@wrtnio/openai-function-schema",
3-
"version": "0.1.2",
3+
"version": "0.1.3",
44
"description": "OpenAI LLM function schema from OpenAPI (Swagger) document",
55
"main": "lib/index.js",
66
"typings": "lib/index.d.ts",

src/structures/ISwaggerSchema.ts

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -120,9 +120,12 @@ export namespace ISwaggerSchema {
120120
* defined `anyOf` instead of the `oneOf`, {@link OpenApi} forcibly
121121
* converts it to `oneOf` type.
122122
*/
123-
export interface IOneOf
124-
extends OpenApi.IJsonSchema.IOneOf<ISwaggerSchema>,
125-
__IPlugin {}
123+
export interface IOneOf extends OpenApi.IJsonSchema.__IAttribute, __IPlugin {
124+
/**
125+
* List of the union types.
126+
*/
127+
oneOf: Exclude<ISwaggerSchema, ISwaggerSchema.IOneOf>[];
128+
}
126129

127130
/**
128131
* Null type.

0 commit comments

Comments
 (0)