Skip to content

Validate OpenAPI 2 responses against status-specific schemas - #482

Open
ydah wants to merge 1 commit into
masterfrom
fix-openapi2-response-schemas
Open

Validate OpenAPI 2 responses against status-specific schemas#482
ydah wants to merge 1 commit into
masterfrom
fix-openapi2-response-schemas

Conversation

@ydah

@ydah ydah commented Sep 8, 2026

Copy link
Copy Markdown
Member

OpenAPI 2 response validation creates a validator for each response status, but initializes every validator with link.target_schema. Because that method selects a preferred success schema, responses for statuses such as 400 are also validated against the success schema.

Initialize each validator with the schema associated with its status in link.target_schemas.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant