Skip to content

add jsonschema feature to derive JsonSchema#22

Open
orangecms wants to merge 1 commit into
stbuehler:masterfrom
orangecms:jsonschema
Open

add jsonschema feature to derive JsonSchema#22
orangecms wants to merge 1 commit into
stbuehler:masterfrom
orangecms:jsonschema

Conversation

@orangecms
Copy link
Copy Markdown

see #21

Signed-off-by: Daniel Maslowski <info@orangecms.org>
@stbuehler
Copy link
Copy Markdown
Owner

Please don't submit AI/LLM/... generated code. Can't say for sure whether this is what happened here, but I'm quite sure this is broken - because manual serde implementations will certainly require manually implemented schema descriptions.

If you're serious about this please add test cases producing both JSON values and schemas (as JSON text is probably fine); I really hope that the JSON values are simple strings, because they should take the is_human_readable paths.

Also: is there a good reason not to name the feature the same as the dependency? Is there any upstream guidance about that?

@orangecms
Copy link
Copy Markdown
Author

Let me first assure you that I'm not using any LLM crap.

I just quickly added the derives here, will check regarding their actual outputs and adding test cases, and whether manual implementations are necessary.
https://docs.rs/schemars/latest/schemars/derive.JsonSchema.html for reference (for me ^^).

Regarding the naming: Yea I get your point, I haven't seen recommendations on this yet, will also check. I was thinking that naming after the functionality, in this case the trait, made sense. We can find an agreement here as you like, I don't have a strong opinion on it. 🙂

Thank you for your feedback!

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.

2 participants