MCPcopy Create free account
hub / github.com/caesarHQ/textSQL / openapi_yaml

Function openapi_yaml

api/app/api/chat_gpt_plugin.py:69–130  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

67
68@plugin_config.route("/openapi.yaml")
69def openapi_yaml():
70 current_domain = request.host_url
71 return f"""components:
72 schemas:
73 CensusResponse:
74 properties:
75 answer:
76 description: the answer to the question
77 type: string
78 sql_query:
79 description: the sql query that generated the answer
80 type: string
81 type: object
82info:
83 description: Data from the US Census
84 title: Census Data
85 version: '1.0'
86openapi: 3.0.2
87paths:
88 /plugin/get_census_data:
89 get:
90 consumes:
91 - application/json
92 description: Provide census data for questions about populations and other location
93 information. This provides data from the 2020 census.
94 operationId: getCensusData
95 parameters:
96 - description: the question to ask the census data
97 in: query
98 name: question
99 required: false
100 schema:
101 type: string
102 responses:
103 default:
104 description: ''
105 schema:
106 $ref: '#/components/schemas/CensusResponse'
107 tags:
108 - Census Data
109 options:
110 consumes:
111 - application/json
112 description: Provide census data for questions about populations and other location
113 information. This provides data from the 2020 census.
114 operationId: getCensusData
115 parameters:
116 - description: the question to ask the census data
117 in: query
118 name: question
119 required: false
120 schema:
121 type: string
122 responses:
123 default:
124 description: ''
125 schema:
126 $ref: '#/components/schemas/CensusResponse'

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected