UNPKG

apibake

Version:
64 lines (63 loc) 1.25 kB
{ "openapi": "3.0.0", "info": { "title": "Sample API", "version": "1.0.0" }, "paths": { "/users/{userId}": { "get": { "summary": "Get a user by ID", "parameters": [ { "$ref": "#/components/parameters/UserId" } ], "responses": { "200": { "description": "A user object", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/User" } } } }, "404": { "description": "User not found" } } } } }, "components": { "parameters": { "UserId": { "name": "userId", "in": "path", "required": true, "schema": { "type": "string" }, "description": "The unique identifier of the user" } }, "schemas": { "User": { "type": "object", "properties": { "id": { "type": "string" }, "name": { "type": "string" }, "email": { "type": "string" } } } } } }