{
    "components": {
        "schemas": {
            "Error": {
                "type": "object",
                "description": "RFC 9457 problem details error object.",
                "properties": {
                    "type": {
                        "type": "string",
                        "example": "about:blank"
                    },
                    "title": {
                        "type": "string",
                        "example": "Not Found"
                    },
                    "status": {
                        "type": "integer",
                        "example": 404
                    },
                    "code": {
                        "type": "string",
                        "example": "rest_post_invalid_id"
                    },
                    "detail": {
                        "type": "string",
                        "example": "Invalid post ID."
                    }
                }
            },
            "Post": {
                "type": "object",
                "properties": {
                    "id": {
                        "type": "integer"
                    },
                    "date": {
                        "type": "string",
                        "format": "date-time"
                    },
                    "link": {
                        "type": "string",
                        "format": "uri"
                    },
                    "title": {
                        "type": "object",
                        "properties": {
                            "rendered": {
                                "type": "string"
                            }
                        }
                    },
                    "excerpt": {
                        "type": "object",
                        "properties": {
                            "rendered": {
                                "type": "string"
                            }
                        }
                    },
                    "content": {
                        "type": "object",
                        "properties": {
                            "rendered": {
                                "type": "string"
                            }
                        }
                    },
                    "categories": {
                        "type": "array",
                        "items": {
                            "type": "integer"
                        }
                    },
                    "tags": {
                        "type": "array",
                        "items": {
                            "type": "integer"
                        }
                    }
                }
            },
            "Term": {
                "type": "object",
                "properties": {
                    "id": {
                        "type": "integer"
                    },
                    "name": {
                        "type": "string"
                    },
                    "slug": {
                        "type": "string"
                    },
                    "count": {
                        "type": "integer"
                    }
                }
            },
            "Media": {
                "type": "object",
                "properties": {
                    "id": {
                        "type": "integer"
                    },
                    "source_url": {
                        "type": "string",
                        "format": "uri"
                    },
                    "alt_text": {
                        "type": "string"
                    },
                    "media_type": {
                        "type": "string"
                    },
                    "mime_type": {
                        "type": "string"
                    }
                }
            },
            "SearchResult": {
                "type": "object",
                "properties": {
                    "id": {
                        "type": "integer"
                    },
                    "title": {
                        "type": "string"
                    },
                    "url": {
                        "type": "string",
                        "format": "uri"
                    },
                    "type": {
                        "type": "string"
                    },
                    "subtype": {
                        "type": "string"
                    }
                }
            }
        }
    },
    "security": [],
    "openapi": "3.0.3",
    "info": {
        "title": "La Revista del Sureste - REST API",
        "description": "Public, read-only WordPress REST API for articles, pages, categories, tags, media and search. All GET endpoints are public: no authentication, API key, or account is required.",
        "version": "1.0.0"
    },
    "servers": [
        {
            "url": "https://larevistadelsureste.com/wp-json/wp/v2"
        }
    ],
    "paths": {
        "/posts": {
            "get": {
                "operationId": "listPosts",
                "summary": "List articles",
                "description": "Returns a paginated list of published articles, newest first.",
                "parameters": [
                    {
                        "name": "search",
                        "in": "query",
                        "schema": {
                            "type": "string"
                        },
                        "description": "Free-text search term."
                    },
                    {
                        "name": "per_page",
                        "in": "query",
                        "schema": {
                            "type": "integer",
                            "default": 10,
                            "maximum": 100
                        }
                    },
                    {
                        "name": "page",
                        "in": "query",
                        "schema": {
                            "type": "integer",
                            "default": 1
                        }
                    },
                    {
                        "name": "categories",
                        "in": "query",
                        "schema": {
                            "type": "string"
                        },
                        "description": "Comma-separated category IDs."
                    }
                ],
                "responses": {
                    "200": {
                        "description": "A list of articles",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "array",
                                    "items": {
                                        "$ref": "#/components/schemas/Post"
                                    }
                                }
                            }
                        }
                    },
                    "429": {
                        "description": "Rate limited",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/posts/{id}": {
            "get": {
                "operationId": "getPost",
                "summary": "Get a single article",
                "description": "Returns one published article by its numeric ID.",
                "parameters": [
                    {
                        "name": "id",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "The article",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Post"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "Not found",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/pages": {
            "get": {
                "operationId": "listPages",
                "summary": "List pages",
                "description": "Returns static site pages (About, Contact, Comercializacion, etc).",
                "responses": {
                    "200": {
                        "description": "A list of pages",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "array",
                                    "items": {
                                        "$ref": "#/components/schemas/Post"
                                    }
                                }
                            }
                        }
                    }
                }
            }
        },
        "/categories": {
            "get": {
                "operationId": "listCategories",
                "summary": "List categories",
                "description": "Returns the editorial categories used to classify articles.",
                "responses": {
                    "200": {
                        "description": "A list of categories",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "array",
                                    "items": {
                                        "$ref": "#/components/schemas/Term"
                                    }
                                }
                            }
                        }
                    }
                }
            }
        },
        "/tags": {
            "get": {
                "operationId": "listTags",
                "summary": "List tags",
                "description": "Returns the tags used to label articles.",
                "responses": {
                    "200": {
                        "description": "A list of tags",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "array",
                                    "items": {
                                        "$ref": "#/components/schemas/Term"
                                    }
                                }
                            }
                        }
                    }
                }
            }
        },
        "/media": {
            "get": {
                "operationId": "listMedia",
                "summary": "List media",
                "description": "Returns uploaded media items (images, documents).",
                "responses": {
                    "200": {
                        "description": "A list of media items",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "array",
                                    "items": {
                                        "$ref": "#/components/schemas/Media"
                                    }
                                }
                            }
                        }
                    }
                }
            }
        },
        "/search": {
            "get": {
                "operationId": "searchSite",
                "summary": "Site-wide search",
                "description": "Full-text search across published content.",
                "parameters": [
                    {
                        "name": "search",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Matching results",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "array",
                                    "items": {
                                        "$ref": "#/components/schemas/SearchResult"
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}