openapi: 3.0.0 info: title: Sample API description: A simple API for testing OpenAPI imports version: 1.0.0 servers: - url: https://jsonplaceholder.typicode.com paths: /posts: get: summary: Get all posts description: Retrieve a list of all posts responses: '200': description: List of posts content: application/json: schema: type: array items: type: object properties: id: type: integer title: type: string body: type: string userId: type: integer post: summary: Create a new post description: Create a new post requestBody: required: true content: application/json: schema: type: object properties: title: type: string body: type: string userId: type: integer responses: '201': description: Post created successfully /posts/{id}: get: summary: Get a specific post parameters: - name: id in: path required: true schema: type: integer responses: '200': description: Post details