{
    "openapi": "3.1.0",
    "info": {
        "title": "ExpoRio CIDADE NOVA - API publica de eventos",
        "version": "1.2.0",
        "summary": "Agenda de eventos do centro de convenções ExpoRio CIDADE NOVA, Rio de Janeiro.",
        "description": "API pública, somente leitura e sem autenticação. Use para descobrir feiras, congressos, convenções e exposições realizados no ExpoRio CIDADE NOVA, com datas, organizador e site oficial de cada evento. Documentação em https://exporcn.com.br/api-eventos/. Qualquer página do site também responde em markdown quando você acrescenta .md ao caminho. Limite sugerido: 1 requisição por segundo. Versionamento: a versão vai na URL (/v1); não há previsão de descontinuação da v1. Se uma versão futura for descontinuada, o aviso sairá com no mínimo 90 dias de antecedência nesta página, no llms.txt e no cabeçalho HTTP \"Deprecation\" das respostas afetadas.",
        "contact": {
            "name": "ExpoRio CIDADE NOVA",
            "email": "comercial@exporcn.com.br",
            "url": "https://exporcn.com.br/contato/"
        }
    },
    "components": {
        "schemas": {
            "Error": {
                "type": "object",
                "description": "Envelope de erro padrão de toda a API. Presente em qualquer resposta 4xx ou 5xx.",
                "properties": {
                    "code": {
                        "type": "string",
                        "description": "Código de erro estável e legível por máquina, ex.: \"not_found\"."
                    },
                    "message": {
                        "type": "string",
                        "description": "Mensagem legível por humanos, em português."
                    },
                    "data": {
                        "type": "object",
                        "properties": {
                            "status": {
                                "type": "integer",
                                "description": "Código HTTP do erro."
                            },
                            "resolution": {
                                "type": "string",
                                "description": "Como resolver o erro, com URL ou próximo passo sugerido."
                            }
                        }
                    }
                },
                "required": [
                    "code",
                    "message",
                    "data"
                ]
            }
        }
    },
    "servers": [
        {
            "url": "https://exporcn.com.br/wp-json/exporio/v1"
        }
    ],
    "paths": {
        "/events": {
            "get": {
                "operationId": "listEvents",
                "summary": "Lista os eventos do ExpoRio CIDADE NOVA",
                "parameters": [
                    {
                        "name": "from",
                        "in": "query",
                        "description": "Data inicial no formato YYYY-MM-DD ou \"today\". Padrão: today.",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "to",
                        "in": "query",
                        "description": "Data final no formato YYYY-MM-DD.",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "search",
                        "in": "query",
                        "description": "Busca por texto no título e na descrição.",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "limit",
                        "in": "query",
                        "description": "Quantidade máxima de itens, entre 1 e 100. Padrão: 50.",
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Lista de eventos",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "count": {
                                            "type": "integer"
                                        },
                                        "events": {
                                            "type": "array",
                                            "items": {
                                                "type": "object",
                                                "properties": {
                                                    "id": {
                                                        "type": "integer"
                                                    },
                                                    "slug": {
                                                        "type": "string"
                                                    },
                                                    "title": {
                                                        "type": "string"
                                                    },
                                                    "url": {
                                                        "type": "string",
                                                        "format": "uri"
                                                    },
                                                    "summary": {
                                                        "type": "string"
                                                    },
                                                    "start_date": {
                                                        "type": [
                                                            "string",
                                                            "null"
                                                        ],
                                                        "format": "date"
                                                    },
                                                    "start_time": {
                                                        "type": [
                                                            "string",
                                                            "null"
                                                        ]
                                                    },
                                                    "end_date": {
                                                        "type": [
                                                            "string",
                                                            "null"
                                                        ],
                                                        "format": "date"
                                                    },
                                                    "end_time": {
                                                        "type": [
                                                            "string",
                                                            "null"
                                                        ]
                                                    },
                                                    "organizer": {
                                                        "type": [
                                                            "string",
                                                            "null"
                                                        ]
                                                    },
                                                    "website": {
                                                        "type": [
                                                            "string",
                                                            "null"
                                                        ],
                                                        "format": "uri"
                                                    },
                                                    "venue": {
                                                        "type": "string"
                                                    },
                                                    "categories": {
                                                        "type": "array",
                                                        "items": {
                                                            "type": "string"
                                                        }
                                                    },
                                                    "image": {
                                                        "type": [
                                                            "string",
                                                            "null"
                                                        ],
                                                        "format": "uri"
                                                    }
                                                }
                                            }
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "500": {
                        "description": "Erro interno",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/events/{slug}": {
            "get": {
                "operationId": "getEvent",
                "summary": "Detalha um evento pelo slug",
                "parameters": [
                    {
                        "name": "slug",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Evento encontrado",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "id": {
                                            "type": "integer"
                                        },
                                        "slug": {
                                            "type": "string"
                                        },
                                        "title": {
                                            "type": "string"
                                        },
                                        "url": {
                                            "type": "string",
                                            "format": "uri"
                                        },
                                        "summary": {
                                            "type": "string"
                                        },
                                        "start_date": {
                                            "type": [
                                                "string",
                                                "null"
                                            ],
                                            "format": "date"
                                        },
                                        "start_time": {
                                            "type": [
                                                "string",
                                                "null"
                                            ]
                                        },
                                        "end_date": {
                                            "type": [
                                                "string",
                                                "null"
                                            ],
                                            "format": "date"
                                        },
                                        "end_time": {
                                            "type": [
                                                "string",
                                                "null"
                                            ]
                                        },
                                        "organizer": {
                                            "type": [
                                                "string",
                                                "null"
                                            ]
                                        },
                                        "website": {
                                            "type": [
                                                "string",
                                                "null"
                                            ],
                                            "format": "uri"
                                        },
                                        "venue": {
                                            "type": "string"
                                        },
                                        "categories": {
                                            "type": "array",
                                            "items": {
                                                "type": "string"
                                            }
                                        },
                                        "image": {
                                            "type": [
                                                "string",
                                                "null"
                                            ],
                                            "format": "uri"
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "Evento não encontrado",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}