-
Notifications
You must be signed in to change notification settings - Fork 357
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
chore: fix ListValue types in swagger spec #4801
chore: fix ListValue types in swagger spec #4801
Conversation
✅ Deploy Preview for determined-ui ready!
To edit notification comments on pull requests, go to your Netlify site settings. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm worried about what happens when the endpoint or the proto definitions change :thinking_face: would people realize that their changes didn’t result in generating the change they expected?
update: the JSON patch seems to so precisely target the type of the label that I’m not worried
hbp ➜ determined git:(master) jq '.definitions.v1PatchExperiment' proto/build/swagger/determined/api/v1/api.swagger.json > /tmp/before.json
hbp ➜ determined git:(master) colordiff /tmp/before.json /tmp/after.json
16c16
< "type": "object"
---
> "type": "string"
hbp ➜ determined git:(master)
looking at the rest of changes
3910dc5
to
0db5a53
Compare
Protobuf google.protobuf.ListValue types come through swagger as: {"type":"array", "items":{"type":"object"} } which would convert to `Sequence[Dict[str, Any]]`, which is a pretty strange field type for v1PatchModel.labels. This PR adds tweaks via the proto/patches/api.json to force the right type in the swagger.
0db5a53
to
ac48f70
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
Protobuf google.protobuf.ListValue types come through swagger as: {"type":"array", "items":{"type":"object"} } which would convert to `Sequence[Dict[str, Any]]`, which is a pretty strange field type for v1PatchModel.labels. This PR adds tweaks via the proto/patches/api.json to force the right type in the swagger.
Protobuf google.protobuf.ListValue types come through swagger as:
which would convert to
Sequence[Dict[str, Any]]
, which is a prettystrange field type for v1PatchModel.labels.
This PR adds tweaks via the proto/patches/api.json to force the right
type in the swagger.