Created
March 12, 2026 00:19
-
-
Save vdparikh/694a1b53c1d4bce33d8e35ae3d527765 to your computer and use it in GitHub Desktop.
openapi.yaml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| openapi: 3.0.3 | |
| info: | |
| title: Demo Utility API | |
| description: A demo API for testing MCP server generation from OpenAPI specs. | |
| version: 1.0.0 | |
| servers: | |
| - url: https://api.demo-tools.com/v1 | |
| paths: | |
| /weather: | |
| get: | |
| summary: Get weather by city | |
| operationId: getWeather | |
| parameters: | |
| - name: city | |
| in: query | |
| required: true | |
| schema: | |
| type: string | |
| description: Name of the city | |
| responses: | |
| "200": | |
| description: Weather information | |
| content: | |
| application/json: | |
| schema: | |
| $ref: "#/components/schemas/Weather" | |
| /users/random: | |
| get: | |
| summary: Generate random user | |
| operationId: getRandomUser | |
| responses: | |
| "200": | |
| description: Random user profile | |
| content: | |
| application/json: | |
| schema: | |
| $ref: "#/components/schemas/User" | |
| /users/{userId}: | |
| get: | |
| summary: Get user profile | |
| operationId: getUser | |
| parameters: | |
| - name: userId | |
| in: path | |
| required: true | |
| schema: | |
| type: string | |
| responses: | |
| "200": | |
| description: User profile | |
| content: | |
| application/json: | |
| schema: | |
| $ref: "#/components/schemas/User" | |
| /country/{name}: | |
| get: | |
| summary: Get country information | |
| operationId: getCountryInfo | |
| parameters: | |
| - name: name | |
| in: path | |
| required: true | |
| schema: | |
| type: string | |
| responses: | |
| "200": | |
| description: Country information | |
| content: | |
| application/json: | |
| schema: | |
| $ref: "#/components/schemas/Country" | |
| /jokes/random: | |
| get: | |
| summary: Get random programming joke | |
| operationId: getRandomJoke | |
| responses: | |
| "200": | |
| description: Joke result | |
| content: | |
| application/json: | |
| schema: | |
| $ref: "#/components/schemas/Joke" | |
| components: | |
| schemas: | |
| Weather: | |
| type: object | |
| properties: | |
| city: | |
| type: string | |
| temperature: | |
| type: number | |
| condition: | |
| type: string | |
| humidity: | |
| type: integer | |
| User: | |
| type: object | |
| properties: | |
| id: | |
| type: string | |
| name: | |
| type: string | |
| email: | |
| type: string | |
| location: | |
| type: string | |
| Country: | |
| type: object | |
| properties: | |
| name: | |
| type: string | |
| capital: | |
| type: string | |
| population: | |
| type: integer | |
| currency: | |
| type: string | |
| Joke: | |
| type: object | |
| properties: | |
| id: | |
| type: string | |
| joke: | |
| type: string |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment