{
  "openapi": "3.0.3",
  "info": {
    "title": "OnesDev public site API",
    "description": "Minimal public endpoints for the OnesDev marketing site. Contact form submission only.",
    "version": "1.0.0",
    "contact": {
      "name": "OnesDev",
      "email": "contact@onesdev.com",
      "url": "https://onesdev.com"
    }
  },
  "servers": [
    {
      "url": "https://onesdev.com",
      "description": "Production"
    }
  ],
  "paths": {
    "/api/contact": {
      "post": {
        "summary": "Submit a project inquiry",
        "operationId": "submitContact",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ContactInquiry"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Inquiry accepted",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": { "type": "boolean" },
                    "message": { "type": "string" }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Validation error"
          },
          "500": {
            "description": "Server or mail delivery error"
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "ContactInquiry": {
        "type": "object",
        "required": ["name", "email", "message"],
        "properties": {
          "name": { "type": "string", "minLength": 1 },
          "email": { "type": "string", "format": "email" },
          "company": { "type": "string" },
          "website": { "type": "string", "format": "uri" },
          "service": { "type": "string" },
          "budget": { "type": "string" },
          "message": { "type": "string", "minLength": 1 }
        }
      }
    }
  }
}
