Skip to content
New issue

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

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

Already on GitHub? # to your account

fix(resolver): cache for OpenAPI 3.1 normalization #3281

Merged
merged 3 commits into from
Dec 14, 2023

Conversation

jux61
Copy link
Contributor

@jux61 jux61 commented Dec 14, 2023

Description

Bad cache behavior for OpenAPI 3.1 normalization
When a normalized spec is cached, it returned the input spec instead of the cached one

Motivation and Context

swagger-ui issue 8971(swagger-api/swagger-ui#8971)
Parameters defined at path level are not visible for contracts openapi 3.1

How Has This Been Tested?

Add one unit test

Screenshots (if appropriate):

Types of changes

  • No code changes (changes to documentation, CI, metadata, etc)
  • Dependency changes (any modification to dependencies in package.json)
  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have added tests to cover my changes.
  • All new and existing tests passed.

Copy link
Member

@char0n char0n left a comment

Choose a reason for hiding this comment

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

Overall the logic is fine, thanks for catching this bug. I'll do some small changes to test.

@char0n char0n merged commit c90fa37 into swagger-api:master Dec 14, 2023
5 checks passed
swagger-bot pushed a commit that referenced this pull request Dec 14, 2023
## [3.24.6](v3.24.5...v3.24.6) (2023-12-14)

### Bug Fixes

* **resolver:** returned cached item for OpenAPI 3.1 normalization ([#3281](#3281)) ([c90fa37](c90fa37))
@swagger-bot
Copy link
Contributor

🎉 This PR is included in version 3.24.6 🎉

The release is available on:

Your semantic-release bot 📦🚀

@jux61 jux61 deleted the bug/resolver-openapi-3-1-normalize branch April 8, 2024 06:58
# for free to join this conversation on GitHub. Already have an account? # to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants