8000 fix(resolver): use spec compliant JSON Pointer implementation by char0n · Pull Request #3920 · swagger-api/swagger-js · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

fix(resolver): use spec compliant JSON Pointer implementation #3920

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

Merged
merged 1 commit into from
May 15, 2025

Conversation

char0n
Copy link
Member
@char0n char0n commented May 15, 2025

No description provided.

Copy link
@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This pull request updates the resolver to use a spec-compliant JSON Pointer implementation. Key changes include updates to error messages in tests, switching to the new modern JSON Pointer module with updated parameter ordering in evaluation calls, and dependency version bumps in package.json.

Reviewed Changes

Copilot reviewed 7 out of 7 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
test/resolver/apidom/reference/dereference/strategies/openapi-3-1-swagger-client/schema-object/index.js Updates error message regex to reflect the new JSON Pointer error output.
test/resolver/apidom/reference/dereference/strategies/openapi-3-1-swagger-client/path-item-object/index.js Adjusts error message regex consistent with the modern implementation.
src/resolver/strategies/openapi-3-1-apidom/resolve.js Switches to '@swagger-api/apidom-json-pointer/modern' and inverts the argument order for jsonPointerEvaluate; refines error handling.
src/resolver/apidom/reference/dereference/strategies/openapi-3-1-swagger-client/visitors/dereference.js Updates JSON Pointer calls to use the new modern module and adjusts parameter order accordingly.
package.json Bumps apidom dependency versions from beta.31 to beta.37.
.eslintrc.js Adds the modern JSON Pointer module to the ESLint allowed import list.
Comments suppressed due to low confidence (2)

src/resolver/apidom/reference/dereference/strategies/openapi-3-1-swagger-client/visitors/dereference.js:123

  • Confirm that the updated parameter order in jsonPointerEvaluate calls is consistent with the intended usage from the new @swagger-api/apidom-json-pointer/modern module across all invocations.
let referencedElement = jsonPointerEvaluate(reference.value.result, jsonPointer);

src/resolver/strategies/openapi-3-1-apidom/resolve.js:162

  • Ensure that replacing multiple error types with a single JSONPointerEvaluateError covers all failure modes that were previously handled.
if (error instanceof JSONPointerEvaluateError) {

@char0n char0n merged commit 4a39db7 into master May 15, 2025
8 checks passed
@char0n char0n deleted the char0n/apidom-beta.37 branch May 15, 2025 08:35
swagger-bot pushed a commit that referenced this pull request May 15, 2025
## [3.35.1](v3.35.0...v3.35.1) (2025-05-15)

### Bug Fixes

* **resolver:** use spec compliant JSON Pointer implementation ([#3920](#3920)) ([4a39db7](4a39db7))
@swagger-bot
Copy link
Contributor

🎉 This PR is included in version 3.35.1 🎉

The release is available on:

Your semantic-release bot 📦🚀

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

Successfully merging this pull request may close these issues.

3 participants
0