{
  "openapi": "3.0.3",
  "info": {
    "title": "AstroWay daily sky",
    "description": "Daily horoscope by zodiac sign and the current Moon phase from the AstroWay API.",
    "version": "1.0.0"
  },
  "servers": [{ "url": "https://api.astroway.info/v1" }],
  "security": [{ "apiKey": [] }],
  "components": {
    "securitySchemes": {
      "apiKey": { "type": "apiKey", "in": "header", "name": "X-Api-Key" }
    }
  },
  "paths": {
    "/public/horoscope/daily": {
      "get": {
        "operationId": "dailyHoroscope",
        "summary": "Today's horoscope for one zodiac sign",
        "parameters": [
          {
            "name": "sign",
            "in": "query",
            "required": true,
            "description": "Zodiac sign in lower case English.",
            "schema": {
              "type": "string",
              "enum": ["aries", "taurus", "gemini", "cancer", "leo", "virgo", "libra", "scorpio", "sagittarius", "capricorn", "aquarius", "pisces"]
            }
          },
          {
            "name": "lang",
            "in": "query",
            "required": false,
            "description": "Language of the text, for example en or uk.",
            "schema": { "type": "string" }
          }
        ],
        "responses": { "200": { "description": "{ ok, data: { sign, date, horoscope } }" } }
      }
    },
    "/public/moon-phase": {
      "get": {
        "operationId": "moonPhase",
        "summary": "Moon phase, illumination, Moon sign and the next new and full Moon",
        "parameters": [
          {
            "name": "date",
            "in": "query",
            "required": false,
            "description": "YYYY-MM-DD. Today when left out.",
            "schema": { "type": "string" }
          },
          {
            "name": "lang",
            "in": "query",
            "required": false,
            "description": "Language of names and meaning, for example en or uk.",
            "schema": { "type": "string" }
          }
        ],
        "responses": { "200": { "description": "{ ok, data: { phaseName, illuminationPercent, moonSign, next, meaning } }" } }
      }
    }
  }
}
