-
Notifications
You must be signed in to change notification settings - Fork 601
Error in host #482
Comments
Did you resolve this issue? (I see the link is now loading correctly) |
I'm still getting this issue at https://measuremate.herokuapp.com/docs/ |
@tomchristie @rloomans I've fixed in a feature branch but haven't had the chance to push it up yet. It's a bit hacky; I'm setting the host by using the renderer_context's request.get_host inside the renderer. Hoping to have some time to push this week/weekend. |
Okey doke. That sounds like a reasonable enough approach, although let me know if you'd like a second set of eyes on it. Really we ought to make sure that you can get the host information from the |
@tomchristie Agreed. Ideally, the url would be set by the |
Perhaps this?...
Also an option that we could make the |
@tomchristie 👍 for the fallback. Making the request mandatory for the schema generation might be a good idea, not only for solving this particular problem, but also to support views which multiple serializer classes based on an evaluation of the The downside is that users would have to be logged in to view the schema for endpoints which don't allow anonymous access. Perhaps this could be controlled with a boolean on the generator (i.e. |
Ah yeah, I'd rather forgotten about the use case of "present all the information, even if the current user does not have permissions to all the endpoints". For now let's keep it optional. We may be able to finesse that in the future. |
Hi,
I'm getting an error in the Swagger API page at the end of the page near [ BASE URL: ]. Checking in the online validator says that the host is empty.
There is any configuration I forgot in the settings.py? I'm sorry if this is not the place to put this question, but I can't find any related info in the documentation and examples. Thanks in advance.
You can check the error here: http://loyalty.copiaypega.net/doc/
The text was updated successfully, but these errors were encountered: