encode / apistar

The Web API toolkit. 🛠
https://docs.apistar.com
BSD 3-Clause "New" or "Revised" License
5.57k stars 411 forks source link

Fix docs endpoint for async applications #551

Closed akalipetis closed 6 years ago

akalipetis commented 6 years ago

The main issue was that static asset routes were not correctly added for async applications, in case the application did not have static assets themselves.

Also, include a very simplistic test to make sure docs endpoint works.

audiolion commented 6 years ago

Yeah the difference between #528 and #529 was that line of code

akalipetis commented 6 years ago

Yes, to be honest I totally missed #528 and #529 😅

This line is definitely needed, as it does not work otherwise if static_dir is not set. Feel free to use #529 instead if you'd like, but please include the tests in here to make sure we catch similar issues in the future 😀

tomchristie commented 6 years ago

Resolved in #528. Released as 0.5.20.

tomchristie commented 6 years ago

Apologies I wasn't paying close enough attention here. Looks like we want to include this PR too, right? (Both or the tests, and for the pacakge/static check)

audiolion commented 6 years ago

this PR encapsulates what #529 was doing with an added test so probably good enough to just merge this one in

akalipetis commented 6 years ago

No worries @tomchristie — yes #528 did not solve the issue when static_dir was not defined. This should do the trick, plus it's secured with a test.

tomchristie commented 6 years ago

Great, thanks! Released as 0.5.21