GREsau / schemars

Generate JSON Schema documents from Rust code
https://graham.cool/schemars/
MIT License
791 stars 220 forks source link

gen keyword is reserved in Rust 2024 #306

Closed azat closed 3 weeks ago

azat commented 1 month ago

There are couple of issues with schemars and rust 2024:

I guess it is better to rename the gen module? Objections?

GREsau commented 1 month ago

I think my preferred fix to this would be to make SchemaSettings available from the crate root (SchemaGenerator is already available from the crate root) so that it can be imported as use schemars::SchemaSettings.

And obviously schemars_derive would need updating to not use the gen module (or any variables called gen)

GREsau commented 3 weeks ago

This is fixed in 1.0.0-alpha.8 - the gen module is now replaced by the generate module. For now, gen is still available as as a deprecated alias for the sake of backward-compatibility