Skip to content

Revert "API: generate /api/state documentation from UI types"#32109

Merged
andig merged 1 commit into
masterfrom
revert-31530
Jul 24, 2026
Merged

Revert "API: generate /api/state documentation from UI types"#32109
andig merged 1 commit into
masterfrom
revert-31530

Conversation

@andig

@andig andig commented Jul 24, 2026

Copy link
Copy Markdown
Member

Reverts #31530 (commit 542a01f).

Follow-up changes on top of it are kept:

server/mcp/openapi.json and server/mcp/openapi.md are regenerated with the restored go tool openapi generator.


🤖 Generated with Claude Code

This reverts commit 542a01f.

Keeps the follow-up changes from #32086 and #32087 (batteryGridDischarge
setting, discharge suggestion action) and regenerates server/mcp/openapi.json
and openapi.md from the restored generator.
@andig andig added the infrastructure Basic functionality label Jul 24, 2026

@sourcery-ai sourcery-ai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Hey - I've left some high level feedback:

  • In cmd/openapi/openapi.go, consider validating os.Args length and printing a helpful usage message instead of assuming two arguments are always present to avoid cryptic panics when invoked incorrectly.
  • Several TS interfaces in evcc.ts were relaxed or changed (e.g. InfluxConfig.database/org now any, modbusproxy and messagingEvents no longer allow null); double-check these against the actual /api/state payload so the UI types still accurately represent nullable fields and avoid unnecessary any usage.
Prompt for AI Agents
Please address the comments from this code review:

## Overall Comments
- In cmd/openapi/openapi.go, consider validating os.Args length and printing a helpful usage message instead of assuming two arguments are always present to avoid cryptic panics when invoked incorrectly.
- Several TS interfaces in evcc.ts were relaxed or changed (e.g. InfluxConfig.database/org now `any`, `modbusproxy` and `messagingEvents` no longer allow `null`); double-check these against the actual /api/state payload so the UI types still accurately represent nullable fields and avoid unnecessary `any` usage.

Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

@andig
andig merged commit 9c88523 into master Jul 24, 2026
14 checks passed
@andig
andig deleted the revert-31530 branch July 24, 2026 09:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

infrastructure Basic functionality

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant