Skip to content

Conversation

@osteel
Copy link
Owner

@osteel osteel commented Nov 27, 2025

Summary

This PR fixes an issue introduced with #52 where references in OpenAPI definitions as JSON or YAML strings weren't resolved properly anymore.

Explanation

Fixes #53.

This package previously used OpenAPI PSR-7 Message Validator's factories to create OpenApi spec objects, which also resolved references in case of definition passed as a string (see JsonFactory for instance).

When moving away from these factories to introduce support for URLs, manual reference resolution wasn't ported over.

Checklist

  • I have provided a summary and an explanation
  • I have reviewed the PR myself and left comments to provide context
  • I have covered the changes with tests as appropriate
  • I have made sure static analysis and other checks are successful

Comment on lines +21 to +22
with:
php-version: "8.0"
Copy link
Owner Author

Choose a reason for hiding this comment

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

ℹ️ Run these checks with the minimum supported PHP version

@osteel osteel changed the title fixed reference resolution for YAML and JSON strings Fix reference resolution for YAML and JSON strings Nov 27, 2025
@osteel
Copy link
Owner Author

osteel commented Nov 27, 2025

Hey @dafeder, as a sanity check before I merge this, would you mind loading this branch in your app and make sure that it fixes your use case please?

   "require-dev": {
        // ...
        "osteel/openapi-httpfoundation-testing": "dev-bugfix/reference",
        // ...
    },

@dafeder
Copy link

dafeder commented Dec 1, 2025

@osteel
Copy link
Owner Author

osteel commented Dec 1, 2025

@dafeder excellent! Thanks for checking. Will merge and release shortly

@osteel osteel merged commit d7d07fd into main Dec 1, 2025
12 checks passed
@osteel osteel deleted the bugfix/reference branch December 1, 2025 15:24
@osteel osteel added the bug Something isn't working label Dec 4, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Validation breaks when schema is a reference

3 participants