Skip to content

Conversation

RobbeSneyders
Copy link
Member

This PR fixes an issue introduced in #2002, and the original issue #2002 was trying to address.

The original issue was that a cloned spec did not have properly resolved references. #2002 fixed this incorrectly by cloning the resolved spec, while the Spec initializer expects a raw spec.

This PR fixes this by cloning the raw spec, and passing the base_uri required to resolve it along to the initializer of the new Spec instance.

The swagger ui was also updated to use the resolved spec instead of the raw spec.

Supersedes:
#1889
#2080

Fixes:
#1890
#1909
#2028
#2029

@chrisinmtown
Copy link
Contributor

chrisinmtown commented Oct 13, 2025

I would like to suggest adding a test for the clone method to test this directly, confirm the base URI is cached. I don't understand the change well enough yet to offer a better test that checks the failure directly.

@RobbeSneyders RobbeSneyders force-pushed the bugfix/swagger-ui-clone branch from ae9df80 to 8adef16 Compare October 13, 2025 11:17
@RobbeSneyders
Copy link
Member Author

Thanks @chrisinmtown, I expanded the test to include a clone step and reevaluate the cloned specification.

@coveralls
Copy link

Coverage Status

coverage: 94.297% (+0.005%) from 94.292%
when pulling 8adef16 on bugfix/swagger-ui-clone
into 0bf9d1f on main.

@RobbeSneyders RobbeSneyders merged commit f22a7a7 into main Oct 13, 2025
10 checks passed
@RobbeSneyders RobbeSneyders deleted the bugfix/swagger-ui-clone branch October 13, 2025 11:22
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.

3 participants