Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: include patternProperties in object schema #106

Merged
merged 1 commit into from Mar 20, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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