{
  "openapi": "3.1.0",
  "info": {
    "title": "MIAN API",
    "version": "1.7.0",
    "summary": "MIAN as data: components, noodles (design languages), website templates, a site planner, a markup validator, a custom-noodle generator and a site inspector.",
    "description": "MIAN is an accessible UI library for the web: components written as semantic HTML with mn- classes, page sections, 67 complete design languages (\"noodles\") and 24 website templates. This API is read-only, needs no key and allows any origin (CORS). The same data is published as static files under https://mian.ro/registry/. Start page for AI agents: https://mian.ro/ai. Paths without a version (/api/components) are aliases of /api/v1.",
    "contact": {
      "name": "BTN GROUP SRL",
      "url": "https://mian.ro/contact"
    },
    "license": {
      "name": "MIAN License 1.0",
      "identifier": "LicenseRef-MIAN-1.0",
      "url": "https://mian.ro/license"
    }
  },
  "externalDocs": {
    "description": "MIAN for AI agents, start here",
    "url": "https://mian.ro/ai"
  },
  "servers": [
    {
      "url": "https://mian.ro/api/v1",
      "description": "Production"
    }
  ],
  "tags": [
    {
      "name": "Start",
      "description": "Index, health and licence."
    },
    {
      "name": "Build",
      "description": "Plan a site, pick a noodle, validate markup."
    },
    {
      "name": "Components"
    },
    {
      "name": "Noodles"
    },
    {
      "name": "Templates"
    },
    {
      "name": "Guide"
    }
  ],
  "paths": {
    "/": {
      "get": {
        "tags": [
          "Start"
        ],
        "operationId": "getIndex",
        "summary": "Index: counts, licence, rules for agents and every route",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          }
        }
      }
    },
    "/health": {
      "get": {
        "tags": [
          "Start"
        ],
        "operationId": "getHealth",
        "summary": "Health of the API and its dataset",
        "responses": {
          "200": {
            "description": "The API is up",
            "content": {
              "application/health+json": {
                "schema": {
                  "$ref": "#/components/schemas/Health"
                }
              }
            }
          },
          "503": {
            "description": "The dataset is unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/license": {
      "get": {
        "tags": [
          "Start"
        ],
        "operationId": "getLicense",
        "summary": "The licence as data",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "license": {
                      "$ref": "#/components/schemas/License"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/plan": {
      "get": {
        "tags": [
          "Build"
        ],
        "operationId": "planSite",
        "summary": "Plan a website deterministically",
        "description": "From a kind of site, an art direction and must-have content, returns recommended noodles, the closest template, page outlines with real component ids, composition direction, rules and what to read next. No inference: the same brief gets the same answer.",
        "parameters": [
          {
            "name": "type",
            "in": "query",
            "required": false,
            "description": "Kind of site in any words, e.g. \"small European digital agency\". Known types: agency, portfolio, saas, dashboard, admin, crm, shop, product, docs, blog, restaurant, hotel, booking, event, app, social, presentation, company, realestate, course.",
            "schema": {
              "type": "string",
              "maxLength": 200
            }
          },
          {
            "name": "style",
            "in": "query",
            "required": false,
            "description": "Art direction in words, e.g. \"confident, unusual, not corporate\". \"not …\" is understood.",
            "schema": {
              "type": "string",
              "maxLength": 300
            }
          },
          {
            "name": "needs",
            "in": "query",
            "required": false,
            "description": "Must-have content, comma-separated, e.g. \"portfolio,services,faq,contact\".",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "cards",
            "in": "query",
            "required": false,
            "description": "Composition control: cards.",
            "schema": {
              "type": "string",
              "enum": [
                "restrained",
                "normal",
                "dense"
              ]
            }
          },
          {
            "name": "repetition",
            "in": "query",
            "required": false,
            "description": "Composition control: repetition.",
            "schema": {
              "type": "string",
              "enum": [
                "low",
                "medium",
                "high"
              ]
            }
          },
          {
            "name": "asymmetry",
            "in": "query",
            "required": false,
            "description": "Composition control: asymmetry.",
            "schema": {
              "type": "string",
              "enum": [
                "low",
                "medium",
                "high"
              ]
            }
          },
          {
            "name": "rhythm",
            "in": "query",
            "required": false,
            "description": "Composition control: rhythm.",
            "schema": {
              "type": "string",
              "enum": [
                "uniform",
                "varied"
              ]
            }
          },
          {
            "name": "surprise",
            "in": "query",
            "required": false,
            "description": "Composition control: surprise.",
            "schema": {
              "type": "string",
              "enum": [
                "restrained",
                "medium",
                "expressive"
              ]
            }
          },
          {
            "name": "density",
            "in": "query",
            "required": false,
            "description": "Composition control: density.",
            "schema": {
              "type": "string",
              "enum": [
                "low",
                "medium",
                "high"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Plan"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          }
        }
      }
    },
    "/noodles/find": {
      "get": {
        "tags": [
          "Build",
          "Noodles"
        ],
        "operationId": "findNoodles",
        "summary": "Noodles for a style brief",
        "parameters": [
          {
            "name": "q",
            "in": "query",
            "required": true,
            "description": "The look in words, e.g. \"conservative financial dashboard, dense, low visual noise\".",
            "schema": {
              "type": "string",
              "maxLength": 300
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "Results, 1–12.",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 12,
              "default": 5
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "query": {
                      "type": "string"
                    },
                    "count": {
                      "type": "integer"
                    },
                    "noodles": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/NoodleMatch"
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          }
        }
      }
    },
    "/noodles/create": {
      "get": {
        "tags": [
          "Build",
          "Noodles"
        ],
        "operationId": "createNoodleGet",
        "summary": "Make a custom noodle from brand colours",
        "description": "Turns brand guidelines into a stylesheet: tokens for light and dark on [data-brand], used next to data-noodle. The accent is derived by a colour harmony unless one is given. Every text pair is checked for WCAG contrast. The recipe (name, colours, options) is recorded.",
        "parameters": [
          {
            "name": "primary",
            "in": "query",
            "required": true,
            "description": "Brand colour as hex, with or without #.",
            "schema": {
              "type": "string",
              "pattern": "^#?[0-9a-fA-F]{6}$"
            }
          },
          {
            "name": "name",
            "in": "query",
            "required": false,
            "description": "Brand name; becomes the data-brand value.",
            "schema": {
              "type": "string",
              "maxLength": 40
            }
          },
          {
            "name": "base",
            "in": "query",
            "required": false,
            "description": "The noodle that gives shape, depth and motion.",
            "schema": {
              "type": "string",
              "enum": [
                "mian",
                "yangchun",
                "linguine",
                "penne",
                "chitarra",
                "shio",
                "spaghetti",
                "bucatini",
                "hofun",
                "hiyamugi",
                "ramyeon",
                "fettuccine",
                "lasagne",
                "pappardelle",
                "paccheri",
                "farfalle",
                "yinzhen",
                "quadretti",
                "acini",
                "kalguksu",
                "sanuki",
                "hakata",
                "ditalini",
                "juksing",
                "kishimen",
                "lamian",
                "somen",
                "capellini",
                "longxu",
                "misua",
                "bun",
                "kuzukiri",
                "sotanghon",
                "harusame",
                "fensi",
                "tokoroten",
                "nagashi",
                "liangfen",
                "dangmyeon",
                "woonsen",
                "shirataki",
                "chasoba",
                "daoxiao",
                "pici",
                "naengmyeon",
                "hoto",
                "ramen",
                "biangbiang",
                "maccheroni",
                "rigatoni",
                "fusilli",
                "jjajang",
                "laksa",
                "soba",
                "tagliatelle",
                "tajarin",
                "mafaldine",
                "corzetti",
                "inaniwa",
                "yifu",
                "udon",
                "gnocchi",
                "cavatelli",
                "orecchiette",
                "mee",
                "mixian",
                "pho"
              ]
            }
          },
          {
            "name": "accent",
            "in": "query",
            "required": false,
            "description": "Second brand colour as hex.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "harmony",
            "in": "query",
            "required": false,
            "description": "How the accent is derived when none is given.",
            "schema": {
              "type": "string",
              "enum": [
                "complementary",
                "analogous",
                "split",
                "triadic",
                "mono"
              ]
            }
          },
          {
            "name": "neutrals",
            "in": "query",
            "required": false,
            "description": "Page, text and line colours. keep = the base noodle’s own.",
            "schema": {
              "type": "string",
              "enum": [
                "keep",
                "tinted",
                "warm",
                "cool",
                "pure"
              ]
            }
          },
          {
            "name": "radius",
            "in": "query",
            "required": false,
            "description": "Corners.",
            "schema": {
              "type": "string",
              "enum": [
                "sharp",
                "small",
                "medium",
                "large",
                "pill"
              ]
            }
          },
          {
            "name": "density",
            "in": "query",
            "required": false,
            "description": "Control sizes.",
            "schema": {
              "type": "string",
              "enum": [
                "compact",
                "default",
                "comfortable"
              ]
            }
          },
          {
            "name": "font",
            "in": "query",
            "required": false,
            "description": "Text font stack.",
            "schema": {
              "type": "string",
              "enum": [
                "system",
                "sans",
                "grotesk",
                "rounded",
                "serif",
                "garamond",
                "didone",
                "mono"
              ]
            }
          },
          {
            "name": "heading",
            "in": "query",
            "required": false,
            "description": "Heading font stack.",
            "schema": {
              "type": "string",
              "enum": [
                "system",
                "sans",
                "grotesk",
                "rounded",
                "serif",
                "garamond",
                "didone",
                "mono"
              ]
            }
          },
          {
            "name": "weight",
            "in": "query",
            "required": false,
            "description": "Heading weight, 300 to 900.",
            "schema": {
              "type": "integer",
              "minimum": 300,
              "maximum": 900
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CustomNoodle"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          }
        }
      },
      "post": {
        "tags": [
          "Build",
          "Noodles"
        ],
        "operationId": "createNoodle",
        "summary": "Make a custom noodle from brand colours (JSON body)",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "primary"
                ],
                "properties": {
                  "primary": {
                    "type": "string"
                  },
                  "name": {
                    "type": "string"
                  },
                  "base": {
                    "type": "string",
                    "enum": [
                      "mian",
                      "yangchun",
                      "linguine",
                      "penne",
                      "chitarra",
                      "shio",
                      "spaghetti",
                      "bucatini",
                      "hofun",
                      "hiyamugi",
                      "ramyeon",
                      "fettuccine",
                      "lasagne",
                      "pappardelle",
                      "paccheri",
                      "farfalle",
                      "yinzhen",
                      "quadretti",
                      "acini",
                      "kalguksu",
                      "sanuki",
                      "hakata",
                      "ditalini",
                      "juksing",
                      "kishimen",
                      "lamian",
                      "somen",
                      "capellini",
                      "longxu",
                      "misua",
                      "bun",
                      "kuzukiri",
                      "sotanghon",
                      "harusame",
                      "fensi",
                      "tokoroten",
                      "nagashi",
                      "liangfen",
                      "dangmyeon",
                      "woonsen",
                      "shirataki",
                      "chasoba",
                      "daoxiao",
                      "pici",
                      "naengmyeon",
                      "hoto",
                      "ramen",
                      "biangbiang",
                      "maccheroni",
                      "rigatoni",
                      "fusilli",
                      "jjajang",
                      "laksa",
                      "soba",
                      "tagliatelle",
                      "tajarin",
                      "mafaldine",
                      "corzetti",
                      "inaniwa",
                      "yifu",
                      "udon",
                      "gnocchi",
                      "cavatelli",
                      "orecchiette",
                      "mee",
                      "mixian",
                      "pho"
                    ]
                  },
                  "accent": {
                    "type": "string"
                  },
                  "harmony": {
                    "type": "string"
                  },
                  "neutrals": {
                    "type": "string"
                  },
                  "radius": {
                    "type": "string"
                  },
                  "density": {
                    "type": "string"
                  },
                  "font": {
                    "type": "string"
                  },
                  "heading": {
                    "type": "string"
                  },
                  "weight": {
                    "type": "integer"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CustomNoodle"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          }
        }
      }
    },
    "/noodles/recommend": {
      "get": {
        "tags": [
          "Build",
          "Noodles"
        ],
        "operationId": "recommendNoodle",
        "summary": "Which noodle? From a brief, an existing site, or both",
        "description": "Ranks noodles for a brief in words (q), for a public site (url), or for both together. With url, the page is read once and its score and design language are returned too; that counts against the inspector’s limits.",
        "parameters": [
          {
            "name": "q",
            "in": "query",
            "required": false,
            "description": "The look and the kind of site, in words.",
            "schema": {
              "type": "string",
              "maxLength": 300
            }
          },
          {
            "name": "url",
            "in": "query",
            "required": false,
            "description": "A public site to match, e.g. example.com.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "Results, 1–8.",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 8
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "brief": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "site": {
                      "type": [
                        "object",
                        "null"
                      ]
                    },
                    "noodles": {
                      "type": "array",
                      "items": {
                        "type": "object"
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          }
        }
      }
    },
    "/inspect": {
      "get": {
        "tags": [
          "Build"
        ],
        "operationId": "inspectSiteGet",
        "summary": "Read a public web page and score its design language",
        "parameters": [
          {
            "name": "url",
            "in": "query",
            "required": true,
            "description": "A public http(s) address.",
            "schema": {
              "type": "string",
              "format": "uri"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Inspection"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "502": {
            "$ref": "#/components/responses/BadRequest"
          }
        }
      },
      "post": {
        "tags": [
          "Build"
        ],
        "operationId": "inspectSite",
        "summary": "Read a public web page and score its design language",
        "description": "Fetches one public page and its stylesheets (public addresses only, size and time limits), then returns a score in five areas with findings, the palette, fonts and corner shape in use, the closest noodles and the page’s own words. It reads code: it cannot see images or run JavaScript. Limited to 40 pages a day per client.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "url"
                ],
                "properties": {
                  "url": {
                    "type": "string",
                    "format": "uri"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Inspection"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          }
        }
      }
    },
    "/guide/design": {
      "get": {
        "tags": [
          "Guide"
        ],
        "operationId": "getDesignGuides",
        "summary": "The design guides as data: colour, type, branding, logo and motion",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          }
        }
      }
    },
    "/validate": {
      "get": {
        "tags": [
          "Build"
        ],
        "operationId": "validateMarkupGet",
        "summary": "Validate a small HTML fragment",
        "parameters": [
          {
            "name": "html",
            "in": "query",
            "required": true,
            "description": "HTML to check, up to 8 KB. POST for more.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Validation"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "413": {
            "$ref": "#/components/responses/BadRequest"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          }
        }
      },
      "post": {
        "tags": [
          "Build"
        ],
        "operationId": "validateMarkup",
        "summary": "Validate HTML against MIAN’s real vocabulary",
        "description": "Reports unknown mn- classes, noodle ids, data-mn attributes and mian.ro asset paths (with suggestions), a missing stylesheet or script, hard-coded colours and heading problems.",
        "requestBody": {
          "required": true,
          "content": {
            "text/html": {
              "schema": {
                "type": "string",
                "maxLength": 262144
              }
            },
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "html"
                ],
                "properties": {
                  "html": {
                    "type": "string"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Validation"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "413": {
            "$ref": "#/components/responses/BadRequest"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          }
        }
      }
    },
    "/classes": {
      "get": {
        "tags": [
          "Build"
        ],
        "operationId": "getClasses",
        "summary": "Every mn- class, data-mn attribute, noodle id, template id and asset URL",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          }
        }
      }
    },
    "/search": {
      "get": {
        "tags": [
          "Build"
        ],
        "operationId": "search",
        "summary": "Components, noodles and templates by intent",
        "parameters": [
          {
            "name": "q",
            "in": "query",
            "required": true,
            "description": "What you need, e.g. \"bulk actions\" or \"restaurant website\".",
            "schema": {
              "type": "string",
              "maxLength": 200
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "Results, 1–100.",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "default": 20
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "query": {
                      "type": "string"
                    },
                    "count": {
                      "type": "integer"
                    },
                    "results": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "type": {
                            "enum": [
                              "component",
                              "noodle",
                              "template"
                            ]
                          },
                          "id": {
                            "type": "string"
                          },
                          "name": {
                            "type": "string"
                          },
                          "score": {
                            "type": "integer"
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          }
        }
      }
    },
    "/components": {
      "get": {
        "tags": [
          "Components"
        ],
        "operationId": "listComponents",
        "summary": "List components",
        "parameters": [
          {
            "name": "category",
            "in": "query",
            "required": false,
            "description": "Filter by category.",
            "schema": {
              "type": "string",
              "enum": [
                "Actions",
                "Forms",
                "Data display",
                "Feedback",
                "Overlays",
                "Navigation",
                "Layout & utilities",
                "Sections"
              ]
            }
          },
          {
            "name": "q",
            "in": "query",
            "required": false,
            "description": "Filter and rank by intent or name.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "js",
            "in": "query",
            "required": false,
            "description": "Only components that need (true) or do not need (false) mian.js.",
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "Page size.",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 500,
              "default": 100
            }
          },
          {
            "name": "offset",
            "in": "query",
            "required": false,
            "description": "Offset.",
            "schema": {
              "type": "integer",
              "minimum": 0,
              "default": 0
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "total": {
                      "type": "integer"
                    },
                    "offset": {
                      "type": "integer"
                    },
                    "limit": {
                      "type": "integer"
                    },
                    "components": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/ComponentSummary"
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          }
        }
      }
    },
    "/components/{id}": {
      "get": {
        "tags": [
          "Components"
        ],
        "operationId": "getComponent",
        "summary": "One component: intents, composition, classes, accessibility, examples, CSS and JS",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "Component id (135 in total, e.g. button, button-group, toggle-group, dropdown).",
            "schema": {
              "type": "string",
              "pattern": "^[a-z0-9-]+$"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Component"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          }
        }
      }
    },
    "/components/{id}/source": {
      "get": {
        "tags": [
          "Components"
        ],
        "operationId": "getComponentSource",
        "summary": "A component’s CSS, JS and example HTML",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "Component id.",
            "schema": {
              "type": "string",
              "pattern": "^[a-z0-9-]+$"
            }
          },
          {
            "name": "part",
            "in": "query",
            "required": false,
            "description": "Only one part.",
            "schema": {
              "type": "string",
              "enum": [
                "css",
                "js",
                "examples"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          }
        }
      }
    },
    "/noodles": {
      "get": {
        "tags": [
          "Noodles"
        ],
        "operationId": "listNoodles",
        "summary": "All noodles with traits and design language",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "count": {
                      "type": "integer"
                    },
                    "noodles": {
                      "type": "array",
                      "items": {
                        "type": "object"
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/noodles/{id}": {
      "get": {
        "tags": [
          "Noodles"
        ],
        "operationId": "getNoodle",
        "summary": "One noodle: traits, every token in light and dark, design language",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "Noodle id.",
            "schema": {
              "type": "string",
              "enum": [
                "mian",
                "yangchun",
                "linguine",
                "penne",
                "chitarra",
                "shio",
                "spaghetti",
                "bucatini",
                "hofun",
                "hiyamugi",
                "ramyeon",
                "fettuccine",
                "lasagne",
                "pappardelle",
                "paccheri",
                "farfalle",
                "yinzhen",
                "quadretti",
                "acini",
                "kalguksu",
                "sanuki",
                "hakata",
                "ditalini",
                "juksing",
                "kishimen",
                "lamian",
                "somen",
                "capellini",
                "longxu",
                "misua",
                "bun",
                "kuzukiri",
                "sotanghon",
                "harusame",
                "fensi",
                "tokoroten",
                "nagashi",
                "liangfen",
                "dangmyeon",
                "woonsen",
                "shirataki",
                "chasoba",
                "daoxiao",
                "pici",
                "naengmyeon",
                "hoto",
                "ramen",
                "biangbiang",
                "maccheroni",
                "rigatoni",
                "fusilli",
                "jjajang",
                "laksa",
                "soba",
                "tagliatelle",
                "tajarin",
                "mafaldine",
                "corzetti",
                "inaniwa",
                "yifu",
                "udon",
                "gnocchi",
                "cavatelli",
                "orecchiette",
                "mee",
                "mixian",
                "pho"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          }
        }
      }
    },
    "/noodles/{id}/css": {
      "get": {
        "tags": [
          "Noodles"
        ],
        "operationId": "getNoodleCss",
        "summary": "One noodle’s tokens as CSS",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "Noodle id.",
            "schema": {
              "type": "string",
              "enum": [
                "mian",
                "yangchun",
                "linguine",
                "penne",
                "chitarra",
                "shio",
                "spaghetti",
                "bucatini",
                "hofun",
                "hiyamugi",
                "ramyeon",
                "fettuccine",
                "lasagne",
                "pappardelle",
                "paccheri",
                "farfalle",
                "yinzhen",
                "quadretti",
                "acini",
                "kalguksu",
                "sanuki",
                "hakata",
                "ditalini",
                "juksing",
                "kishimen",
                "lamian",
                "somen",
                "capellini",
                "longxu",
                "misua",
                "bun",
                "kuzukiri",
                "sotanghon",
                "harusame",
                "fensi",
                "tokoroten",
                "nagashi",
                "liangfen",
                "dangmyeon",
                "woonsen",
                "shirataki",
                "chasoba",
                "daoxiao",
                "pici",
                "naengmyeon",
                "hoto",
                "ramen",
                "biangbiang",
                "maccheroni",
                "rigatoni",
                "fusilli",
                "jjajang",
                "laksa",
                "soba",
                "tagliatelle",
                "tajarin",
                "mafaldine",
                "corzetti",
                "inaniwa",
                "yifu",
                "udon",
                "gnocchi",
                "cavatelli",
                "orecchiette",
                "mee",
                "mixian",
                "pho"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "CSS",
            "content": {
              "text/css": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          }
        }
      }
    },
    "/templates": {
      "get": {
        "tags": [
          "Templates"
        ],
        "operationId": "listTemplates",
        "summary": "Whole-website templates",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "count": {
                      "type": "integer"
                    },
                    "templates": {
                      "type": "array",
                      "items": {
                        "type": "object"
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/templates/{id}": {
      "get": {
        "tags": [
          "Templates"
        ],
        "operationId": "getTemplate",
        "summary": "One template: design notes and the HTML of every page",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "Template id.",
            "schema": {
              "type": "string",
              "enum": [
                "ledger",
                "pipeline",
                "quanta",
                "beacon",
                "relay",
                "forma",
                "tessera",
                "noir",
                "orsola",
                "nido",
                "casa",
                "hana",
                "kiln",
                "nove",
                "circle",
                "fieldnotes",
                "lumen",
                "pace",
                "aldini",
                "ito",
                "orto",
                "dot",
                "mist",
                "signal"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          }
        }
      }
    },
    "/guide": {
      "get": {
        "tags": [
          "Guide"
        ],
        "operationId": "getGuide",
        "summary": "The web design guide as data: process, principles, composition, anti-patterns, UI principles, rules for agents, page anatomies, checklist",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "guide": {
                      "type": "object"
                    },
                    "markdown": {
                      "type": "string",
                      "format": "uri"
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "responses": {
      "BadRequest": {
        "description": "Bad parameter or missing input",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            }
          }
        }
      },
      "NotFound": {
        "description": "Unknown id or route, with suggestions",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            }
          }
        }
      },
      "RateLimited": {
        "description": "More than 240 requests a minute. The same data is static under https://mian.ro/registry/.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            }
          }
        }
      }
    },
    "schemas": {
      "CustomNoodle": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string"
          },
          "brand": {
            "type": "string",
            "description": "The data-brand value."
          },
          "base": {
            "type": "string"
          },
          "usage": {
            "type": "string"
          },
          "css": {
            "type": "string",
            "description": "The stylesheet to load after mian.css."
          },
          "tokens": {
            "type": "object",
            "properties": {
              "light": {
                "type": "object"
              },
              "dark": {
                "type": "object"
              }
            }
          },
          "contrast": {
            "type": "object",
            "properties": {
              "allPass": {
                "type": "boolean"
              },
              "pairs": {
                "type": "array",
                "items": {
                  "type": "object"
                }
              }
            }
          },
          "recipe": {
            "type": "object"
          },
          "studio": {
            "type": "string",
            "format": "uri"
          }
        }
      },
      "Inspection": {
        "type": "object",
        "properties": {
          "url": {
            "type": "string"
          },
          "host": {
            "type": "string"
          },
          "title": {
            "type": "string"
          },
          "score": {
            "type": "integer",
            "minimum": 0,
            "maximum": 100
          },
          "verdict": {
            "type": "string"
          },
          "limited": {
            "type": "boolean",
            "description": "True when the stylesheets could not be read."
          },
          "scores": {
            "type": "object",
            "description": "colour, type, consistency, structure, originality; null when not read."
          },
          "findings": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "area": {
                  "type": "string"
                },
                "level": {
                  "type": "string",
                  "enum": [
                    "good",
                    "note",
                    "warn",
                    "bad"
                  ]
                },
                "title": {
                  "type": "string"
                },
                "detail": {
                  "type": "string"
                }
              }
            }
          },
          "language": {
            "type": "object"
          },
          "noodles": {
            "type": "array",
            "items": {
              "type": "object"
            }
          },
          "content": {
            "type": "object"
          },
          "studio": {
            "type": "string",
            "format": "uri"
          }
        }
      },
      "Error": {
        "type": "object",
        "required": [
          "error"
        ],
        "properties": {
          "error": {
            "type": "object",
            "required": [
              "code",
              "message",
              "status"
            ],
            "properties": {
              "code": {
                "type": "string"
              },
              "message": {
                "type": "string"
              },
              "status": {
                "type": "integer"
              },
              "docs": {
                "type": "string",
                "format": "uri"
              },
              "didYouMean": {
                "type": "array",
                "items": {
                  "type": "string"
                }
              }
            }
          }
        }
      },
      "Health": {
        "type": "object",
        "required": [
          "status"
        ],
        "properties": {
          "status": {
            "type": "string",
            "enum": [
              "pass",
              "warn",
              "fail"
            ]
          },
          "version": {
            "type": "string"
          },
          "releaseId": {
            "type": "string"
          },
          "serviceId": {
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "checks": {
            "type": "object"
          }
        }
      },
      "License": {
        "type": "object",
        "properties": {
          "spdx": {
            "type": "string",
            "const": "LicenseRef-MIAN-1.0"
          },
          "name": {
            "type": "string"
          },
          "url": {
            "type": "string",
            "format": "uri"
          },
          "commercialUse": {
            "type": "boolean"
          },
          "aiGeneratedOutput": {
            "type": "boolean"
          },
          "sellingOrTradingMian": {
            "type": "boolean"
          },
          "attributionRequiredOnYourSite": {
            "type": "boolean"
          },
          "redistribution": {
            "type": "string"
          },
          "summary": {
            "type": "string"
          }
        }
      },
      "Composition": {
        "type": [
          "object",
          "null"
        ],
        "properties": {
          "role": {
            "type": [
              "string",
              "null"
            ]
          },
          "intents": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "prominence": {
            "type": [
              "string",
              "null"
            ]
          },
          "density": {
            "type": [
              "string",
              "null"
            ]
          },
          "worksAfter": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "worksBefore": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "alternatives": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "avoid": {
            "type": [
              "string",
              "null"
            ]
          }
        }
      },
      "ComponentSummary": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "category": {
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "intents": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "role": {
            "type": [
              "string",
              "null"
            ]
          },
          "requiresJs": {
            "type": "boolean"
          },
          "url": {
            "type": "string",
            "format": "uri"
          },
          "apiUrl": {
            "type": "string",
            "format": "uri"
          }
        }
      },
      "Component": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "category": {
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "composition": {
            "$ref": "#/components/schemas/Composition"
          },
          "classes": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "name": {
                  "type": "string"
                },
                "description": {
                  "type": "string"
                }
              }
            }
          },
          "accessibility": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "examples": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "title": {
                  "type": "string"
                },
                "description": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "html": {
                  "type": "string"
                }
              }
            }
          },
          "css": {
            "type": "string"
          },
          "js": {
            "type": [
              "string",
              "null"
            ]
          },
          "requiresJs": {
            "type": "boolean"
          }
        }
      },
      "NoodleMatch": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "family": {
            "type": "string"
          },
          "tagline": {
            "type": "string"
          },
          "score": {
            "type": "number"
          },
          "why": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "traits": {
            "type": "object"
          },
          "use": {
            "type": "string"
          },
          "designLanguage": {
            "type": "string",
            "format": "uri"
          }
        }
      },
      "Plan": {
        "type": "object",
        "properties": {
          "type": {
            "type": "string"
          },
          "noodles": {
            "type": "array",
            "items": {
              "type": "object"
            }
          },
          "template": {
            "type": [
              "string",
              "null"
            ]
          },
          "otherTemplates": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "setup": {
            "type": "string"
          },
          "pages": {
            "type": "array",
            "items": {
              "type": "object"
            }
          },
          "needs": {
            "type": "array",
            "items": {
              "type": "object"
            }
          },
          "components": {
            "type": "array",
            "items": {
              "type": "object"
            }
          },
          "direction": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "controls": {
            "type": "object"
          },
          "rules": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "readNext": {
            "type": "array",
            "items": {
              "type": "string",
              "format": "uri"
            }
          },
          "license": {
            "$ref": "#/components/schemas/License"
          }
        }
      },
      "Validation": {
        "type": "object",
        "properties": {
          "valid": {
            "type": "boolean"
          },
          "errors": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "type": {
                  "type": "string"
                },
                "value": {
                  "type": "string"
                },
                "message": {
                  "type": "string"
                },
                "didYouMean": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                }
              }
            }
          },
          "warnings": {
            "type": "array",
            "items": {
              "type": "object"
            }
          },
          "componentsUsed": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "noodlesUsed": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "reference": {
            "type": "string",
            "format": "uri"
          }
        }
      }
    }
  }
}
