Skip to content

docs(api-spec): document route canonicalization behavior#2993

Merged
nighca merged 1 commit intogoplus:devfrom
aofei:route-canonicalization-api-spec
Apr 8, 2026
Merged

docs(api-spec): document route canonicalization behavior#2993
nighca merged 1 commit intogoplus:devfrom
aofei:route-canonicalization-api-spec

Conversation

@aofei
Copy link
Copy Markdown
Member

@aofei aofei commented Mar 27, 2026

Document the route canonicalization contract in docs/openapi.yaml, including moved-route responses and query normalization.

Copy link
Copy Markdown

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request updates the OpenAPI specification to support resource redirection and normalization for historical usernames and routes. It introduces 301 Moved Permanently and 409 Conflict responses across user, project, and release endpoints, along with new schemas for MovedResourceError and MovedResourceCanonical to provide canonical metadata. I have no feedback to provide.

aofei added a commit to aofei/fork.goplus.builder that referenced this pull request Mar 27, 2026
Handle moved-resource responses from the backend so path-based writes
retry once with the canonical route and body-derived create requests
rewrite their route fields before retrying.

Replace unresolved user, project, and editor routes with canonical
backend values after loading so subsequent UI behavior uses canonical
identifiers consistently.

Updates goplus#2993

Signed-off-by: Aofei Sheng <aofei@aofeisheng.com>
aofei added a commit to aofei/fork.goplus.builder that referenced this pull request Mar 27, 2026
Handle moved-resource responses from the backend so path-based writes
retry once with the canonical route and body-derived create requests
rewrite their route fields before retrying.

Replace unresolved user, project, and editor routes with canonical
backend values after loading so subsequent UI behavior uses canonical
identifiers consistently.

Updates goplus#2993

Signed-off-by: Aofei Sheng <aofei@aofeisheng.com>
@aofei aofei force-pushed the route-canonicalization-api-spec branch from 5d36776 to 88efda3 Compare March 31, 2026 00:49
aofei added a commit to aofei/fork.goplus.builder that referenced this pull request Mar 31, 2026
Handle moved-resource responses from the backend without generic write
retries, and retry updateProject once with the canonical route so
saving existing projects still works after a project rename.

Replace unresolved user, project, and editor routes with canonical
backend values after loading so subsequent UI behavior uses canonical
identifiers consistently.

Updates goplus#2993

Signed-off-by: Aofei Sheng <aofei@aofeisheng.com>
@aofei aofei marked this pull request as ready for review March 31, 2026 00:53
Copilot AI review requested due to automatic review settings March 31, 2026 00:53
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Updates the API specification to explicitly document the route canonicalization contract, including how historical routes/usernames are handled and how clients should interpret/resolve moved-resource responses.

Changes:

  • Documented that several query parameters accept historical usernames/routes and are transparently normalized to canonical values.
  • Added explicit moved-resource responses on affected endpoints (301 for canonical redirects and 409 with a canonical payload for non-idempotent operations/inputs).
  • Introduced reusable OpenAPI components for moved-resource responses and the MovedResourceError / MovedResourceCanonical schemas.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@xgopilot
Copy link
Copy Markdown
Contributor

xgopilot bot commented Mar 31, 2026

Good addition — the query-parameter normalization notes and reusable MovedPermanently/ResourceMoved components are clean. A few points worth addressing: the Content-Location header in the 301 response is semantically misused; Cache-Control: no-cache contradicts the permanence of a 301; the deliberate choice of 409 over 308 for mutation endpoints (to force explicit client re-submission) is sound but should be documented in the component description; and MovedResourceCanonical would benefit from clarifying which fields are populated per resource type.

@aofei aofei force-pushed the route-canonicalization-api-spec branch from 88efda3 to db42b8e Compare March 31, 2026 01:29
aofei added a commit to aofei/fork.goplus.builder that referenced this pull request Mar 31, 2026
Handle moved-resource responses from the backend without generic write
retries, and retry updateProject once with the canonical route so
saving existing projects still works after a project rename.

Replace unresolved user, project, and editor routes with canonical
backend values after loading so subsequent UI behavior uses canonical
identifiers consistently.

Updates goplus#2993

Signed-off-by: Aofei Sheng <aofei@aofeisheng.com>
aofei added a commit to aofei/fork.goplus.builder that referenced this pull request Mar 31, 2026
Handle moved-resource responses from the backend without generic write
retries, and retry updateProject once with the canonical route so
saving existing projects still works after a project rename.

Replace unresolved user, project, and editor routes with canonical
backend values after loading so subsequent UI behavior uses canonical
identifiers consistently.

Updates goplus#2993

Signed-off-by: Aofei Sheng <aofei@aofeisheng.com>
@aofei aofei force-pushed the route-canonicalization-api-spec branch from db42b8e to 2267eea Compare March 31, 2026 07:36
Document the route canonicalization contract in `docs/openapi.yaml`,
including moved-route responses and query normalization.

Signed-off-by: Aofei Sheng <aofei@aofeisheng.com>
@aofei aofei force-pushed the route-canonicalization-api-spec branch from 2267eea to 7311cde Compare April 2, 2026 01:54
aofei added a commit to aofei/fork.goplus.builder that referenced this pull request Apr 2, 2026
Handle moved-resource responses from the backend without generic write
retries, and retry updateProject once with the canonical route so
saving existing projects still works after a project rename.

Replace unresolved user, project, and editor routes with canonical
backend values after loading so subsequent UI behavior uses canonical
identifiers consistently.

