Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Content handling updates to properly support YAML #4739

Merged
merged 10 commits into from
Jun 5, 2024
Merged

Conversation

EricWittmann
Copy link
Member

@EricWittmann EricWittmann commented Jun 5, 2024

OpenAPI and AsyncAPI types are often formatted as YAML instead of JSON. In the past we have simply converted it, because all of our parsing was assuming JSON. In v3 this has been changed so that we honor the content type provided to us. So now we simply store the content as-is. If you give us YAML we'll give that back to you. If you give us JSON then we'll store that.

This does not work for other JSON based types, since Avro and JSON Schema are not typically formatted as YAML files.

Supporting this required the introduction of a new interface called TypedContent to make it easier to pass the content around to various classes (Canonicalizer, Validator, etc) that need to have the content and the contentType.

The changes are mostly to support getting this test to pass:

https://github.com/Apicurio/apicurio-registry/pull/4739/files#diff-2dc524c744a0171e2b44f95bc92ba63edae6f7685363812aa4a3560eb00fcbf3

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
@apicurio-bot
Copy link

apicurio-bot bot commented Jun 5, 2024

Thank you for creating a pull request!

Pinging @jsenko to respond or triage.

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
@EricWittmann EricWittmann merged commit 23c8293 into main Jun 5, 2024
19 checks passed
@EricWittmann EricWittmann deleted the feat/yaml-support branch June 5, 2024 20:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant