{
  "openapi": "3.1.0",
  "info": {
    "title": "SmartCardFYI API",
    "description": "Public API for SmartCardFYI \u2014 a smart card technology encyclopedia with card types, chip platforms, standards, manufacturers, and security certifications.",
    "version": "1.0.0",
    "contact": {
      "url": "https://smartcardfyi.com/developers/"
    }
  },
  "servers": [
    {
      "url": "https://smartcardfyi.com",
      "description": "Production"
    }
  ],
  "paths": {
    "/api/card/{slug}/": {
      "get": {
        "operationId": "getCardType",
        "summary": "Get smart card type detail with specs and standards",
        "parameters": [
          {
            "name": "slug",
            "in": "path",
            "required": true,
            "description": "URL slug of the card type",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Card type detail"
          },
          "404": {
            "description": "Not found"
          }
        }
      }
    },
    "/api/platform/{slug}/": {
      "get": {
        "operationId": "getPlatform",
        "summary": "Get chip platform detail with specs",
        "parameters": [
          {
            "name": "slug",
            "in": "path",
            "required": true,
            "description": "URL slug of the chip platform",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Platform detail"
          },
          "404": {
            "description": "Not found"
          }
        }
      }
    },
    "/api/standard/{slug}/": {
      "get": {
        "operationId": "getStandard",
        "summary": "Get smart card standard detail",
        "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/manufacturer/{slug}/": {
      "get": {
        "operationId": "getManufacturer",
        "summary": "Get smart card manufacturer detail",
        "parameters": [
          {
            "name": "slug",
            "in": "path",
            "required": true,
            "description": "URL slug of the manufacturer",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Manufacturer detail"
          },
          "404": {
            "description": "Not found"
          }
        }
      }
    },
    "/api/application/{slug}/": {
      "get": {
        "operationId": "getApplication",
        "summary": "Get card application domain detail",
        "parameters": [
          {
            "name": "slug",
            "in": "path",
            "required": true,
            "description": "URL slug of the application",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Application detail"
          },
          "404": {
            "description": "Not found"
          }
        }
      }
    },
    "/api/form-factor/{slug}/": {
      "get": {
        "operationId": "getFormFactor",
        "summary": "Get form factor detail",
        "parameters": [
          {
            "name": "slug",
            "in": "path",
            "required": true,
            "description": "URL slug of the form factor",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Form factor detail"
          },
          "404": {
            "description": "Not found"
          }
        }
      }
    },
    "/api/certification/{slug}/": {
      "get": {
        "operationId": "getCertification",
        "summary": "Get security certification detail",
        "parameters": [
          {
            "name": "slug",
            "in": "path",
            "required": true,
            "description": "URL slug of the certification",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Certification 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 card types, standards, manufacturers, 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": "compareCardTypes",
        "summary": "Compare two smart card types",
        "parameters": [
          {
            "name": "a",
            "in": "query",
            "required": true,
            "description": "Slug of first card type",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "b",
            "in": "query",
            "required": true,
            "description": "Slug of second card type",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Comparison result"
          },
          "400": {
            "description": "Missing parameters"
          },
          "404": {
            "description": "Card type not found"
          }
        }
      }
    },
    "/api/random/": {
      "get": {
        "operationId": "randomCardType",
        "summary": "Get a random smart card type",
        "responses": {
          "200": {
            "description": "Random card type 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": [
              "card_type",
              "standard",
              "manufacturer",
              "application",
              "glossary"
            ]
          },
          "url": {
            "type": "string"
          }
        },
        "required": [
          "name",
          "slug",
          "type",
          "url"
        ]
      }
    }
  }
}