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

Closed
auguwu opened this issue Jan 13, 2024 · 4 comments
Closed

Deserialising specification files fails everytime #843

auguwu opened this issue Jan 13, 2024 · 4 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.

@auguwu
Copy link
Author

auguwu commented Nov 6, 2024

So far, both of the OpenAPI documents I wanted to use are only OpenAPI 3.0 and utoipa 5 doesn't support it so I'll close this for now, but one project that I do use utopia will fail if no type is avaliable for RefOr, which I have made an issue in #1192, so I'll close this issue.

@auguwu auguwu closed this as completed Nov 6, 2024
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