Skip to content

Conversation

@daveshanley
Copy link
Member

@daveshanley daveshanley commented Dec 21, 2025

Address #309
Address #471

@codecov
Copy link

codecov bot commented Dec 21, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 99.59%. Comparing base (3bb251f) to head (a89430f).
⚠️ Report is 8 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #491      +/-   ##
==========================================
- Coverage   99.59%   99.59%   -0.01%     
==========================================
  Files         175      179       +4     
  Lines       21700    22013     +313     
==========================================
+ Hits        21613    21924     +311     
- Misses         55       57       +2     
  Partials       32       32              
Flag Coverage Δ
unittests 99.59% <100.00%> (-0.01%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Copy link
Contributor

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 PR fixes issue #485 by preserving hash characters (#) in OpenAPI component names instead of incorrectly replacing them with dollar signs ($). The leading # in JSON Pointer notation (e.g., #/components/...) is already stripped during path splitting, so any # characters within actual component names (like async_search.submit#wait_for_completion_timeout from Elasticsearch specs) should be preserved literally in the generated JSONPath queries.

Key Changes

  • Removed the # to $ character replacement logic from the final path assembly in ConvertComponentIdIntoFriendlyPathSearch
  • Updated existing tests to reflect the corrected behavior where # is preserved in component names
  • Added comprehensive test coverage for issue #485 with 7 new test functions covering various edge cases

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
utils/utils.go Removed character replacement loops that converted # to $ in the final path assembly, added clarifying comments explaining why # should be preserved
utils_test.go Updated 9 existing test assertions to expect # instead of $ in paths, added 7 new test functions specifically for issue #485 covering real-world cases and edge scenarios

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

`$id` is now fully supported, and will also perform the correct resolution chain. Bringing `libopenain` completely inline with JSON Schema 2020-12

When schemas declare $id, relative $ref values should resolve against that $id per JSON Schema 2020-12 spec. Previously, libopenapi would try to find files directly instead of resolving against the $id base URI.

  components:
    schemas:
      s1:
        $id: "https://example.com/a.json"
        type: string
      s2:
        $ref: "a.json"  # Should resolve to s1 via its $id
Copy link
Contributor

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

Copilot reviewed 22 out of 22 changed files in this pull request and generated 4 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

some code can’t be reached, therefore it should not exist.
the rest are trash, but this is legit.
I am not going to re-build the functions myself, there is little gain, however I have documented the behavior clearly.
@daveshanley daveshanley merged commit e247a28 into main Dec 22, 2025
4 checks passed
@daveshanley daveshanley deleted the v0.30.5 branch December 22, 2025 16:33
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.

2 participants