- Before adding a path file or endpoint docs, grep
paths.yaml,doc/compiled.jsonandpaths/for the endpoint to confirm it is not already documented under another file name or tag. - Edit the source YAML.
- Run
make lint(runsswagger-cli validate,make bundle, thenlint.sh). Do not run a second manualswagger-cli bundleafterwards. git diffto confirm scope.- Commit the source change together with the regenerated
doc/compiled.json(generated but committed).tmp/compiled.yamlis gitignored; never stage it. bash ./lint.shreads the gitignoredtmp/compiled.yaml;make lintormake bundlegenerates it first. Do not treat a failure on a missing file as your own regression. For an additive change, checkgit diff doc/compiled.jsonis purely additive.
paths.yaml references path files, not literal URLs. Find where an endpoint is wired up with e.g. grep -n "search.yaml" paths.yaml.
When adding or editing a request-body property for a resource, apply it to both paths/<resource>/create.yaml and paths/<resource>/update.yaml, and to the shared response schema under schemas/, so POST/PATCH/GET contracts do not drift.
.github/workflows/breaking-changes.yml diffs the compiled spec against the base branch. Adding or reordering enum values, or altering shared response schemas such as schemas/project_details.yaml, can fail it. Inspect its diff output before pushing; if it fails on a purely additive enum/field change, explain the additive nature in the PR body instead of re-pushing the same change.
PR titles are used to generate client library changelogs and version bumps. Follow the "PR titles" section of the README (https://github.com/phrase/strings-openapi#pr-titles): change_type(affected_library): description #STRINGS-TICKET, e.g. docs(API): clarify field description #STRINGS-1234.
change_type:feat(new endpoints, properties, query parameters),fix(schema fixes),docs(description-only changes, no schema change),build(build system or CI changes).affected_library: most commonlyAPI; schema changes always useAPI.- The
Validate PR titlecheck (.github/workflows/check-pr-title.yml) enforces this prefix; compose the title correctly on the first push. Usefix(API):for corrections to an existing spec (missing params, wrong fields) rather thanfeat(API):.
- Never infer response attributes from sibling endpoints or plausibility. Derive them from the live API (e.g.
curl -s https://api.phrase.com/v2/<path>) or the actual serializer. For any field or query parameter you could not verify that way, say so in the PR body as inferred, not confirmed. - Name tags and summaries the way TMS already names the same concept (e.g. tag
Supported Languages, summaryList supported languages). - Keep endpoint descriptions limited to authentication requirements; do not document rate limiting or other operational behaviour that may change.
- If an endpoint's response shape or behaviour changes depending on query params, or two paths (e.g.
/accounts/.../membersvs/projects/.../members) use different serializers, do not document a single merged shape. Keep the schemas separate and flag the ambiguity in the PR body for a human decision.
Before editing a description, field doc, or parameter block, run one repo-wide Grep for the same phrasing/field across paths/ and schemas/; these are routinely copy-pasted across sibling endpoints. Fix every occurrence in the same PR or list the ones deliberately left alone in the PR body.