{
  "openapi": "3.1.0",
  "info": {
    "title": "NeetroX Public Data API",
    "version": "1.0.0",
    "summary": "Read-only JSON for the NeetroX product catalog and blog.",
    "description": "Static JSON documents regenerated on every site build from the same rows that render neetrox.com. Read-only: there are no write operations, no authentication, and no rate limits beyond ordinary CDN fair use.",
    "termsOfService": "https://neetrox.com/terms",
    "contact": {
      "name": "NeetroX",
      "url": "https://neetrox.com/contact"
    }
  },
  "servers": [
    {
      "url": "https://neetrox.com/api/v1",
      "description": "Production"
    }
  ],
  "paths": {
    "/index.json": {
      "get": {
        "operationId": "getApiRoot",
        "summary": "API root: endpoints, counts and related resources.",
        "responses": {
          "200": {
            "description": "The API root document.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Root"
                }
              }
            }
          }
        }
      }
    },
    "/products.json": {
      "get": {
        "operationId": "listProducts",
        "summary": "Every product in the store, newest first.",
        "responses": {
          "200": {
            "description": "A product collection.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProductCollection"
                }
              }
            }
          }
        }
      }
    },
    "/posts.json": {
      "get": {
        "operationId": "listPosts",
        "summary": "Every published blog post, newest first.",
        "responses": {
          "200": {
            "description": "A post collection.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PostCollection"
                }
              }
            }
          }
        }
      }
    },
    "/status.json": {
      "get": {
        "operationId": "getStatus",
        "summary": "Build freshness and record counts.",
        "responses": {
          "200": {
            "description": "The status document.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Status"
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "Product": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "slug": {
            "type": [
              "string",
              "null"
            ]
          },
          "title": {
            "type": "string"
          },
          "category": {
            "type": [
              "string",
              "null"
            ]
          },
          "price": {
            "type": [
              "object",
              "null"
            ],
            "properties": {
              "currency": {
                "type": "string",
                "examples": [
                  "USD"
                ]
              },
              "list": {
                "type": "number",
                "description": "Undiscounted list price."
              },
              "current": {
                "type": "number",
                "description": "Price after any active discount."
              },
              "discount_percent": {
                "type": "number",
                "minimum": 0,
                "maximum": 100,
                "description": "Percentage off the list price, clamped to 0–100. 0 when there is no active discount. Always consistent with the other two fields: current = list × (1 − discount_percent ÷ 100)."
              }
            },
            "required": [
              "currency",
              "list",
              "current",
              "discount_percent"
            ]
          },
          "summary": {
            "type": "string",
            "description": "Plain-text description, truncated to 300 characters."
          },
          "image": {
            "type": [
              "string",
              "null"
            ],
            "format": "uri"
          },
          "url": {
            "type": "string",
            "format": "uri"
          },
          "markdown_url": {
            "type": "string",
            "format": "uri",
            "description": "Full description as Markdown."
          },
          "created_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          }
        },
        "required": [
          "id",
          "title",
          "url",
          "markdown_url"
        ]
      },
      "Post": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "slug": {
            "type": [
              "string",
              "null"
            ]
          },
          "title": {
            "type": "string"
          },
          "tag": {
            "type": [
              "string",
              "null"
            ]
          },
          "author": {
            "type": "string"
          },
          "published_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date"
          },
          "summary": {
            "type": "string"
          },
          "image": {
            "type": [
              "string",
              "null"
            ],
            "format": "uri"
          },
          "url": {
            "type": "string",
            "format": "uri"
          },
          "markdown_url": {
            "type": "string",
            "format": "uri",
            "description": "Full article body as Markdown."
          }
        },
        "required": [
          "id",
          "title",
          "url",
          "markdown_url"
        ]
      },
      "ProductCollection": {
        "type": "object",
        "properties": {
          "kind": {
            "type": "string"
          },
          "count": {
            "type": "integer"
          },
          "generated_at": {
            "type": "string",
            "format": "date-time"
          },
          "self": {
            "type": "string",
            "format": "uri"
          },
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Product"
            }
          }
        },
        "required": [
          "kind",
          "count",
          "generated_at",
          "items"
        ]
      },
      "PostCollection": {
        "type": "object",
        "properties": {
          "kind": {
            "type": "string"
          },
          "count": {
            "type": "integer"
          },
          "generated_at": {
            "type": "string",
            "format": "date-time"
          },
          "self": {
            "type": "string",
            "format": "uri"
          },
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Post"
            }
          }
        },
        "required": [
          "kind",
          "count",
          "generated_at",
          "items"
        ]
      },
      "Status": {
        "type": "object",
        "properties": {
          "status": {
            "type": "string",
            "enum": [
              "ok"
            ]
          },
          "generated_at": {
            "type": "string",
            "format": "date-time"
          },
          "note": {
            "type": "string"
          },
          "version": {
            "type": "string"
          },
          "counts": {
            "type": "object",
            "additionalProperties": {
              "type": "integer"
            }
          }
        },
        "required": [
          "status",
          "generated_at"
        ]
      },
      "Root": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string"
          },
          "version": {
            "type": "string"
          },
          "base_url": {
            "type": "string",
            "format": "uri"
          },
          "openapi": {
            "type": "string",
            "format": "uri"
          },
          "status": {
            "type": "string",
            "format": "uri"
          },
          "endpoints": {
            "type": "array",
            "items": {
              "type": "object"
            }
          }
        },
        "required": [
          "name",
          "version",
          "endpoints"
        ]
      }
    }
  }
}
