API Reference Get Deprecation Table
Get Deprecation Table
Every deprecated authoring form with its machine-applicable rewrite rule — what stx migrate applies
Returns every deprecated form
— config keys, frontmatter keys, MDX tags and props — with the rule that
rewrites it. stx migrate fetches this, so newly published
rules reach an older stx.
Authentication
None. Public, with the same caching headers as
Get syntext.json Schema
(Content-Type: application/json).
Response
NameDescription
versionThe table format version (
1).windowDaysDays between a deprecation notice and removal (
14).itemsOne entry per code:
code, kind (config, frontmatter, mdx-tag, mdx-prop), old, replacement, rewrite, fix (the rewrite in plain words), requiresV2 (the replacement needs doc engine v2, so it's held back on v1 sites) and an optional note.Rewrite types
| rewrite.type | Fields | What it does |
|---|---|---|
move-key | from, to[], values? | Copy the value at from to each path in to (mapped through values when present), skip a target that's already set, then delete from. [] in a path means every array element |
set-value | path, from, to | Replace the value from at path with to |
remove-key | path | Delete the key |
rename-file | from, to | Rename the config file, only when to doesn't exist |
rename-frontmatter-key | from, to | Rename the key unless to is set (then delete from) |
frontmatter-flag-to-value | from, to, value | from: true becomes to: value unless to is set; from: false is deleted |
rename-tag | from, to | Rename opening, closing and self-closing tags outside code fences |
tag-from-prop | tag, prop, map | <tag prop="x"> becomes <map[x]> with the prop dropped, and the closing tag follows. Unknown values are left alone |
rename-prop | tag, from, to | Rename the attribute on that tag unless to is present |
home-to-mdx | file ("index") | Write the index page's generated home as home components — from its home frontmatter, or the preset's home when there is none — and drop home. Needs the site's last build (Convert the home to content with target: "preview") |
manual | hint | Not automatic — a person renames or deletes it |
Example
Abbreviated to two of the 38 items.
Was this page helpful? Yes No
Previous
Request
cURLJavaScriptPythonGoRubyPHPJavaC#cURL
curl https://api.syntext.dev/v1/schema/deprecations.json
const response = await fetch('https://api.syntext.dev/v1/schema/deprecations.json', {
method: 'GET',
});
const data = await response.json();
console.log(response.status, data);
import requests
url = "https://api.syntext.dev/v1/schema/deprecations.json"
response = requests.get(url)
print(response.status_code)
print(response.json())
package main
import (
"fmt"
"io"
"net/http"
)
func main() {
req, err := http.NewRequest("GET", "https://api.syntext.dev/v1/schema/deprecations.json", nil)
if err != nil {
panic(err)
}
res, err := http.DefaultClient.Do(req)
if err != nil {
panic(err)
}
defer res.Body.Close()
body, err := io.ReadAll(res.Body)
if err != nil {
panic(err)
}
fmt.Println(res.Status)
fmt.Println(string(body))
}
require "net/http"
require "uri"
uri = URI("https://api.syntext.dev/v1/schema/deprecations.json")
http = Net::HTTP.new(uri.host, uri.port)
http.use_ssl = uri.scheme == "https"
request = Net::HTTP::Get.new(uri)
response = http.request(request)
puts response.code
puts response.body
<?php
$ch = curl_init();
curl_setopt_array($ch, [
CURLOPT_URL => 'https://api.syntext.dev/v1/schema/deprecations.json',
CURLOPT_CUSTOMREQUEST => 'GET',
CURLOPT_RETURNTRANSFER => true,
]);
$response = curl_exec($ch);
if ($response === false) {
throw new RuntimeException(curl_error($ch));
}
$status = curl_getinfo($ch, CURLINFO_RESPONSE_CODE);
curl_close($ch);
echo $status, PHP_EOL, $response, PHP_EOL;
import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
public class Main {
public static void main(String[] args) throws Exception {
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("https://api.syntext.dev/v1/schema/deprecations.json"))
.GET()
.build();
HttpResponse<String> response = HttpClient.newHttpClient()
.send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.statusCode());
System.out.println(response.body());
}
}
using System.Net.Http;
using System.Text;
using var client = new HttpClient();
using var request = new HttpRequestMessage(HttpMethod.Get, "https://api.syntext.dev/v1/schema/deprecations.json");
using var response = await client.SendAsync(request);
Console.WriteLine((int)response.StatusCode);
Console.WriteLine(await response.Content.ReadAsStringAsync());
Responseapplication/json
json
{
"version": 1,
"windowDays": 14,
"items": [
{
"code": "mdx.update-label",
"kind": "mdx-prop",
"old": "<Update label=\"…\">",
"replacement": "<Update title=\"…\">",
"rewrite": { "type": "rename-prop", "tag": "Update", "from": "label", "to": "title" },
"fix": "Rename the label prop of <Update> to title.",
"requiresV2": false
},
{
"code": "config.colors-primary",
"kind": "config",
"old": "colors.primary",
"replacement": "appearance.accent",
"rewrite": { "type": "move-key", "from": "colors.primary", "to": ["appearance.accent"] },
"fix": "Move colors.primary to appearance.accent.",
"requiresV2": true,
"note": "The appearance block applies when the site renders with doc engine v2; adding it opts the site in. v1 also painted parameter names with colors.primary; appearance.accent derives every accent token instead."
}
]
}