Skip to content

Commit

Permalink
fix: include patternProperties in object schema
Browse files Browse the repository at this point in the history
  • Loading branch information
aleclarson committed Mar 16, 2024
1 parent 12ec0e1 commit 6159593
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .vscode/settings.json
@@ -0,0 +1,5 @@
{
"[typescript]": {
"editor.defaultFormatter": "vscode.typescript-language-features"
}
}
7 changes: 6 additions & 1 deletion src/utils.ts
Expand Up @@ -130,6 +130,7 @@ export const registerSchemaPath = ({
properties,
required,
additionalProperties,
patternProperties,
...rest
} = responseSchema as typeof responseSchema & {
type: string
Expand All @@ -147,6 +148,7 @@ export const registerSchemaPath = ({
? ({
type,
properties,
patternProperties,
items: responseSchema.items,
required
} as any)
Expand All @@ -165,7 +167,8 @@ export const registerSchemaPath = ({
type,
properties,
required,
additionalProperties: _,
additionalProperties: _1,
patternProperties: _2,
...rest
} = models[value] as TSchema & {
type: string
Expand All @@ -184,6 +187,7 @@ export const registerSchemaPath = ({
properties,
required,
additionalProperties,
patternProperties,
...rest
} = value as typeof value & {
type: string
Expand All @@ -200,6 +204,7 @@ export const registerSchemaPath = ({
? ({
type: rest.type,
properties,
patternProperties,
items: value.items,
required
} as any)
Expand Down

0 comments on commit 6159593

Please sign in to comment.