{
  "openapi": "3.1.0",
  "info": {
    "title": "naw.al Public API",
    "version": "1.0.0",
    "description": "Official read-only portfolio API for product and interaction designer Aditya Nawal. Stable resources use URL-path versions such as /api/v1. Breaking changes receive a new major path. Deprecated aliases return Deprecation, Sunset, and Link headers before removal. No authentication is required.",
    "contact": {
      "name": "Aditya Nawal",
      "url": "https://naw.al/contact",
      "email": "aditya@naw.al"
    },
    "license": { "name": "All rights reserved", "url": "https://naw.al/developers#usage" }
  },
  "security": [],
  "servers": [
    { "url": "https://naw.al", "description": "Production" }
  ],
  "externalDocs": {
    "description": "naw.al developer resources, versioning, and deprecation policy",
    "url": "https://naw.al/developers#versioning"
  },
  "x-versioning-policy": {
    "strategy": "URL path major versions",
    "current": "v1",
    "deprecationHeaders": ["Deprecation", "Sunset", "Link"]
  },
  "tags": [
    { "name": "Discovery", "description": "naw.al API and documentation discovery." },
    { "name": "Portfolio", "description": "Published Aditya Nawal profile and project information." }
  ],
  "paths": {
    "/api": {
      "get": {
        "operationId": "getNawAlApiIndex",
        "summary": "Discover the naw.al public API",
        "description": "Returns the current API version plus canonical links to documentation, the OpenAPI specification, the versioning policy, and all public resources.",
        "tags": ["Discovery"],
        "parameters": [
          {
            "name": "locale",
            "in": "query",
            "required": false,
            "description": "Response language. English is currently the only published locale.",
            "schema": { "type": "string", "enum": ["en"], "default": "en" }
          }
        ],
        "responses": {
          "200": {
            "description": "API discovery document.",
            "headers": {
              "RateLimit-Policy": { "$ref": "#/components/headers/RateLimitPolicy" },
              "RateLimit-Limit": { "$ref": "#/components/headers/RateLimitLimit" },
              "RateLimit-Remaining": { "$ref": "#/components/headers/RateLimitRemaining" },
              "RateLimit-Reset": { "$ref": "#/components/headers/RateLimitReset" }
            },
            "content": {
              "application/json": { "schema": { "type": "object", "$ref": "#/components/schemas/ApiIndex" } }
            }
          },
          "400": { "description": "The request parameters are invalid.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } },
          "404": { "description": "The requested API resource does not exist.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } },
          "405": { "description": "Only GET is supported.", "headers": { "Allow": { "schema": { "type": "string", "const": "GET" }, "description": "Supported method." } }, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } },
          "429": { "description": "The request budget is exhausted. Retry after the indicated delay.", "headers": { "Retry-After": { "description": "Seconds to wait before retrying.", "schema": { "type": "integer", "minimum": 1, "example": 30 } }, "RateLimit-Reset": { "$ref": "#/components/headers/RateLimitReset" } }, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } },
          "500": { "description": "The API could not complete the request.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } }
        }
      }
    },
    "/api/v1/profile": {
      "get": {
        "operationId": "getAdityaNawalProfileV1",
        "summary": "Get Aditya Nawal's public profile",
        "description": "Returns the v1 public profile with Aditya Nawal's role, location, core skills, and canonical portfolio links.",
        "tags": ["Portfolio"],
        "parameters": [
          {
            "name": "locale",
            "in": "query",
            "required": false,
            "description": "Response language. English is currently the only published locale.",
            "schema": { "type": "string", "enum": ["en"], "default": "en" }
          }
        ],
        "responses": {
          "200": {
            "description": "Public designer profile.",
            "headers": {
              "RateLimit-Policy": { "$ref": "#/components/headers/RateLimitPolicy" },
              "RateLimit-Limit": { "$ref": "#/components/headers/RateLimitLimit" },
              "RateLimit-Remaining": { "$ref": "#/components/headers/RateLimitRemaining" },
              "RateLimit-Reset": { "$ref": "#/components/headers/RateLimitReset" }
            },
            "content": {
              "application/json": { "schema": { "type": "object", "$ref": "#/components/schemas/Profile" } }
            }
          },
          "400": { "description": "The request parameters are invalid.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } },
          "404": { "description": "The requested API resource does not exist.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } },
          "405": { "description": "Only GET is supported.", "headers": { "Allow": { "schema": { "type": "string", "const": "GET" }, "description": "Supported method." } }, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } },
          "429": { "description": "The request budget is exhausted. Retry after the indicated delay.", "headers": { "Retry-After": { "description": "Seconds to wait before retrying.", "schema": { "type": "integer", "minimum": 1, "example": 30 } }, "RateLimit-Reset": { "$ref": "#/components/headers/RateLimitReset" } }, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } },
          "500": { "description": "The API could not complete the request.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } }
        }
      }
    },
    "/api/v1/projects": {
      "get": {
        "operationId": "listAdityaNawalProjectsV1",
        "summary": "List published portfolio entries",
        "description": "Returns v1 selected work and playground entries with stable canonical URLs, summaries, tags, and update dates.",
        "tags": ["Portfolio"],
        "parameters": [
          {
            "name": "locale",
            "in": "query",
            "required": false,
            "description": "Response language. English is currently the only published locale.",
            "schema": { "type": "string", "enum": ["en"], "default": "en" }
          },
          {
            "name": "type",
            "in": "query",
            "required": false,
            "description": "Limit results to work or playground entries.",
            "schema": { "type": "string", "enum": ["work", "playground"] }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "Maximum number of entries to return.",
            "schema": { "type": "integer", "minimum": 1, "maximum": 100, "default": 100 }
          }
        ],
        "responses": {
          "200": {
            "description": "Published portfolio entries.",
            "headers": {
              "RateLimit-Policy": { "$ref": "#/components/headers/RateLimitPolicy" },
              "RateLimit-Limit": { "$ref": "#/components/headers/RateLimitLimit" },
              "RateLimit-Remaining": { "$ref": "#/components/headers/RateLimitRemaining" },
              "RateLimit-Reset": { "$ref": "#/components/headers/RateLimitReset" }
            },
            "content": {
              "application/json": { "schema": { "type": "object", "$ref": "#/components/schemas/ProjectList" } }
            }
          },
          "400": { "description": "The request parameters are invalid.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } },
          "404": { "description": "The requested API resource does not exist.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } },
          "405": { "description": "Only GET is supported.", "headers": { "Allow": { "schema": { "type": "string", "const": "GET" }, "description": "Supported method." } }, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } },
          "429": { "description": "The request budget is exhausted. Retry after the indicated delay.", "headers": { "Retry-After": { "description": "Seconds to wait before retrying.", "schema": { "type": "integer", "minimum": 1, "example": 30 } }, "RateLimit-Reset": { "$ref": "#/components/headers/RateLimitReset" } }, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } },
          "500": { "description": "The API could not complete the request.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } }
        }
      }
    }
  },
  "components": {
    "headers": {
      "RateLimitPolicy": {
        "description": "Client request budget and fixed-window duration.",
        "schema": { "type": "string", "example": "60;w=60" }
      },
      "RateLimitLimit": {
        "description": "Maximum requests in the current window.",
        "schema": { "type": "integer", "example": 60 }
      },
      "RateLimitRemaining": {
        "description": "Requests remaining in the current window.",
        "schema": { "type": "integer", "minimum": 0, "example": 59 }
      },
      "RateLimitReset": {
        "description": "Seconds until the current request window resets.",
        "schema": { "type": "integer", "minimum": 0, "maximum": 60, "example": 42 }
      }
    },
    "schemas": {
      "ApiIndex": {
        "type": "object",
        "additionalProperties": false,
        "required": ["name", "description", "currentVersion", "versioningPolicy", "documentation", "openapi", "endpoints"],
        "properties": {
          "name": { "type": "string", "description": "Human-readable API name." },
          "description": { "type": "string", "description": "What the API provides." },
          "currentVersion": { "type": "string", "const": "v1", "description": "Current stable major API version." },
          "versioningPolicy": { "type": "string", "format": "uri", "description": "Versioning and deprecation policy URL." },
          "documentation": { "type": "string", "format": "uri", "description": "Developer documentation URL." },
          "openapi": { "type": "string", "format": "uri", "description": "OpenAPI specification URL." },
          "endpoints": {
            "type": "object",
            "additionalProperties": { "type": "string", "format": "uri" },
            "description": "Named current-version endpoint URLs."
          }
        }
      },
      "Profile": {
        "type": "object",
        "additionalProperties": false,
        "required": ["name", "jobTitle", "description", "url", "location", "skills", "links"],
        "properties": {
          "name": { "type": "string", "description": "Full public name." },
          "jobTitle": { "type": "string", "description": "Current professional title." },
          "description": { "type": "string", "description": "Short professional summary." },
          "url": { "type": "string", "format": "uri", "description": "Canonical website URL." },
          "location": { "type": "string", "description": "Public city and country." },
          "skills": { "type": "array", "items": { "type": "string" }, "description": "Core professional skills." },
          "links": {
            "type": "object",
            "additionalProperties": { "type": "string", "format": "uri" },
            "description": "Canonical site-section URLs."
          }
        }
      },
      "Project": {
        "type": "object",
        "additionalProperties": false,
        "required": ["type", "slug", "title", "summary", "url", "updatedAt", "tags"],
        "properties": {
          "type": { "type": "string", "enum": ["work", "playground"], "description": "Portfolio collection." },
          "slug": { "type": "string", "description": "Stable URL slug." },
          "title": { "type": "string", "description": "Published title." },
          "summary": { "type": "string", "description": "Short plain-text summary." },
          "url": { "type": "string", "format": "uri", "description": "Canonical entry URL." },
          "updatedAt": { "type": "string", "format": "date-time", "description": "Last content update." },
          "tags": { "type": "array", "items": { "type": "string" }, "description": "Published subject tags." }
        }
      },
      "ProjectList": {
        "type": "object",
        "additionalProperties": false,
        "required": ["projects", "count"],
        "properties": {
          "projects": { "type": "array", "items": { "$ref": "#/components/schemas/Project" }, "description": "Published entries." },
          "count": { "type": "integer", "minimum": 0, "description": "Number of returned entries." }
        }
      },
      "Error": {
        "type": "object",
        "additionalProperties": false,
        "required": ["error"],
        "properties": {
          "error": {
            "type": "object",
            "additionalProperties": false,
            "required": ["code", "message", "resolution"],
            "properties": {
              "code": { "type": "string", "description": "Stable machine-readable error code.", "example": "not_found" },
              "message": { "type": "string", "description": "Human-readable error message." },
              "resolution": { "type": "string", "description": "Action an agent can take to recover." }
            }
          }
        }
      }
    }
  }
}
