Last active
November 9, 2023 20:14
-
-
Save akshayvkt/a8c60dd2be891636820eae1ab46fb654 to your computer and use it in GitHub Desktop.
Creating a simple json with auth to test GPT
This file contains 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.0", | |
"info": { | |
"title": "Geocoding API", | |
"version": "1.0.0", | |
"description": "API for converting addresses into geographic coordinates (latitude and longitude)." | |
}, | |
"servers": [ | |
{ | |
"url": "https://maps.googleapis.com/maps/api" | |
} | |
], | |
"paths": { | |
"/geocode/json": { | |
"get": { | |
"summary": "Get Latitude and Longitude for an Address", | |
"operationId": "getLatLon", | |
"tags": [ | |
"Geocoding" | |
], | |
"parameters": [ | |
{ | |
"name": "address", | |
"in": "query", | |
"required": true, | |
"description": "The address to get coordinates for.", | |
"schema": { | |
"type": "string" | |
} | |
}, | |
{ | |
"name": "key", | |
"in": "query", | |
"required": true, | |
"description": "Your API key.", | |
"schema": { | |
"type": "string" | |
} | |
} | |
], | |
"responses": { | |
"200": { | |
"description": "A successful response that contains the latitude and longitude.", | |
"content": { | |
"application/json": { | |
"schema": { | |
"type": "object", | |
"properties": { | |
"lat": { | |
"type": "number", | |
"format": "float" | |
}, | |
"lon": { | |
"type": "number", | |
"format": "float" | |
} | |
} | |
} | |
} | |
} | |
}, | |
"400": { | |
"description": "Error: Bad Request. The address provided is invalid." | |
}, | |
"500": { | |
"description": "HTTP Error: Internal Server Error. Something went wrong on the server side." | |
} | |
} | |
} | |
} | |
} | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment