Skip to content
New issue

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

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

Already on GitHub? # to your account

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

Draft
wants to merge 4 commits 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.1
  • 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 3 times, most recently from 5e66fd1 to 33dc6fa Compare February 11, 2025 10:17
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant