{
    "openapi": "3.1.0",
    "info": {
        "title": "PTdrivers — content API",
        "version": "1.14.1",
        "description": "Read-only access to this site’s published content via the WordPress REST API. This document describes the API that already exists; it does not add new endpoints."
    },
    "servers": [
        {
            "url": "https://www.ptdrivers.com/wp-json"
        }
    ],
    "paths": {
        "/wp/v2/posts": {
            "get": {
                "tags": [
                    "Posts"
                ],
                "summary": "List Posts",
                "parameters": [
                    {
                        "name": "page",
                        "in": "query",
                        "required": false,
                        "description": "Page of the result set.",
                        "schema": {
                            "type": "integer"
                        }
                    },
                    {
                        "name": "per_page",
                        "in": "query",
                        "required": false,
                        "description": "Items per page (1–100).",
                        "schema": {
                            "type": "integer"
                        }
                    },
                    {
                        "name": "search",
                        "in": "query",
                        "required": false,
                        "description": "Limit results to those matching a string.",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "A page of Posts.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "array",
                                    "items": {
                                        "$ref": "#/components/schemas/ContentItem"
                                    }
                                }
                            }
                        }
                    }
                }
            }
        },
        "/wp/v2/posts/{id}": {
            "get": {
                "tags": [
                    "Posts"
                ],
                "summary": "Get a single Post by id",
                "parameters": [
                    {
                        "name": "id",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "The requested Post.",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ContentItem"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "Not found."
                    }
                }
            }
        }
    },
    "components": {
        "schemas": {
            "ContentItem": {
                "type": "object",
                "properties": {
                    "id": {
                        "type": "integer"
                    },
                    "date": {
                        "type": "string",
                        "format": "date-time"
                    },
                    "modified": {
                        "type": "string",
                        "format": "date-time"
                    },
                    "slug": {
                        "type": "string"
                    },
                    "status": {
                        "type": "string"
                    },
                    "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"
                            }
                        }
                    }
                }
            }
        }
    }
}