---
title: "Definition patches"
description: "Small, deterministic OpenAPI corrections applied to the resolved Definition before every review and Generation."
url: https://typeship.dev/docs/projects/definition-patches
markdown: https://typeship.dev/docs/projects/definition-patches.md
section: "Get started"
---
> ## Documentation index
> Fetch the complete documentation index at https://typeship.dev/llms.txt (every page, one line each) or the full text at https://typeship.dev/llms-full.txt.
> Append .md to any docs URL, or send Accept: text/markdown, for the markdown twin of that page.

# Definition patches

Small, deterministic OpenAPI corrections applied to the resolved Definition before every review and Generation.

Definition patches carry a small correction when the upstream OpenAPI source cannot be changed immediately. They apply to the same resolved Definition Revision used by Diagnostics, compatibility checks, previews, and every Target.

```json
[
  { "op": "set", "path": "/components/schemas/Account/properties/id/type", "value": "string", "reason": "ids are strings" },
  { "op": "rename", "path": "/components/schemas/Acct", "to": "Account" }
]
```

Supported operations are `set`, `append`, `remove`, and `rename`. Paths are JSON Pointers with `*`, `**`, and `[key=value]` pattern segments. A patch that stops matching is skipped and reported loudly; it never disappears silently.

Patches are overlays, not a general transform language. Prefer an authored source change whenever possible. Diagnostics can open a source pull request for exact fixes, including fixes in referenced repository files.

GraphQL uses source-edit guidance instead of this OpenAPI patch model. Typeship will not force SDL through JSON Pointer semantics.

> **For AI agents:** Definition patches live at 
> 
> `definition.patches`
> 
>  and are updated with 
> 
> `PATCH /definitions/{definition_id}`
> 
> . Read the current list before replacing it. Up to 50 patches are accepted.

## Sitemap

[Every page of these docs](https://typeship.dev/llms.txt)
