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 user to provide schema creation implementation #1058

Merged
merged 1 commit into from
Feb 13, 2024

Conversation

tamj0rd2
Copy link
Contributor

I'm using a library called Kondor which provides a way to generate json schemas without the use of reflection etc. In the http4k OpenApi3 implementation, it's currently not possible to provide your own JsonToJsonSchema implementation, however it is in the OpenApi2 implementation.

@daviddenton
Copy link
Member

Interesting - is that schema generator open source by any chance? (or is it even a part of Kondor?)

@tamj0rd2
Copy link
Contributor Author

It's part of Kondor itself - https://github.com/uberto/kondor-json?tab=readme-ov-file#why-converters

Example: JFileInfo.schema().render(pretty)

@codecov-commenter
Copy link

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (639cc02) 84.55% compared to head (691f525) 84.55%.

❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files
@@            Coverage Diff            @@
##             master    #1058   +/-   ##
=========================================
  Coverage     84.55%   84.55%           
- Complexity     2013     2015    +2     
=========================================
  Files           579      579           
  Lines         13236    13237    +1     
  Branches       1739     1739           
=========================================
+ Hits          11192    11193    +1     
  Misses         1243     1243           
  Partials        801      801           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@daviddenton daviddenton merged commit a8a3d71 into http4k:master Feb 13, 2024
3 checks passed
@daviddenton
Copy link
Member

Thanks for the PR. It would be amazing if the JsonSchemaCreator implementation could be open sourced (either as a part of Kondor (ask @uberto :)) or as a part of this module. There is a test with a bunch of test cases which could be useful in AutoJsonToJsonSchemaTest.

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.

None yet

3 participants