pyeve / eve-swagger

Swagger extension for Eve-powered RESTful APIs
http://python-eve.org
Other
154 stars 43 forks source link

If API_VERSION is set and URL_PREFIX is set servers URL breaks #119

Closed spacepirate0001 closed 2 years ago

spacepirate0001 commented 3 years ago

Setting both API_VERSION and URL_PREFIX currnetly breaks servers URL and Swagger will return 404 due to URL miss match.

example Swagger host; http://localhost:5000 API_VERSION =v1 URL_PREFIX = api

now server URL will be http://localhost:5000/v1 but is should be http://localhost:5000/api/v1

https://github.com/pyeve/eve-swagger/blob/12222c6e2d0d73039d6b463922553f9a2f27363a/eve_swagger/objects.py#L48

Update: I see your TODO, is this the same thing? https://github.com/pyeve/eve-swagger/blob/12222c6e2d0d73039d6b463922553f9a2f27363a/eve_swagger/objects.py#L252

I think you are adding the SENTINEL_ROUTE_PREFIX to the oAuth2 tokenUrl but not accounting for it in the servers function.