openaddresses / batch

OpenAddresses/Machine based AWS Batch based ETL Processing
https://batch.openaddresses.io/
MIT License
6 stars 5 forks source link

Swagger docs uses website url instead of api url #398

Open wlinamchurch opened 1 month ago

wlinamchurch commented 1 month ago

Describe the bug

The url in the swagger docs use the website url https://batch.openaddresses.io/ rather than the api url https://batch.openaddresses.io/api/

To Reproduce Steps to reproduce the behavior:

  1. Go to the openapi endpoint example
  2. Click on Execute
  3. Scroll down to Response Body
  4. See error

On the CLI try:

URL in docs (does not work)

curl -X 'GET' \
  'https://batch.openaddresses.io/openapi' \
  -H 'accept: */*'

API URL (does work)

curl -X 'GET' \
  'https://batch.openaddresses.io/api/openapi' \
  -H 'accept: */*'

{"openapi":"3.0.3","info":{"title":"OpenAPI Schema","version":"1.0.0"},"paths":{"/schema":{"get":{"summary":"\n            List all JSON Schemas in use\n            With no parameters this API will return a list of all the endpoints that have a form of schema validation\n            If the url/method params are used, the schemas themselves are returned\n\n            Note: If url or method params are used, they must be used together\n        ",
<etc etc>
"description":"The SemVer of the task processor for this job"},"size":{"type":["null","integer"],"description":"The size of the asset in bytes"}}}}}}}}}}}}}}

Expected behavior Json response rather than cloudflare response.

Screenshots

image

Desktop (please complete the following information):

Additional context Found the api url here: https://github.com/openaddresses/batch/blob/master/api/API.md#javascript-fetch-example