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 460f4eb
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions 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 All @@ -218,7 +223,8 @@ export const registerSchemaPath = ({
type,
properties,
required,
additionalProperties: _,
additionalProperties: _1,
patternProperties: _2,
...rest
} = models[responseSchema] as TSchema & {
type: string
Expand Down

0 comments on commit 460f4eb

Please sign in to comment.