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: correct wrong behavior of the key property named deprecated (#626) #651

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

BatLeDev
Copy link

@BatLeDev BatLeDev commented Feb 11, 2025

This pull request introduces changes to handle the deprecated property in JSON schemas more effectively. The main updates include modifications to the validation logic, test snapshots, and end-to-end tests.

Handling deprecated property:

  • src/validator.ts: Added a check to ensure that if deprecated is present in properties, it returns true, allowing the schema validation to pass.

Test updates:

Spec OpenAPI

According to the OpenAPI 3.1 specification, the deprecated property is a valid keyword in schemas and operation objects. This update ensures that the validation logic properly recognizes deprecated as a legitimate property, preventing unnecessary errors when processing OpenAPI-compliant JSON schemas.

Reference: OpenAPI 3.1 Specification - Operation Object

fix #626

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.

The key property named deprecated is wrong behavior
1 participant