chore: sync OpenAPI spec from flashduty-docs#3
Merged
Conversation
ysyneu
added a commit
that referenced
this pull request
Jun 2, 2026
#3 dropped the `toon:"..."` tag from generated structs, emitting only `json:"..."`. But toon-go (internal/codec/structmeta.go) reads ONLY the `toon` tag and falls back to the Go field NAME when it is absent — it does NOT read `json`. So `--output-format toon` started rendering PascalCase keys (AccountID, CreatedAt) instead of snake_case (account_id, created_at), while `--json` and the spec-derived help stayed snake_case. An agent that reads a field name off a toon dump and pipes it into `--json | jq '.account_id'` hits all-null. Restore the `toon` tag mirrored from `json` (snake_case), and re-add the comment explaining why so it is not dropped again. Verified: toon keys are snake_case again across generated list output.
ysyneu
added a commit
that referenced
this pull request
Jun 2, 2026
…scalCase in #3) (#4) * chore: sync OpenAPI from flashduty-docs + regenerate (docs#67) Picks up the 4 spec fixes merged in flashcatcloud/flashduty-docs#67, surfaced by the fduty CLI full-coverage agent eval: - AuditRecordIDRequest split off RuleIDRequest for /monit/rule/audit/detail — ReadAuditDetail now takes *AuditRecordIDRequest; its id is the audit-record id from /monit/rule/audits rows, not the rule id. - IncidentShort/IncidentRawItem.progress enum corrected (Triggered/Processing/Closed). - InsightFilter.export_fields 29-value column-key enum. - /incident/post-mortem/info description clarified (fetch by post_mortem_id). Pure sync + `go generate ./...` against the current generator; build green. No release (untagged). * fix(gen): restore the toon struct tag (regressed to PascalCase in #3) #3 dropped the `toon:"..."` tag from generated structs, emitting only `json:"..."`. But toon-go (internal/codec/structmeta.go) reads ONLY the `toon` tag and falls back to the Go field NAME when it is absent — it does NOT read `json`. So `--output-format toon` started rendering PascalCase keys (AccountID, CreatedAt) instead of snake_case (account_id, created_at), while `--json` and the spec-derived help stayed snake_case. An agent that reads a field name off a toon dump and pipes it into `--json | jq '.account_id'` hits all-null. Restore the `toon` tag mirrored from `json` (snake_case), and re-add the comment explaining why so it is not dropped again. Verified: toon keys are snake_case again across generated list output.
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.
Automated sync of the vendored OpenAPI spec from the public
flashduty-docs source of truth, followed by
go generate.openapi/openapi.{en,zh}.jsonrefreshed frommain..gore-emitted to match.Review the diff (new/changed endpoints + regenerated types) before
merging. No PR is opened when upstream has not drifted.