{
  "specVersion": "1.0",
  "host": {
    "displayName": "Familjenicentrum"
  },
  "entries": [
    {
      "identifier": "urn:air:familjenicentrum.se:api:video-search",
      "displayName": "Search public videos",
      "type": "application/openapi+json",
      "description": "Read-only search of published, non-password-protected videos on Familjenicentrum.",
      "data": {
        "openapi": "3.1.0",
        "info": {
          "title": "Familjenicentrum public video search",
          "version": "1.0.0",
          "description": "Read-only search of published, non-password-protected videos."
        },
        "servers": [
          {
            "url": "https://familjenicentrum.se/wp-json/justvideo/v1"
          }
        ],
        "paths": {
          "/videos/search": {
            "get": {
              "operationId": "searchPublishedVideos",
              "summary": "Search public videos",
              "parameters": [
                {
                  "name": "q",
                  "in": "query",
                  "required": true,
                  "schema": {
                    "type": "string",
                    "minLength": 2,
                    "maxLength": 100
                  }
                },
                {
                  "name": "limit",
                  "in": "query",
                  "schema": {
                    "type": "integer",
                    "minimum": 1,
                    "maximum": 50,
                    "default": 50
                  }
                }
              ],
              "responses": {
                "200": {
                  "description": "Matching videos",
                  "content": {
                    "application/json": {
                      "schema": {
                        "type": "object",
                        "properties": {
                          "query": {
                            "type": "string"
                          },
                          "count": {
                            "type": "integer"
                          },
                          "videos": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "properties": {
                                "id": {
                                  "type": "integer"
                                },
                                "title": {
                                  "type": "string"
                                },
                                "url": {
                                  "type": "string",
                                  "format": "uri"
                                },
                                "description": {
                                  "type": "string"
                                },
                                "thumbnail_url": {
                                  "type": ["string", "null"],
                                  "format": "uri"
                                }
                              }
                            }
                          }
                        }
                      }
                    }
                  }
                },
                "400": {
                  "description": "Invalid search phrase or result limit"
                }
              }
            }
          }
        }
      }
    }
  ]
}
