oxidecomputer / typify

compiler from JSON Schema into idiomatic Rust types
Apache License 2.0
451 stars 60 forks source link

Dependency on regress should be configurable #682

Open thomasmost opened 1 month ago

thomasmost commented 1 month ago

Settings should include either a with_regress_converters or a without_regress_converters setter so that a dependency on regress is not guaranteed.

Perhaps a smaller version of this could be configuring the tool to generate struct definitions alone, without any converters.

ahl commented 1 month ago

That's an interesting idea. Is the objection to regress that its a large dependency? What would you propose we do to validate string formats if we didn't have that dependency? In stand-alone, generated crates, I believe we only include the regress dependency when it's actually needed.

thomasmost commented 2 weeks ago

Yes, it's a large dependency and I think there's value to generating bindings that can be used without making assumptions about validation strategy.

That said this is just one man's request for a more custom-izable library :) overall the utility is still fantastic!

thomasmost commented 2 weeks ago

Oh, here's a question, if I don't set with_struct_builder(true)); — does that eliminate the regress dependency?

Update

Looks like no haha