Skip to content

fix: don't change input schema during parsing#279

Open
pvdbosch wants to merge 11 commits into
asyncapi:masterfrom
pvdbosch:fix/update-openapi-schema-to-json-schema
Open

fix: don't change input schema during parsing#279
pvdbosch wants to merge 11 commits into
asyncapi:masterfrom
pvdbosch:fix/update-openapi-schema-to-json-schema

Conversation

@pvdbosch

Copy link
Copy Markdown

Description

Updates @openapi-contrib/openapi-schema-to-json-schema to 5.1.0

Currently used version modifies the input data when transforming from OpenAPI to JSON draft4 schema , even though cloneSchema: true is used.
This leads to the bug described in #275 when the same schema is transformed multiple times during parsing.

This PR updates the dependency fixing this bug, and adds a test case to validate the fix.
Some type casting is necessary, because the updated dependency uses stricter typing.

This is an alternative fix to #276, which worked around the bug by cloning the input.

Related issue(s)

Resolves #275

fmvilas
fmvilas previously approved these changes Oct 1, 2025

@fmvilas fmvilas left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 👍

@sonarqubecloud

sonarqubecloud Bot commented Oct 1, 2025

Copy link
Copy Markdown

@pvdbosch

pvdbosch commented Oct 1, 2025

Copy link
Copy Markdown
Author

I added a commit to fix the build problem : the URL of my company's npm mirror was mistakenly used in package-lock.json

@pvdbosch

Copy link
Copy Markdown
Author

@fmvilas , could you review this change again? The build problem (in package-lock.json) should be fixed now.

@sonarqubecloud

sonarqubecloud Bot commented Feb 6, 2026

Copy link
Copy Markdown

@sonarqubecloud

Copy link
Copy Markdown

@pvdbosch pvdbosch requested a review from AayushSaini101 as a code owner May 5, 2026 09:49
@sonarqubecloud

sonarqubecloud Bot commented May 5, 2026

Copy link
Copy Markdown

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.

[BUG] Parsing fails for schema that's referenced multiple times

2 participants