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

docs(robot-server): Fix labware router response bodies #16444

Merged
merged 2 commits into from
Oct 9, 2024

Conversation

SyntaxColoring
Copy link
Contributor

Overview

The GET /runs/{id}/loaded_labware_definitions and POST /runs/{id}/labware_definitions endpoints were accidentally documented in OpenAPI as returning the run, not the labware definition. This fixes that.

Review requests

  • Documented return types match actual return types?
  • OK with the SimpleBody[list[...]] thing?

Risk assessment

Low.

@SyntaxColoring SyntaxColoring requested a review from a team October 9, 2024 16:15
@SyntaxColoring SyntaxColoring requested a review from a team as a code owner October 9, 2024 16:15
Comment on lines -144 to +143
) -> PydanticResponse[SimpleBody[ResponseList[SD_LabwareDefinition]]]:
) -> PydanticResponse[SimpleBody[list[SD_LabwareDefinition]]]:
Copy link
Contributor Author

Choose a reason for hiding this comment

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

The ResponseList wrapper used to be necessary when, in SimpleBody[T], we constrained T to be a BaseModel. We no longer do that, so now we can get rid of the wrapper and just use a plain list.

Separately, it seems like this should be a SimpleMultiBody[...], but it was done this way intentionally so I'm leaving it alone.

Copy link
Member

@sfoster1 sfoster1 left a comment

Choose a reason for hiding this comment

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

whoops, good fix. good to get rid of more model wrappers.

@SyntaxColoring SyntaxColoring merged commit 50d3208 into edge Oct 9, 2024
13 checks passed
@SyntaxColoring SyntaxColoring deleted the fix_labware_router_return_types branch October 9, 2024 17:52
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.

2 participants