fix(openapi): add rate_limited to error code enum - #7
Merged
Conversation
c1trua
added a commit
that referenced
this pull request
Jun 17, 2026
* docs(contributing): update CONTRIBUTING.md * feat(cicd): add github actions workflow * fix(workflow): update golanglint version * fix(workflow): update golanglint version * fix(lint): linter passed * feat(oss): support cross-account assume role credentials * ci(deploy): add manual test ECS deployment * ci(deploy): add manual test ECS deployment (#4) * fix(openapi): add rate_limited to error code enum (#7) * fix(deploy): deploy test ECS by uploading images over SSH (#8) * fix(deploy): upload images to ECS instead of pulling from Docker Hub * fix(deploy): allow container to read test config * fix(deploy): verify api health after test deployment * fix(deploy): verify api stability after test deployment * fix(deploy): clean stale compose state before test deployment * fix(deploy): log api deployment status explicitly * fix(deploy): prevent migrate step from consuming ssh input * ci(deploy): auto deploy test ECS on develop push * ci(ops): add test ECS ops workflow * ci(ops): add test ops workflow and reduce healthcheck noise * ci(ops): add OSS presign diagnostics * feat(profile): add avatar upload flow (#9) * feat: add avatar upload flow * fix(profile): stabilize avatar upload integration tests * feat: add https support * fmt: reformat * fix: autocert gateway permission error * fix: autocert error * fix: autocert error * fix(gateway): fallback SNI for autocert * Revert "Merge pull request #14 from Muxi-X/fix/gateway-sni-fallback" This reverts commit 74bd0e0, reversing changes made to 52e2f0d. * Revert "Merge pull request #13 from Muxi-X/feat/https" This reverts commit 52e2f0d, reversing changes made to 0faebb0. * Revert "Merge pull request #12 from Muxi-X/feat/https" This reverts commit 0faebb0, reversing changes made to ad6bc82. * Revert "Merge pull request #11 from Muxi-X/feat/https" This reverts commit ad6bc82, reversing changes made to 7770d94. * Revert "Merge pull request #10 from Muxi-X/feat/https" This reverts commit 7770d94, reversing changes made to 981c240. * build(deploy): add nginx + certbot for https Expose API via Nginx on 80/443 with automatic Let's Encrypt issuance/renewal while keeping a localhost debug port. * chore: update test domain * refactor: remove nginx config (#17) * refactor: remove nginx config * chore(ci): disable auto-deploy on push to develop during PR merge * feat: add custom keyword upload endpoints (#18) * feat(oss): migrate from Alibaba Cloud OSS to Qiniu Kodo (#19) * feat(oss): migrate from Alibaba Cloud OSS to Qiniu Kodo * perf(deploy): skip unchanged dependency images in test deploy * ci(deploy-test): switch from SCP zip transfer to Alibaba Cloud ACR - Push cixing-api image + 5 base images to ACR (Hangzhou registry) - ECS pulls images from ACR via docker compose pull instead of gzip load - Remove docker save/gzip/scp image transfer steps - Remove /opt/cixing/images/ tarball cleanup - Update docker-compose.prod.yml to reference ACR image paths - Add ACR_USERNAME / ACR_PASSWORD to required secrets validation * ci(deploy-test): fix docker login host error * ci(deploy-test): push cixing-api image to Alibaba Cloud ACR - Push image to registry.cn-hangzhou.aliyuncs.com/muxi/memento:<sha> - Remove docker save/gzip/scp image transfer steps - ECS pulls cixing-api from ACR, base images from Docker Hub - Add ACR_USERNAME / ACR_PASSWORD to required secrets validation - Note: CONFIG must also fix postgres DSN from 127.0.0.1 to postgres * fix(deploy-test): pass ACR credentials via SSH environment * ci(deploy-test): pull only cixing-api from ACR * fix(oss): remove duplicate https:// prefix in qiniu upload host * fix(oss): remove null * fix(oss): use SrcUpHosts (upload domain) instead of GetIoHost (IO domain) for presign upload URL * fix(oss): presign returns FormData token field instead of Authorization header for Qiniu Kodo - storage.go: PresignPut uses FormFields { token: upToken } instead of Authorization header - object_storage.go: PresignResult gains FormFields map - OpenAPI spec: UploadPresignedTarget gains form_fields field, method enum adds POST - Handlers: map FormFields through to API response - Qiniu form upload requires multipart/form-data with token in the form body * fix(ci): remove duplicate Configure SSH block and nginx references * fix(oss): gofmt client.go struct field alignment * chore(test): remove tests that reference removed OSS config fields * fix(oss): remove unused functions and fix errcheck lint warning * fix: remove unused functions, fix integration test for Qiniu URL style * fix(ci): resolve lint errors and integration test failures after Qiniu migration * fix(ci): remove dead Mirror step that references undefined ACR_REGISTRY (#20) * ci(deploy): add prod deploy workflow, parameterize compose config (#21) * docs: update README for v0.1.0 release
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.
Background
The runtime already returns rate limit errors with:
code = rate_limitedreason = common.rate_limitedHowever, the OpenAPI
ErrorCodeenum did not includerate_limited, so the API contract was out of sync with the actual response shape. This also affects generated types used by clients.Main Changes
rate_limitedto theErrorCodeenum inapi/openapi/openapi.v1.yamlinternal/transport/http/v1/gen/openapi.gen.goErrorCodeRateLimitedconstantImpact
This change does not modify runtime rate limiting behavior. It only aligns the contract and generated code with the existing response.
Validation
Executed locally:
.\scripts\gen_openapi.ps1go test ./internal/transport/http/server ./internal/transport/http/v1Results:
internal/transport/http/server: no test filesinternal/transport/http/v1: passed