Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Swagger docs uses website url instead of api url #398

Open
wlinamchurch opened this issue Aug 27, 2024 · 0 comments
Open

Swagger docs uses website url instead of api url #398

wlinamchurch opened this issue Aug 27, 2024 · 0 comments
Assignees
Labels
bug Something isn't working

Comments

@wlinamchurch
Copy link

wlinamchurch commented Aug 27, 2024

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):

  • OS: [e.g. iOS]
  • Browser Chrome
  • Version [e.g. 22]

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

@wlinamchurch wlinamchurch added the bug Something isn't working label Aug 27, 2024
@wlinamchurch wlinamchurch changed the title Swagger docs use incorrect api url Swagger docs uses websete url instead of api url Aug 27, 2024
@wlinamchurch wlinamchurch changed the title Swagger docs uses websete url instead of api url Swagger docs uses website url instead of api url Aug 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants