Skip to content

Conversation

@percivalalb
Copy link
Contributor

A bug fix for code added in #955 for a seldom run code path with recursive refs

  • The local part was not included when visiting components during recursion
  • Also handles the case when base path is null when loading files data in memory
  • Copy uri.URL elements to avoid manipulation from outside source

* The local part was not included when visiting components during
  recursion
* Also handles the case when base path is null when loading files
  data in memory
* Copy uri.URL elements to avoid manipulation from outside source
@fenollp fenollp changed the title Include local reference parts in refPath saved openapi3: include local reference parts in refPath saved Jul 7, 2024
Copy link
Collaborator

@fenollp fenollp left a comment

Choose a reason for hiding this comment

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

LGTM. Any regression tests to include before we merge this?

@percivalalb
Copy link
Contributor Author

LGTM. Any regression tests to include before we merge this?

I thought you might ask :P, I will look at adding at least one direct test of the refPath of component references. There are a good amount of indirect tests (like internalise reference naming) but not for this particular case. I want to do that later today, we'll see if that happens

@percivalalb
Copy link
Contributor Author

Struggling to come up with test case, ideally we'd like to walk through the referenced components in a document. That almost involves re-implementing the resolving in loader.go. I think there are sufficent test cases for most the logic, up to you if you merge prior to additional tests for this specific case. I'll have to come back to this another time

@fenollp fenollp merged commit 3e230a6 into getkin:master Jul 7, 2024
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