Skip to content

Commit

Permalink
add anyOf support to imported-schema resolver
Browse files Browse the repository at this point in the history
  • Loading branch information
omermecitoglu committed Jun 14, 2024
1 parent 437a0b7 commit 4cd20db
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 14 deletions.
24 changes: 12 additions & 12 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@omer-x/next-openapi-interface-generator",
"version": "0.8.0",
"version": "0.8.1",
"description": "OpenAPI interface generator for Next.js",
"keywords": [
"next",
Expand Down Expand Up @@ -43,7 +43,7 @@
"dev": "webpack build --progress --mode=development --watch"
},
"dependencies": {
"@omer-x/next-openapi-json-generator": "^0.1.4",
"@omer-x/next-openapi-json-generator": "^0.2.0",
"handlebars": "^4.7.8",
"yargs": "^17.7.2"
},
Expand Down
3 changes: 3 additions & 0 deletions src/core/resolvers/imported-schema.ts
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,9 @@ function resolvePropDefinition(definition: SchemaObject) {
if (definition.oneOf) {
return definition.oneOf.map<string[]>(resolvePropDefinition).flat();
}
if (definition.anyOf) {
return definition.anyOf.map<string[]>(resolvePropDefinition).flat();
}
return [];
}

Expand Down

0 comments on commit 4cd20db

Please sign in to comment.