Repository navigation
fix(API): move job update branch param from body to query #STRINGS-3488 - #1306
Merged
Efe Bikmaz (bikmazefe) merged 2 commits intoOct 5, 2026
Merged
Conversation
The Update Job request body documented `branch` as a settable property, implying it changes the job's own branch. In reality it's consumed by strings-app's shared project-scoping middleware to locate a job that lives inside a branch, exactly like the `branch` query parameter already used by the sibling index/show job endpoints -- it never mutates the job. Document it the same way here instead of as a body field, and fix the code samples that mixed it in with mutable fields. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Contributor
API changelog (oasdiff)Doc-only edits (descriptions, examples) do not appear here. |
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Sven Dunemann (forelabs)
approved these changes
Sep 28, 2026
Efe Bikmaz (bikmazefe)
marked this pull request as ready for review
October 5, 2026 13:56
Efe Bikmaz (bikmazefe)
deleted the
fix/strings-3488-job-update-branch-param
branch
October 5, 2026 13:56
This was referenced Oct 5, 2026
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.
What changed
paths/jobs/update.yamldocumentedbranchas a settable property on theUpdate Job request body, implying that PATCH-ing
branchchanges thejob's own branch. It doesn't -- strings-app's shared project-scoping
middleware (
Api::ProjectLoading#load_project) consumes it purely to locatea job that lives inside a branch, exactly like the sibling
jobs/index.yamland
jobs/show.yamlendpoints already document it (as the sharedparameters.yaml#/branchquery parameter).job_paramsin the Railscontroller never permitted
branchas a mutable field either, so the olddocs were actively misleading -- a schema-valid PATCH with
branchin thebody would 404 if the job wasn't in that branch, looking like a
missing-resource error rather than a scoping mismatch.
branchfrom the Update Job request body schema."$ref": "../../parameters.yaml#/branch"to the operation'sparameters, matchingjobs/index.yaml/jobs/show.yaml.branchinto the mutable-fields JSON payload -- curl now uses
?branch=...in thequery string, CLI now uses
--branch <name>as its own flag.No behavior change on the strings-app side; this only corrects the spec to
match what the API already does.
Related
behavior): https://github.com/Phrase-Engineering/strings-app/pull/18910
Testing
npx swagger-cli validate main.yaml-- passesmake lint(validate + bundle + generator validation) -- passes clean🤖 Generated with Claude Code