Updates goplus#2993

Signed-off-by: Aofei Sheng <aofei@aofeisheng.com>
@nighca nighca merged commit 02792b4 into goplus:dev Apr 8, 2026
4 checks passed
@aofei aofei deleted the route-canonicalization-api-spec branch April 9, 2026 02:05
aofei added a commit to aofei/fork.goplus.builder that referenced this pull request Apr 9, 2026
Handle moved-resource responses from the backend without generic write
retries, and retry updateProject once with the canonical route so
saving existing projects still works after a project rename.

Replace unresolved user, project, and editor routes with canonical
backend values after loading so subsequent UI behavior uses canonical
identifiers consistently.

Updates goplus#2993

Signed-off-by: Aofei Sheng <aofei@aofeisheng.com>
aofei added a commit to aofei/fork.goplus.builder that referenced this pull request Apr 9, 2026
Handle moved-resource responses from the backend without generic write
retries, and retry updateProject once with the canonical route so
saving existing projects still works after a project rename.

Replace unresolved user, project, and editor routes with canonical
backend values after loading so subsequent UI behavior uses canonical
identifiers consistently.

Updates goplus#2993

Signed-off-by: Aofei Sheng <aofei@aofeisheng.com>
aofei added a commit to aofei/fork.goplus.builder that referenced this pull request Apr 9, 2026
Handle moved-resource responses from the backend without generic write
retries, and retry updateProject once with the canonical route so
saving existing projects still works after a project rename.

Replace unresolved user, project, and editor routes with canonical
backend values after loading so subsequent UI behavior uses canonical
identifiers consistently.

Updates goplus#2993

Signed-off-by: Aofei Sheng <aofei@aofeisheng.com>
aofei added a commit to aofei/fork.goplus.builder that referenced this pull request Apr 9, 2026
Handle moved-resource responses from the backend without generic write
retries, and retry updateProject once with the canonical route so
saving existing projects still works after a project rename.

Replace unresolved user, project, and editor routes with canonical
backend values after loading so subsequent UI behavior uses canonical
identifiers consistently.

Updates goplus#2993

Signed-off-by: Aofei Sheng <aofei@aofeisheng.com>
aofei added a commit to aofei/fork.goplus.builder that referenced this pull request Apr 9, 2026
Handle moved-resource responses from the backend without generic write
retries, and retry updateProject once with the canonical route so
saving existing projects still works after a project rename.

Replace unresolved user, project, and editor routes with canonical
backend values after loading so subsequent UI behavior uses canonical
identifiers consistently.

Updates goplus#2993

Signed-off-by: Aofei Sheng <aofei@aofeisheng.com>
aofei added a commit to aofei/fork.goplus.builder that referenced this pull request Apr 9, 2026
Handle moved-resource responses from the backend without generic write
retries, and retry updateProject once with the canonical route so
saving existing projects still works after a project rename.

Replace unresolved user, project, and editor routes with canonical
backend values after loading so subsequent UI behavior uses canonical
identifiers consistently.

Updates goplus#2993

Signed-off-by: Aofei Sheng <aofei@aofeisheng.com>
aofei added a commit to aofei/fork.goplus.builder that referenced this pull request Apr 9, 2026
Handle moved-resource responses from the backend without generic write
retries, and retry updateProject once with the canonical route so
saving existing projects still works after a project rename.

Replace unresolved user, project, and editor routes with canonical
backend values after loading so subsequent UI behavior uses canonical
identifiers consistently.

Updates goplus#2993

Signed-off-by: Aofei Sheng <aofei@aofeisheng.com>
aofei added a commit to aofei/fork.goplus.builder that referenced this pull request Apr 9, 2026
Handle moved-resource responses from the backend without generic write
retries, and retry updateProject once with the canonical route so
saving existing projects still works after a project rename.

Replace unresolved user, project, and editor routes with canonical
backend values after loading so subsequent UI behavior uses canonical
identifiers consistently.

Updates goplus#2993

Signed-off-by: Aofei Sheng <aofei@aofeisheng.com>
aofei added a commit to aofei/fork.goplus.builder that referenced this pull request Apr 9, 2026
Handle moved-resource responses from the backend without generic write
retries, and retry updateProject once with the canonical route so
saving existing projects still works after a project rename.

Replace unresolved user, project, and editor routes with canonical
backend values after loading so subsequent UI behavior uses canonical
identifiers consistently.

Updates goplus#2993

Signed-off-by: Aofei Sheng <aofei@aofeisheng.com>
aofei added a commit to aofei/fork.goplus.builder that referenced this pull request Apr 10, 2026
Handle moved-resource responses from the backend without generic write
retries, and retry updateProject once with the canonical route so
saving existing projects still works after a project rename.

Replace unresolved user, project, and editor routes with canonical
backend values after loading so subsequent UI behavior uses canonical
identifiers consistently.

Updates goplus#2993

Signed-off-by: Aofei Sheng <aofei@aofeisheng.com>
nighca pushed a commit that referenced this pull request Apr 10, 2026
Handle moved-resource responses from the backend without generic write
retries, and retry updateProject once with the canonical route so
saving existing projects still works after a project rename.

Replace unresolved user, project, and editor routes with canonical
backend values after loading so subsequent UI behavior uses canonical
identifiers consistently.

Updates #2993

Signed-off-by: Aofei Sheng <aofei@aofeisheng.com>
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.

3 participants