string
{
"type": "string"
}string Comprehensive fixture page for visually reviewing the JsonSchemaFields renderer. Not part of the docs nav. Edit app/pages/dev/schema-gallery.vue to add cases.
25 entries flagged as needs investigation — see amber-bordered cards below.
{
"type": "string"
}stringIn javascript mode, renders as `number`.
{
"type": "integer"
}numberIn javascript mode, renders as `Date` and the format chip is suppressed.
{
"type": "string",
"format": "date-time"
}Date{
"type": "string",
"format": "email"
}string{
"type": "string",
"pattern": "^[a-z]+$"
}string{
"type": "string",
"format": "email",
"pattern": "^[^@]+@[^@]+$"
}string{
"type": "number",
"minimum": 0,
"maximum": 100,
"exclusiveMinimum": 0,
"multipleOf": 5
}numberEmpty schema — classified as `empty`.
{}{
"type": "null"
}{
"type": "object"
}{
"const": "fixed"
}"fixed"{
"const": 42
}42{
"const": "a",
"enum": [
"a",
"b"
]
}"a"{
"enum": [
"a",
"b",
"c"
]
}"a" | "b" | "c"{
"enum": [
"on",
"off",
0,
1
]
}"on" | "off" | 0 | 1Replaces the old `Array.isArray(schema.type)` workaround in `getTypeName`.
{
"type": [
"string",
"null"
]
}string | null3-way join in the multi-type kind.
{
"type": [
"string",
"number",
"null"
]
}string | number | nullNormalised by classify into multi-type as if `type: ["string","null"]`.
{
"type": "string",
"nullable": true
}string | nullKNOWN GAP: javascript-mode format mapping (`Date | null`) is lost — multi-type ignores `format`.
{
"type": "string",
"format": "date-time",
"nullable": true
}string | nullExercises the field-row code path.
{
"type": "object",
"properties": {
"id": {
"type": "string"
},
"middleName": {
"type": [
"string",
"null"
]
}
},
"required": [
"id"
]
}Should render as `(string | null)[]` — `needsParensInArrayContext` adds the parens.
{
"type": "array",
"items": {
"type": [
"string",
"null"
]
}
}(string | null)[]KNOWN GAP: classify's nullable branch only fires when `typeof type === "string"` — this stays `kind: "object"` and nullable is ignored.
{
"type": "object",
"id": "Foo",
"properties": {
"x": {
"type": "string"
}
},
"required": [
"x"
],
"nullable": true
}object | null{
"allOf": [
{
"id": "A",
"type": "object",
"properties": {
"a": {
"type": "string"
}
},
"required": [
"a"
]
},
{
"id": "B",
"type": "object",
"properties": {
"b": {
"type": "number"
}
},
"required": [
"b"
]
}
]
}A & Bnuxt-component-meta sometimes emits this — should unwrap to plain `string`.
{
"allOf": [
{
"type": "string"
}
]
}stringRecursive $ref entries dropped — JsonSchemaFields recurses into resolved properties with `dereferenced: true`, but cyclic graphs lose the $defs context after the first deref.
{
"$defs": {
"Foo": {
"id": "Foo",
"type": "object",
"properties": {
"x": {
"type": "string"
}
},
"required": [
"x"
]
}
},
"$ref": "#/$defs/Foo"
}This is the shape canonical-types reflection actually produces — *not* multi-type.
{
"anyOf": [
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}string | number | nullWhen the union has an id, the field shows the id.
{
"id": "Node",
"anyOf": [
{
"id": "TextNode",
"type": "object",
"properties": {
"type": {
"const": "text"
},
"text": {
"type": "string"
}
},
"required": [
"type",
"text"
]
},
{
"id": "ImageNode",
"type": "object",
"properties": {
"type": {
"const": "image"
},
"src": {
"type": "string",
"format": "uri"
}
},
"required": [
"type",
"src"
]
}
]
}Accepts one of the following:
{
"id": "Media",
"anyOf": [
{
"id": "ImageNode",
"type": "object",
"properties": {
"type": {
"const": "image"
},
"src": {
"type": "string",
"format": "uri"
}
},
"required": [
"type",
"src"
]
},
{
"id": "Video",
"type": "object",
"properties": {
"type": {
"const": "video"
},
"src": {
"type": "string",
"format": "uri"
}
},
"required": [
"type",
"src"
]
},
{
"id": "FileNode",
"type": "object",
"properties": {
"type": {
"const": "file"
},
"href": {
"type": "string",
"format": "uri"
},
"mime": {
"type": "string"
}
},
"required": [
"type",
"href"
]
}
]
}Accepts one of the following:
{
"anyOf": [
{
"id": "Foo",
"type": "object",
"properties": {
"x": {
"type": "string"
}
},
"required": [
"x"
]
},
{
"type": "string"
}
]
}{
"type": "array",
"items": {
"anyOf": [
{
"id": "TextNode",
"type": "object",
"properties": {
"type": {
"const": "text"
},
"text": {
"type": "string"
}
},
"required": [
"type",
"text"
]
},
{
"id": "ImageNode",
"type": "object",
"properties": {
"type": {
"const": "image"
},
"src": {
"type": "string",
"format": "uri"
}
},
"required": [
"type",
"src"
]
}
]
}
}Accepts an array of the following:
{
"anyOf": [
{
"type": "array",
"items": [
{
"const": "color"
},
{
"type": "string"
}
]
},
{
"type": "array",
"items": [
{
"const": "colors"
},
{
"type": "array",
"items": {
"type": "string"
}
}
]
},
{
"type": "array",
"items": [
{
"const": "gradient"
},
{
"type": "array",
"items": {
"type": "string"
}
}
]
}
]
}Accepts one of the following:
Clean alias — always expands.
{
"id": "FallbackVariant",
"anyOf": [
{
"const": "icon"
},
{
"const": "text"
},
{
"const": "none"
}
]
}Accepts one of the following:
"icon""text""none"{
"id": "\"a\" | \"b\" | \"c\" | \"d\"",
"anyOf": [
{
"const": "a"
},
{
"const": "b"
},
{
"const": "c"
},
{
"const": "d"
}
]
}Accepts one of the following:
"a""b""c""d"Below the 4-const threshold — does not expand.
{
"id": "\"a\" | \"b\"",
"anyOf": [
{
"const": "a"
},
{
"const": "b"
}
]
}"a" | "b"{
"id": "IconName",
"anyOf": [
{
"const": "arrow"
},
{
"const": "check"
},
{
"const": "close"
},
{
"const": "menu"
},
{
"const": "home"
},
{
"type": "string"
}
]
}Accepts one of the following:
"arrow""check""close""menu""home"or anystring{
"id": "Sized",
"anyOf": [
{
"const": "s"
},
{
"const": "m"
},
{
"const": "l"
},
{
"type": "string"
},
{
"type": "number"
}
]
}Accepts one of the following:
"s""m""l"or anystring/number{
"id": "PowerOfTwo",
"anyOf": [
{
"const": 1
},
{
"const": 2
},
{
"const": 4
},
{
"const": 8
}
]
}Accepts one of the following:
1248{
"anyOf": [
{
"const": "on"
},
{
"const": "off"
},
{
"const": 0
},
{
"const": 1
}
]
}"on" | "off" | 0 | 1.todo line 581: clean alias should expand, currently collapses to `boolean`.
{
"id": "Toggle",
"anyOf": [
{
"const": true
},
{
"const": false
}
]
}Accepts one of the following:
truefalse{
"type": "object",
"properties": {
"name": {
"type": "string"
},
"age": {
"type": "integer"
}
},
"required": [
"name"
]
}{
"id": "User",
"type": "object",
"properties": {
"name": {
"type": "string"
},
"email": {
"type": "string",
"format": "email"
}
},
"required": [
"name",
"email"
]
}{
"type": "object",
"properties": {
"active": {
"type": "boolean"
},
"legacy": {
"type": "string",
"deprecated": true
}
},
"required": [
"active"
]
}{
"type": "object",
"properties": {
"greeting": {
"type": "string",
"default": "hello"
},
"retries": {
"type": "integer",
"default": 3
}
}
}{
"type": "object",
"properties": {
"a": {
"type": "object",
"properties": {
"b": {
"type": "object",
"properties": {
"c": {
"type": "string"
}
},
"required": [
"c"
]
}
},
"required": [
"b"
]
}
},
"required": [
"a"
]
}{
"type": "object",
"id": "Profile",
"properties": {
"displayName": {
"type": "string"
},
"middleName": {
"type": [
"string",
"null"
]
},
"age": {
"type": "integer",
"nullable": true
}
},
"required": [
"displayName"
]
}In javascript mode renders as `Record<string, string>`.
{
"type": "object",
"additionalProperties": {
"type": "string"
}
}Record<string, string>{
"type": "object",
"additionalProperties": {
"anyOf": [
{
"id": "TextNode",
"type": "object",
"properties": {
"type": {
"const": "text"
},
"text": {
"type": "string"
}
},
"required": [
"type",
"text"
]
},
{
"id": "ImageNode",
"type": "object",
"properties": {
"type": {
"const": "image"
},
"src": {
"type": "string",
"format": "uri"
}
},
"required": [
"type",
"src"
]
}
]
}
}Record<string, TextNode | ImageNode>{
"id": "CustomFields",
"title": "CustomFields",
"type": "object",
"additionalProperties": {}
}Record<string, unknown>.todo line 576: should render as object + "any other key" row. Currently `additionalProperties` is dropped because object branch wins.
{
"type": "object",
"properties": {
"id": {
"type": "string"
}
},
"required": [
"id"
],
"additionalProperties": {
"type": "number"
}
}{
"type": "array",
"items": {
"type": "string"
}
}string[]{
"type": "array",
"items": {
"type": "string"
},
"minItems": 1,
"maxItems": 10,
"uniqueItems": true
}string[]{
"type": "array",
"items": {
"anyOf": [
{
"type": "string"
},
{
"type": "number"
}
]
}
}string | number{
"type": "array",
"items": {
"allOf": [
{
"type": "string"
},
{
"id": "Branded",
"type": "object"
}
]
}
}string & objectItems description should appear above the expanded property list (`getVariantListDescriptionHtml`).
{
"type": "array",
"items": {
"id": "Foo",
"type": "object",
"description": "A Foo represents a configurable thing in the system.",
"properties": {
"x": {
"type": "string"
}
},
"required": [
"x"
]
}
}{
"type": "array",
"items": [
{
"type": "string"
},
{
"type": "number"
},
{
"type": "boolean"
}
]
}Slot 2 should render as `number?`.
{
"type": "array",
"items": [
{
"type": "string"
},
{
"type": "number"
}
],
"minItems": 1
}{
"type": "array",
"items": [
{
"const": "colors"
},
{
"type": "array",
"items": {
"type": "string"
}
}
]
}{
"type": "array",
"items": [
{
"enum": [
"x",
"y",
"z"
]
},
{
"type": "number"
}
]
}Description on the field row, always visible.
{
"type": "object",
"properties": {
"foo": {
"type": "string",
"description": "A property-level description."
}
}
}A property-level description.
No property description here — when expandable & single-variant & variant.schema === field, `isFieldDescriptionFromObject` is true so the description shows only when expanded.
{
"type": "object",
"properties": {
"foo": {
"id": "Foo",
"type": "object",
"description": "Object-level description (only when expanded).",
"properties": {
"x": {
"type": "string",
"description": "Inner field description."
}
},
"required": [
"x"
]
}
}
}Description appears only when expanded.
{
"type": "object",
"properties": {
"user": {
"id": "User",
"type": "object",
"description": "A registered user account.",
"properties": {
"name": {
"type": "string"
},
"email": {
"type": "string",
"format": "email"
}
},
"required": [
"name",
"email"
]
}
}
}Items description renders above the expanded property list (`getVariantListDescriptionHtml`).
{
"type": "object",
"properties": {
"items": {
"type": "array",
"items": {
"id": "Item",
"type": "object",
"description": "A line item in the cart.",
"properties": {
"sku": {
"type": "string"
},
"qty": {
"type": "integer"
}
},
"required": [
"sku",
"qty"
]
}
}
}
}Property description on field row; items description above the expanded list.
{
"type": "object",
"properties": {
"lineItems": {
"type": "array",
"description": "Cart line items.",
"items": {
"id": "LineItem",
"type": "object",
"description": "A LineItem describes a single product entry.",
"properties": {
"sku": {
"type": "string"
},
"qty": {
"type": "integer"
}
},
"required": [
"sku",
"qty"
]
}
}
}
}Cart line items.
Per-variant descriptions render in JsonSchemaVariantList rows.
{
"type": "object",
"properties": {
"node": {
"anyOf": [
{
"id": "TextNode",
"type": "object",
"description": "A leaf node containing inline text.",
"properties": {
"type": {
"const": "text"
},
"text": {
"type": "string"
}
},
"required": [
"type",
"text"
]
},
{
"id": "ImageNode",
"type": "object",
"description": "A leaf node containing an image source URL.",
"properties": {
"type": {
"const": "image"
},
"src": {
"type": "string",
"format": "uri"
}
},
"required": [
"type",
"src"
]
}
]
}
}
}Each variant row prefixes the description with bolded title (when title differs from id).
{
"type": "object",
"properties": {
"kind": {
"id": "Kind",
"title": "A human-readable kind label",
"description": "Distinguishes between supported kinds.",
"anyOf": [
{
"id": "Alpha",
"title": "Alpha (priority A)",
"description": "Highest priority routing.",
"type": "object",
"properties": {
"tag": {
"const": "alpha"
}
},
"required": [
"tag"
]
},
{
"id": "Beta",
"title": "Beta (priority B)",
"description": "Standard routing.",
"type": "object",
"properties": {
"tag": {
"const": "beta"
}
},
"required": [
"tag"
]
}
]
}
}
}Distinguishes between supported kinds.
{
"id": "Component",
"title": "Component"
}Component{
"anyOf": [
{
"type": "string"
},
{
"type": "number"
},
{
"type": "null"
}
]
}string | number | null{
"id": "CustomFields",
"title": "CustomFields",
"type": "object",
"additionalProperties": {}
}Record<string, unknown>{
"type": "string",
"readOnly": true,
"default": "hello",
"minLength": 1,
"maxLength": 32
}string{
"type": "string",
"writeOnly": true,
"deprecated": true
}string.todo line 570: spec says `true` means "any value". Currently passes through unchanged.
{
"type": "object",
"properties": {
"anything": true
}
}.todo line 578: currently emits chip with value `"true"` instead of falling back to `minimum`.
{
"type": "number",
"minimum": 0,
"exclusiveMinimum": true
}number.todo line 573: conditional schemas are ignored.
{
"type": "object",
"properties": {
"kind": {
"type": "string"
}
},
"if": {
"properties": {
"kind": {
"const": "a"
}
}
},
"then": {
"required": [
"extraA"
]
},
"else": {
"required": [
"extraB"
]
}
}.todo line 574: `not` is ignored.
{
"not": {
"type": "string"
}
}unknown