Skip to content
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

Deserialising specification files fails everytime #843

Open
auguwu opened this issue Jan 13, 2024 · 3 comments
Open

Deserialising specification files fails everytime #843

auguwu opened this issue Jan 13, 2024 · 3 comments

Comments

@auguwu
Copy link

auguwu commented Jan 13, 2024

I'm trying to deserialize a OpenApi object to build a crate that will generate types from a OpenAPI spec file, I tried with different specs (even one generated from this crate):

and it fails with:

# data did not match any variant of untagged enum RefOr

or

# missing field `headers`

I made a reproduction repository that the maintainers can try and see what is going on?

@juhaku
Copy link
Owner

juhaku commented Oct 23, 2024

@auguwu
The utoipa 4.x.x had at least issues with deserializing back already serialized openapi.json. This hopefully has been "fixed" with utoiopa 5.0.0 release.

@auguwu
Copy link
Author

auguwu commented Oct 24, 2024

@juhaku I’ll try it again with utopia v5 and see if any issues arise.

@juhaku
Copy link
Owner

juhaku commented Oct 24, 2024

Thanks, hope it does solve the issues, but if not I'll take a look at schemas and see if there is something that can be done to fix this. These kinds of issues are a bit annoying and hard to debug because it radiates from serde which silently just allows json to be deserialized even if it did encounter issues on the way.

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

No branches or pull requests

2 participants