---
title: "Catch a renamed or removed field in Strapi schema files"
description: "For every site that reads the API, a renamed field is a field that is gone."
slug: "schema-json-change-gate"
type: recipe
locale: en-US
canonical: "https://www.coremodels.io/recipe/strapi/schema-json-change-gate"
updatedAt: "2026-12-04T12:00:00+00:00"
last_updated: "2026-12-04T12:00:00+00:00"
---

# Catch a renamed or removed field in Strapi schema files

For every site that reads the API, a renamed field is a field that is gone.

Import your Strapi content model once, then get pass or fail for each change, with the name of every field that breaks. Recorded with FoodAdvisor, the demo application that Strapi publishes.

- Tools: `create_project`, `import_vendor_project`, `audit_vendor_project` on https://go.coremodels.io/mcp-admin (can write, sign-in required)
- Example: FoodAdvisor, the demo application that Strapi publishes, https://github.com/strapi/foodadvisor
- Recorded: 2026-12-04

## What you get

You import the `schema.json` files of a repository once. After the next change, your assistant compares the new files with them and names each removed field and each removed value. The answer is a pass or a fail.

| What we did | What CoreModels answered | Time |
| --- | --- | --- |
| Imported the files of 7 March 2022 | 2 types in the model | 5 s |
| Audited the files of 23 November 2022 | **fail**: 9 errors (a field was removed, a list lost a value) | 3 s |
| Audited the first files again | **pass**: 0 errors | 1 s |

Recorded on 4 December 2026 with FoodAdvisor, the demo application that Strapi publishes ([repository](https://github.com/strapi/foodadvisor)). In 2022 its authors replaced the four price values of a restaurant and removed eight fields from the article and the restaurant. Licence: MIT.

## What you need

- A CoreModels account with one project. Every plan starts with a 14-day free trial; a card is required to start.
- An assistant that can use MCP servers, for example Claude Code or Cursor.
- No Strapi login. CoreModels reads files from public links.

## Run it

### 1. Connect your assistant

In Claude Code, run this command. Then sign in when it asks. This address can write to your projects, because an import creates a model.

```bash
claude mcp add --transport http coremodels https://go.coremodels.io/mcp-admin
```

Cursor, Claude Desktop and other clients: [connect guide](/mcp-server).

### 2. Import the version the site was built on

This is the content model of 7 March 2022, read from GitHub.

```text
Create a CoreModels project named "Strapi example". Then call import_vendor_project on it with vendor "strapi" and these links in artifactUrls (name: link):
api/restaurant/content-types/restaurant/schema.json: https://raw.githubusercontent.com/strapi/foodadvisor/28cebb1aab4e9546d95678ff0dd048876a57ff68/api/src/api/restaurant/content-types/restaurant/schema.json
api/article/content-types/article/schema.json: https://raw.githubusercontent.com/strapi/foodadvisor/28cebb1aab4e9546d95678ff0dd048876a57ff68/api/src/api/article/content-types/article/schema.json
```

Your assistant calls `create_project`, then `import_vendor_project`. The answer we got:

`import_vendor_project (part of the answer)`

```json
{
  "success": true,
  "vendor": "strapi",
  "datasetsAdded": 2,
  "nodesEnriched": 27,
  "errors": []
}
```

Your model has 2 types now. Each has its fields, with the type from Strapi.

### 3. Audit the newer version

In 2022 its authors replaced the four price values of a restaurant and removed eight fields from the article and the restaurant.

```text
Now call audit_vendor_project on the same project with vendor "strapi" and the newer files in artifactUrls. Tell me the gate and list every Error:
api/restaurant/content-types/restaurant/schema.json: https://raw.githubusercontent.com/strapi/foodadvisor/e6e6c4bc8572ccc171ec861463a2f72fbf75b7b8/api/src/api/restaurant/content-types/restaurant/schema.json
api/article/content-types/article/schema.json: https://raw.githubusercontent.com/strapi/foodadvisor/e6e6c4bc8572ccc171ec861463a2f72fbf75b7b8/api/src/api/article/content-types/article/schema.json
```

Your assistant calls `audit_vendor_project`. The answer we got:

`audit_vendor_project (part of the answer)`

```json
{
  "gate": "fail",
  "errorCount": 9,
  "warningCount": 8,
  "findings": [
    {
      "severity": "Error",
      "code": "field-removed",
      "subject": "article.publish_at",
      "message": "Field is governed in CoreModels but no longer exists on the estate dataset."
    },
    {
      "severity": "Error",
      "code": "field-removed",
      "subject": "article.comment",
      "message": "Field is governed in CoreModels but no longer exists on the estate dataset."
    },
    {
      "severity": "Error",
      "code": "field-removed",
      "subject": "article.ready",
      "message": "Field is governed in CoreModels but no longer exists on the estate dataset."
    },
    {
      "severity": "Error",
      "code": "field-removed",
      "subject": "article.author",
      "message": "Field is governed in CoreModels but no longer exists on the estate dataset."
    },
    {
      "severity": "Error",
      "code": "field-removed",
      "subject": "article.content",
      "message": "Field is governed in CoreModels but no longer exists on the estate dataset."
    },
    {
      "severity": "Error",
      "code": "field-removed",
      "subject": "restaurant.ready",
      "message": "Field is governed in CoreModels but no longer exists on the estate dataset."
    }
  ]
}
```

We show 6 of 9 errors. An audit only reads. The model still holds the first version.

### 4. Check that the gate also passes

A check that always fails is of no use. Audit the first version again.

```text
Call audit_vendor_project again, this time with the first links. The gate must be pass.
```

Your assistant calls `audit_vendor_project`. The answer we got:

`audit_vendor_project (part of the answer)`

```json
{
  "gate": "pass",
  "errorCount": 0,
  "warningCount": 6
}
```

## Now with your own project

The `schema.json` files of your content types. They are in your repository already. Open the repository in your assistant and use this prompt.

```text
Create a CoreModels project for our Strapi content model. Import the schema.json files of our content types and our component files (src/api/*/content-types/*/schema.json) with import_vendor_project, vendor "strapi". Then audit the same files and show me the gate. Keep the project id: we will audit each later change against it.
```

## In a pull request

This command gives the same answer without an assistant. It needs `jq`, a project id and an API key from Settings, API Keys. It ends with an error when the gate is fail, so a pull request check stops.

```bash
for f in src/api/*/content-types/*/schema.json src/components/*/*.json; do [ -f "$f" ] || continue; jq -n --arg n "$f" --rawfile t "$f" '{($n): $t}'; done |
  jq -s '{artifacts: add, failOn: "error"}' |
  curl -sS -X POST "https://go.coremodels.io/v1/$PROJECT_ID/integrations/strapi/audit" -H "Authorization: Bearer $COREMODELS_KEY" -H "Content-Type: application/json" -d @- |
  jq -e '.data | .gate, (.findings[] | select(.severity == "Error") | .code + " " + .subject), (.gate == "pass")'
```

The service answers 200 also when the gate is fail. Read `gate`, as the command does. If the command prints `null`, no file was found at that path.

## What it does not do

- A field that becomes required is not reported.
- A content type that is deleted is not reported. Its fields are no longer compared.
- CoreModels reads the files you give it. It does not connect to your Strapi server and it runs no database migration.

[Start building](https://www.coremodels.io/start)

14-day free trial. Builder $49/mo after the trial. Cancel any time.

## Sitemap

- [Sitemap in markdown](https://www.coremodels.io/sitemap.md)
