chore: sync OpenAPI spec from flashduty-docs + regenerate (adds session/delete; drops console-only skill/download)#14
Merged
Conversation
Catch the vendored spec up to flashduty-docs main and regenerate the typed service layer. - Sessions.WriteDelete added — POST /safari/session/delete. - Session methods renamed Info/List -> ReadInfo/ReadList, matching the safari read/write operationId convention already used by mcp / skill / a2a (session was the only bare-named safari resource). - Skills.ReadDownload removed: /safari/skill/download returns application/zip, which the generator correctly excludes (non-JSON / streaming response, same rule as session/export); the old (*string) method could not decode a zip. - Model refresh from the current spec: Timestamp -> TimestampMilli and omitempty scalar fields -> pointers; SkillUploadRequest added; orphan ExportLine / ExportUsage dropped from the generated models. - ExportLine / ExportUsage relocated into sessions_export.go as hand-maintained types, alongside the hand-written streaming Export endpoint that consumes them (the generator prunes them as unreferenced). make check is green (gofmt, gci, golangci-lint 0 issues, go test -race, build).
/safari/skill/download is now auth=jwt in the registry (fc-pgy #570): a console-only application/zip download with no app_key consumer. Re-sync from the updated docs spec removes it from the vendored OpenAPI and the generated SDK entirely (SkillDownloadRequest dropped) — so it no longer appears as a broken (*string) binary method. The Customize console keeps downloading via its session cookie (jwt); the SDK simply doesn't model a non-public op.
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.
Why
The vendored OpenAPI under
openapi/is a synced copy of the single source (flashduty-docsapi-reference/openapi.{en,zh}.json). It had drifted behind docs main. Re-sync via the blessedmake sync-spec+make generateand land go-flashduty back in sync.What changed
Sessions.WriteDeleteadded —POST /safari/session/delete(was public but had no SDK method).Info/List→ReadInfo/ReadListto match the safari read/write operationId convention already used by mcp (ReadServerGet), skill (ReadGet), and a2a — session was the only bare-named safari resource. (Breaking for direct callers ofSessions.Info/List. go-flashduty is v0.x; the flashduty-cli command surface is path-derived and unaffected.)/safari/skill/downloaddropped entirely — it was reclassifiedauth=all → jwt(console-only binaryapplication/zipdownload, used only by the Customize UI via session cookie; flashduty-docs #106, fc-pgy #570). It's no longer in the public spec, so the old brokenSkills.ReadDownload(...) (*string, ...)(which could not decode a zip) and itsSkillDownloadRequestmodel are gone. No consumer breaks — the only public consumers were broken, unused codegen artifacts.Timestamp → TimestampMilli,omitemptyscalar fields → pointers,SkillUploadRequestadded.ExportLine/ExportUsagerelocated intosessions_export.goas hand-maintained types, alongside the hand-written streamingExportendpoint that consumes them (the generator prunes them as unreferenced —session/exportis NDJSON, excluded like the now-removed zip download).Verification
make checkgreen: gofmt + gci clean, golangci-lint 0 issues,go test -race ./...ok,go build ./...clean. Vendoredopenapi/*.jsonis byte-identical to flashduty-docsmain(post-#106).Follow-up
flashduty-cli bumps to this commit + regen — adds the
session-deletecommand, drops the (broken, unused)skill-downloadcommand. Its "every public op reachable" coverage invariant passes cleanly (verified locally against this branch). PR'd to feat/ai-sre after this merges.