Summary

Description
Item categories are organized in a tree. Categories with a blank for parent are roots.
Data path
resources/data/item_category.csv
Schema
https://poketools.gamestuff.info/data/schema/item_category.json

Fields

identifier

A machine-usable name for the entity. This is usually a munged version of the entity name. An identifier must consist only of lowercase ASCII characters, 0-9, and/or a hyphen.

i.e. anything unique to the entity matching the regular expression ^[a-z0-9\-]+$ (Test it here)

type

string

pattern

^[a-z0-9\-]+$ (Test)

required

name

The entity’s user-facing name. All of UTF-8 is valid here, so use “é” where appropriate.

type

string

required

parent

The parent category identifier. Omit if this is a root category.

A machine-usable name for the entity. This is usually a munged version of the entity name. An identifier must consist only of lowercase ASCII characters, 0-9, and/or a hyphen.

i.e. anything unique to the entity matching the regular expression ^[a-z0-9\-]+$ (Test it here)

type
string
pattern
^[a-z0-9\-]+$ (Test)

JSON Schema

View raw

{
  "$schema": "http://json-schema.org/draft-07/schema#",
  "$id": "https://poketools.gamestuff.info/data/schema/item_category.json",
  "title": "Item Category tree",
  "description": "Item categories are organized in a tree.  Categories with a blank for `parent` are roots.",
  "type": "object",
  "properties": {
    "identifier": {
      "$ref": "types/identifier.json"
    },
    "parent": {
      "title": "Parent category identifier",
      "oneOf": [
        {
          "allOf": [
            {
              "$ref": "types/identifier.json"
            },
            {
              "type": "string",
              "$filter": "categoryIdentifier"
            }
          ]
        },
        {
          "title": "Blank",
          "type": "string",
          "minLength": 0,
          "maxLength": 0
        }
      ],
      "default": ""
    },
    "name": {
      "$ref": "types/name.json"
    }
  },
  "additionalProperties": false,
  "required": [
    "identifier",
    "name"
  ]
}