Skip to content

chore: sync OpenAPI spec from flashduty-docs#3

Merged
ysyneu merged 1 commit into
mainfrom
chore/sync-openapi-spec
Jun 1, 2026
Merged

chore: sync OpenAPI spec from flashduty-docs#3
ysyneu merged 1 commit into
mainfrom
chore/sync-openapi-spec

Conversation

@github-actions
Copy link
Copy Markdown
Contributor

Automated sync of the vendored OpenAPI spec from the public
flashduty-docs source of truth, followed by go generate.

  • openapi/openapi.{en,zh}.json refreshed from main.
  • Generated .go re-emitted to match.

Review the diff (new/changed endpoints + regenerated types) before
merging. No PR is opened when upstream has not drifted.

@ysyneu ysyneu merged commit fa7ce11 into main Jun 1, 2026
@ysyneu ysyneu deleted the chore/sync-openapi-spec branch June 1, 2026 03:46
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.
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.

1 participant