{ "openapi": "3.1.0", "info": { "title": "Get weather data", "description": "Retrieves current weather data for a location.", "version": "v1.0.0" }, "servers": [ { "url": "https://weather.example.com" } ], "paths": { "/location": { //get方法 "get": { "description": "Get temperature for a specific location", "operationId": "GetCurrentWeather", "parameters": [ { //参数名 "name": "location", //参数的位置。Query表示附加到URL上的参数。例如,在/items?id=###中, 查询参数是id。 "in": "query", "description": "The city and state to retrieve the weather for", "required": true, "schema": { "type": "string" } } ], "deprecated": false } } }, "components": { "schemas": {} } }