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

Allow annotating schema type as external reference #55

Merged
merged 7 commits into from
Mar 13, 2025
Merged

Conversation

glopesdev
Copy link
Member

A common impediment to reusing JSON schemas is the difficulty in scoping qualified type names across different schemas. To assist partially with this problem, we introduce a custom annotation x-sgen-typename which allows to fully qualify the name of a schema type.

When a schema type is indicated to be fully qualified, it is automatically considered external, and its definition is omitted from the generated code. The tests demonstrate an example of what a schema reuse infrastructure leveraging this custom annotation might look like.

Fixes #40

@glopesdev glopesdev added the feature New planned feature label Mar 13, 2025
@glopesdev glopesdev requested a review from bruno-f-cruz March 13, 2025 01:50
@glopesdev glopesdev merged commit c170620 into main Mar 13, 2025
2 checks passed
@glopesdev glopesdev deleted the external-refs branch March 13, 2025 01:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature New planned feature
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Considering rendering json objects as references
1 participant