{
  "openapi": "3.0.3",
  "info": {
    "title": "NASA APOD API Example",
    "version": "1.0.0"
  },
  "servers": [
    {
      "url": "https://api.nasa.gov"
    }
  ],
  "paths": {
    "/planetary/apod": {
      "get": {
        "operationId": "getAstronomyPictureOfTheDay",
        "tags": [
          "apod"
        ],
        "summary": "Get the Astronomy Picture of the Day",
        "parameters": [
          {
            "name": "date",
            "in": "query",
            "required": false,
            "description": "The date of the APOD image to retrieve in YYYY-MM-DD format.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "start_date",
            "in": "query",
            "required": false,
            "description": "Start date for a date range in YYYY-MM-DD format.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "end_date",
            "in": "query",
            "required": false,
            "description": "End date for a date range in YYYY-MM-DD format.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "count",
            "in": "query",
            "required": false,
            "description": "Number of random images to return.",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "thumbs",
            "in": "query",
            "required": false,
            "description": "Return video thumbnail URLs when available.",
            "schema": {
              "type": "boolean"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "APOD response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApodResponse"
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "ApodResponse": {
        "type": "object",
        "properties": {
          "copyright": {
            "type": "string"
          },
          "date": {
            "type": "string"
          },
          "explanation": {
            "type": "string"
          },
          "hdurl": {
            "type": "string"
          },
          "media_type": {
            "type": "string"
          },
          "service_version": {
            "type": "string"
          },
          "title": {
            "type": "string"
          },
          "url": {
            "type": "string"
          },
          "thumbnail_url": {
            "type": "string"
          }
        }
      }
    }
  }
}