Skip to content

Mark generated endpoint methods#45

Draft
kvz wants to merge 4 commits into
mainfrom
sdk-gen-go
Draft

Mark generated endpoint methods#45
kvz wants to merge 4 commits into
mainfrom
sdk-gen-go

Conversation

@kvz
Copy link
Copy Markdown
Member

@kvz kvz commented May 25, 2026

Experimental Status

Experimental work: this PR is part of an exploratory contract/generated docs and SDK effort, and is intentionally kept as a Draft while the approach is validated.

Why

API2 is becoming the source of truth for endpoint contracts and SDK generation. This draft starts the Go SDK companion cautiously: it marks existing low-level endpoint methods that API2 can regenerate byte-for-byte, so we can prove the generator can delete and rewrite without changing behavior.

What changed

  • Added API2 generated-region markers around 14 existing Go SDK endpoint methods: Assembly status/cancel/list, Assembly notification replay, Template create/get/update/delete/list, and Template Credential create/get/update/delete/list.
  • Kept the method bodies and comments byte-for-byte identical; API2 rewrites these regions and compares the generated snippets back to this checkout.
  • Added a blank line after each opening generated-region marker so the internal marker comments do not become part of exported Godoc blocks.

Companion PRs

Verification

  • From API2: api2/bin/cli.ts contracts sdks --platform go --sdk-root ../go-sdk --rewrite-sdk --compare-existing --no-motd
  • Go SDK: go test ./... -run 'Test(NewClient|CreateSignedSmartCDNUrl|Sign|ListRequest|Integer|TemplateContent)'

Notes

Full go test ./... still expects live TRANSLOADIT_KEY/TRANSLOADIT_SECRET for integration-style tests. I left those untouched and ran the credential-free subset.

TUS Android client companion: tus/tus-android-client#167

TUS Java client companion: tus/tus-java-client#149

Transloadit Companion PRs

TUS Companion PRs

Allowed outward links from Transloadit to the related tus companion PRs:

@codecov-commenter
Copy link
Copy Markdown

codecov-commenter commented May 25, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 82.60%. Comparing base (1878939) to head (d4fcdcd).

Additional details and impacted files
@@           Coverage Diff           @@
##             main      #45   +/-   ##
=======================================
  Coverage   82.60%   82.60%           
=======================================
  Files           6        6           
  Lines         345      345           
=======================================
  Hits          285      285           
  Misses         32       32           
  Partials       28       28           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

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.

2 participants