Add schemars feature#107
Conversation
|
I'm open to adding this, two short questions: Would anyone maybe want to keep the reserved/padding fields in there? |
|
I've been using this branch in bff successfully for a month. I use the schema_for! macro to get the schema for a struct with deeply nested bilge structs. The schema describes the serde format of the struct, and I can generate Pydantic models in Python to read the output there. Since the bilge serde code does not output reserved/padding, it would be incorrect to include them in the schema without changing that in the bilge serde code first. Before adding schemars support to bilge, the underlying type would be what appeared in the schema, and that mismatch with the serde output was causing a lot of problems. Happy to answer any more questions and get tagged in issues/PRs related to serde/schemars going forward. |
|
If you don't have any more comments, is it all right if I merge this? I see you approved it, and I have permission to merge, but I wanted to check before doing it. I still haven't had any issues, and I've since done a release of my project with this version of bilge. |
Add a
schemarsfeature to complementserde. Uses arbitrary-int's schemars support. Unfortunately, arbitrary-int uses schemars 0.8.21 and isn't complete; this bilge impl should only need minor changes if that ever gets updated. I've already started using this branch locally, and it seems fine.Also fixed some warnings and updated the UI tests so CI would pass.