{
  "openapi": "3.1.0",
  "info": {
    "title": "RFIDFYI API",
    "description": "Public API for RFIDFYI \u2014 an RFID technology encyclopedia with tags, readers, standards, EPC schemes, and frequency bands.",
    "version": "1.0.0",
    "contact": {
      "url": "https://rfidfyi.com/developers/"
    }
  },
  "servers": [
    {
      "url": "https://rfidfyi.com",
      "description": "Production"
    }
  ],
  "paths": {
    "/api/tag/{slug}/": {
      "get": {
        "operationId": "getTag",
        "summary": "Get RFID tag detail with specs, standards, and industries",
        "parameters": [
          {
            "name": "slug",
            "in": "path",
            "required": true,
            "description": "URL slug of the RFID tag",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Tag detail"
          },
          "404": {
            "description": "Not found"
          }
        }
      }
    },
    "/api/reader/{slug}/": {
      "get": {
        "operationId": "getReader",
        "summary": "Get RFID reader detail with specs and standards",
        "parameters": [
          {
            "name": "slug",
            "in": "path",
            "required": true,
            "description": "URL slug of the RFID reader",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Reader detail"
          },
          "404": {
            "description": "Not found"
          }
        }
      }
    },
    "/api/family/{slug}/": {
      "get": {
        "operationId": "getFamily",
        "summary": "Get RFID tag family with member tags",
        "parameters": [
          {
            "name": "slug",
            "in": "path",
            "required": true,
            "description": "URL slug of the tag family",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Family detail"
          },
          "404": {
            "description": "Not found"
          }
        }
      }
    },
    "/api/frequency/{slug}/": {
      "get": {
        "operationId": "getFrequencyBand",
        "summary": "Get RFID frequency band detail",
        "parameters": [
          {
            "name": "slug",
            "in": "path",
            "required": true,
            "description": "URL slug of the frequency band",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Frequency band detail"
          },
          "404": {
            "description": "Not found"
          }
        }
      }
    },
    "/api/standard/{slug}/": {
      "get": {
        "operationId": "getStandard",
        "summary": "Get RFID standard detail with compliant tags",
        "parameters": [
          {
            "name": "slug",
            "in": "path",
            "required": true,
            "description": "URL slug of the standard",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Standard detail"
          },
          "404": {
            "description": "Not found"
          }
        }
      }
    },
    "/api/epc/{slug}/": {
      "get": {
        "operationId": "getEpcScheme",
        "summary": "Get EPC encoding scheme detail",
        "parameters": [
          {
            "name": "slug",
            "in": "path",
            "required": true,
            "description": "URL slug of the EPC scheme",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "EPC scheme detail"
          },
          "404": {
            "description": "Not found"
          }
        }
      }
    },
    "/api/use-case/{slug}/": {
      "get": {
        "operationId": "getUseCase",
        "summary": "Get RFID use case detail",
        "parameters": [
          {
            "name": "slug",
            "in": "path",
            "required": true,
            "description": "URL slug of the use case",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Use case detail"
          },
          "404": {
            "description": "Not found"
          }
        }
      }
    },
    "/api/term/{slug}/": {
      "get": {
        "operationId": "getGlossaryTerm",
        "summary": "Get glossary term definition",
        "parameters": [
          {
            "name": "slug",
            "in": "path",
            "required": true,
            "description": "URL slug of the glossary term",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Glossary term"
          },
          "404": {
            "description": "Not found"
          }
        }
      }
    },
    "/api/search/": {
      "get": {
        "operationId": "search",
        "summary": "Search across tags, readers, standards, EPC schemes, and glossary",
        "parameters": [
          {
            "name": "q",
            "in": "query",
            "required": true,
            "description": "Search query (minimum 2 characters)",
            "schema": {
              "type": "string",
              "minLength": 2
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Search results",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "query": {
                      "type": "string"
                    },
                    "results": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/SearchResult"
                      }
                    },
                    "total": {
                      "type": "integer"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/compare/": {
      "get": {
        "operationId": "compareTags",
        "summary": "Compare two RFID tags",
        "parameters": [
          {
            "name": "a",
            "in": "query",
            "required": true,
            "description": "Slug of first tag",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "b",
            "in": "query",
            "required": true,
            "description": "Slug of second tag",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Comparison result"
          },
          "400": {
            "description": "Missing parameters"
          },
          "404": {
            "description": "Tag not found"
          }
        }
      }
    },
    "/api/random/": {
      "get": {
        "operationId": "randomTag",
        "summary": "Get a random RFID tag",
        "responses": {
          "200": {
            "description": "Random tag detail"
          }
        }
      }
    },
    "/api/openapi.json": {
      "get": {
        "operationId": "getOpenAPISpec",
        "summary": "OpenAPI 3.1.0 specification",
        "responses": {
          "200": {
            "description": "OpenAPI JSON spec"
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "SearchResult": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string"
          },
          "slug": {
            "type": "string"
          },
          "type": {
            "type": "string",
            "enum": [
              "tag",
              "reader",
              "standard",
              "epc_scheme",
              "glossary"
            ]
          },
          "url": {
            "type": "string"
          }
        },
        "required": [
          "name",
          "slug",
          "type",
          "url"
        ]
      }
    }
  }
}