fix: serve external $ref fixtures from a local HTTP server in tests#103
Merged
Conversation
SebastianDT1
approved these changes
May 5, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Pull request type
Please check the type of change your PR introduces:
What is the current behavior?
Issue Number: N/A
Several external
$reftests resolve their references againsthttps://raw.githubusercontent.com/apiaddicts/sonaropenapi-rules/.... This forces the test suite to make outbound HTTPS calls to GitHub duringmvn test, which fails in restricted or offline environments (corporate networks, CI runners without egress, air-gapped setups) and also makes the tests dependent on the availability of GitHub and on the contents of themasterbranch at test time.Affected tests: OAR031 (v2 and v3), OAR094, OAR068, OAR086.
What is the new behavior?
ExternalRefHttpServerthat starts a lightweight in-process HTTP server onhttp://localhost:18089, serving the YAML files undersrc/test/resources/externalRef/.BaseCheckTest.beforeClassstarts the server once for the test suite, so all checks resolving external$refs do it against localhost` instead of the public internet.http://localhost:18089/<file>.yamlinstead of theraw.githubusercontent.comURLs.1.3.6inpom.xmland added the corresponding entry toCHANGELOG.md.Other information
src/test/resources/externalRef/are unchanged; only the URLs that reference them have been switched tolocalhost.127.0.0.1only and is shut down via a JVM shutdown hook, so it does not leak between builds.