UNPKG

openapi-directory

Version:

Building & bundling https://github.com/APIs-guru/openapi-directory for easy use from JS

1 lines 2.45 kB
{"openapi":"3.0.0","servers":[{"url":"https://api.getthedata.com"}],"info":{"contact":{"email":"info@getthedata.com","name":"bng2latlong","url":"https://www.getthedata.com/bng2latlong","x-twitter":"getthedatacom"},"description":"Convert an OSGB36 easting and northing (British National Grid) to WGS84 latitude and longitude.","title":"bng2latlong","version":"1.0","x-apisguru-categories":["location"],"x-logo":{"url":"https://twitter.com/getthedatacom/profile_image?size=original"},"x-origin":[{"converter":{"url":"https://github.com/mermade/oas-kit","version":"7.0.4"},"format":"openapi","url":"https://www.getthedata.com/bng2latlong/openapi","version":"3.0"}],"x-providerName":"getthedata.com","x-serviceName":"bng2latlong"},"externalDocs":{"description":"Full documentation","url":"https://www.getthedata.com/bng2latlong"},"paths":{"/bng2latlong/{easting}/{northing}":{"get":{"description":"Takes an OSGB36 easting and northing (British National Grid) and returns the geographically equivalent WGS84 latitude and longitude.\n#### A successful request returns the following fields:\n* status - this will be `ok`\n* easting - the easting provided in the request\n* northing - the northing provided in the request\n* latitude - the latitude of the converted coordinates\n* longitude - the longitude of the converted coordinates\n#### An unsuccessful request returns the following fields:\n* status - this will be `error`\n* error - an error message\n","parameters":[{"description":"An OSGB36 (British National Grid) easting.","example":326897,"in":"path","name":"easting","required":true,"schema":{"type":"integer"}},{"description":"An OSGB36 (British National Grid) northing.","example":673919,"in":"path","name":"northing","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"easting":{"example":326897,"type":"integer"},"error":{"example":"Both <easting> and <northing> must be provided, must be positive integers, and must be within range.","type":"string"},"latitude":{"example":55.95271,"type":"number"},"longitude":{"example":-3.17227,"type":"number"},"northing":{"example":673919,"type":"integer"},"status":{"enum":["ok","error"],"type":"string"}},"type":"object"}}},"description":"A JSON object containing the original easting and northing, and the converted latitude and longitude."}},"summary":"Returns latitude and longitude for the given easting and northing."}}}}