Skip to content

Conversation

@rosesyrett
Copy link
Contributor

This PR is necessary because currently fastAPI does not support typing.Tuples. In order to work around this, I redefined my pydantic models to instead use other pydantic models (essentially, dataclasses) with explicit members. Where this was not possible (e.g. routes/hkl, for the scan_hkl route), I added errors to catch incorrect parameters instead.

This is part of a larger work to make swagger-codegen outputs for a java client better - Tuples are not correctly translated to an openapi schema.

Copy link
Contributor

@callumforrester callumforrester left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me

@rosesyrett rosesyrett merged commit 93d6ef7 into master Aug 18, 2022
@rosesyrett rosesyrett deleted the removeTypingTuple branch August 18, 2022 15:14
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

Successfully merging this pull request may close these issues.

3 participants