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

feat(json-schema): mutualize json schema between formats #6960

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

soyuka
Copy link
Member

@soyuka soyuka commented Feb 9, 2025

Q A
Branch? main
Tickets starts fixing #6485
License MIT

Instead of generating twice a definition for 2 different formats, we generate the json one and reference the json format inside the jsonld format:

https://gist.github.com/soyuka/20d0d216c3fce1b68165dbbf58381e02

When generating a single resource on our TestBundle we lower the OpenAPI file size quite a bit:

  • 12K on 4.5
  • 8.0K with this patch

Left to be done:

@soyuka soyuka force-pushed the feat/json-schema branch 3 times, most recently from 981e6e1 to 86c39da Compare February 10, 2025 16:57
@soyuka soyuka changed the title feat(json-schema): use $id and $ref between json formats feat(json-schema): mutualize json schema between formats Feb 10, 2025
@soyuka soyuka force-pushed the feat/json-schema branch 2 times, most recently from fcc9e13 to 5e66fd1 Compare February 11, 2025 07:49
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.

1 participant