Skip to content

Manifest Schema Definitions #196

@joshmedeski

Description

@joshmedeski

I created json-schema definitions following the Obsidian Docs - Manifest page.

Schema Defintions

Obsidian Plugin Manifest Schema
{
  "$schema": "http://json-schema.org/draft-07/schema#",
  "title": "Obsidian Theme Manifest",
  "description": "Schema for Obsidian theme manifest.json files",
  "type": "object",
  "required": ["name", "version", "minAppVersion", "author"],
  "properties": {
    "name": {
      "type": "string",
      "description": "Display name of the theme as shown in the UI",
      "minLength": 1
    },
    "version": {
      "type": "string",
      "description": "Current version of the theme following semantic versioning",
      "pattern": "^\\d+\\.\\d+\\.\\d+$"
    },
    "minAppVersion": {
      "type": "string",
      "description": "Minimum Obsidian version required for this theme",
      "pattern": "^\\d+\\.\\d+\\.\\d+$"
    },
    "author": {
      "type": "string",
      "description": "Name of the theme author or organization",
      "minLength": 1
    },
    "authorUrl": {
      "type": "string",
      "description": "URL to the author's website or profile",
      "format": "uri"
    },
    "fundingUrl": {
      "oneOf": [
        {
          "type": "string",
          "description": "Single funding URL",
          "format": "uri"
        },
        {
          "type": "object",
          "description": "Multiple funding options with display names",
          "patternProperties": {
            "^.+$": {
              "type": "string",
              "format": "uri"
            }
          },
          "additionalProperties": false
        }
      ]
    },
    "modes": {
      "type": "array",
      "description": "Supported color modes for the theme",
      "items": {
        "type": "string",
        "enum": ["light", "dark"]
      },
      "uniqueItems": true,
      "minItems": 1
    }
  },
  "additionalProperties": false
Obsidian Theme Manifest Schema
{
  "$schema": "http://json-schema.org/draft-07/schema#",
  "title": "Obsidian Plugin Manifest",
  "description": "Schema for Obsidian plugin manifest.json files",
  "type": "object",
  "required": [
    "id",
    "name",
    "version",
    "minAppVersion",
    "description",
    "author"
  ],
  "properties": {
    "id": {
      "type": "string",
      "description": "Unique identifier for the plugin. Must be unique across all plugins.",
      "pattern": "^[a-z0-9-]+$"
    },
    "name": {
      "type": "string",
      "description": "Display name of the plugin as shown in the UI",
      "minLength": 1
    },
    "version": {
      "type": "string",
      "description": "Current version of the plugin following semantic versioning",
      "pattern": "^\\d+\\.\\d+\\.\\d+$"
    },
    "minAppVersion": {
      "type": "string",
      "description": "Minimum Obsidian version required to run this plugin",
      "pattern": "^\\d+\\.\\d+\\.\\d+$"
    },
    "description": {
      "type": "string",
      "description": "Brief description of what the plugin does",
      "minLength": 1
    },
    "author": {
      "type": "string",
      "description": "Name of the plugin author or organization",
      "minLength": 1
    },
    "authorUrl": {
      "type": "string",
      "description": "URL to the author's website or profile",
      "format": "uri"
    },
    "fundingUrl": {
      "oneOf": [
        {
          "type": "string",
          "description": "Single funding URL",
          "format": "uri"
        },
        {
          "type": "object",
          "description": "Multiple funding options with display names",
          "patternProperties": {
            "^.+$": {
              "type": "string",
              "format": "uri"
            }
          },
          "additionalProperties": false
        }
      ]
    },
    "isDesktopOnly": {
      "type": "boolean",
      "description": "Whether the plugin only works on desktop (not mobile)",
      "default": false
    }
  },
  "additionalProperties": false
}

Preview

If configured properly in your code editor, you can get validation and definitions to show:

Image

Next Steps

  1. Would you like me to submit them to a project like JSON Schema Store
  2. Do you want them uploaded here to the obsidian-developer-docs repo?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions