docs(openapi): remove result envelope reintroduced in #31530#32088
Merged
Conversation
#31530 regenerated the spec from a base predating #31989 and re-added the `result: {...}` response envelope that #31989 had removed to match the actual handler output (the envelope was dropped from all handlers in #22299). This unwraps the reusable *Result response schemas again and regenerates mcp/openapi.json.
Contributor
There was a problem hiding this comment.
Hey - I've left some high level feedback:
- Since the envelope was reintroduced by regeneration, consider adding a guard in whatever tooling or script generates
openapi.yaml/openapi.jsonto ensure*Resultschemas remain unwrapped so this mismatch doesn’t recur. - It may be worth scanning for any remaining
result: {...}usages in reusable schemas or path responses beyond the listed*Resulttypes, to ensure the spec is now fully aligned with the current handlers’ response shapes.
Prompt for AI Agents
Please address the comments from this code review:
## Overall Comments
- Since the envelope was reintroduced by regeneration, consider adding a guard in whatever tooling or script generates `openapi.yaml`/`openapi.json` to ensure `*Result` schemas remain unwrapped so this mismatch doesn’t recur.
- It may be worth scanning for any remaining `result: {...}` usages in reusable schemas or path responses beyond the listed `*Result` types, to ensure the spec is now fully aligned with the current handlers’ response shapes.Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
As reported in #31530 (comment) by @StefanSchoof.
#31530 regenerated
openapi.yamlfrom a base that predated #31989 and re-added theresult: {...}response envelope. That envelope was removed from all HTTP handlers in #22299, and #31989 had already fixed the spec to match (fixes #31988,getLoadpointPlanexample).This re-applies the unwrap on the reusable
*Resultresponse schemas (NanoSecondsResult,NumberResult,IntegerResult,SocResult,PlanRatesResult,BooleanResult,NullResult,SuccessResult,BatteryModeResult) so the generated REST docs again show the real response shape, and regeneratesmcp/openapi.json.🤖 Generated with Claude Code