-
Notifications
You must be signed in to change notification settings - Fork 99
Schemars serialization contract #254
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
base: main
Are you sure you want to change the base?
Conversation
|
Please upgrade to 1.1.0 |
c5fa7df to
597b849
Compare
|
@shovelmn12 that's outside of the scope of this PR. |
|
Also: #173 (comment) |
|
So, how is this going to behave when the same type is used both as an input and output? Will the result be dependent on the order in which the routes get registered / the inputs and outputs get processed by aide? |
|
Oversaw your message, double-checked it now, and you're correct that there's an issue with how the code would handle schema name collisions between the output and input generator. At the moment, it's just doing a plain I've looked into solving this by checking for collisions and then just renaming that colliding schema name to something like Ideally, we'd rely on the already in-built schema name collision handling of Concluding: There's really no way of easily handling colliding types from the input and output schema. The only solution to this problem right now is to check for collisions and panic or return an error. We'll have to force the user to use the Another, probably rather dumb solution, would be to just inline everything. But that's a bad idea on many levels. |
fixes #250
Note that this PR also contains fixes that were overlooked by me when I created the "upgrade to schemars 0.9.x" PR, namely crate features that I forgot to migrate.