-
-
Notifications
You must be signed in to change notification settings - Fork 30
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
Support for multiple server URL #65
Comments
You can manually edit the OpenAPI data blob in a The documentation for the format is here. To add a server you will need to add your entry in the @apifairy.process_apispec
def my_apispec_processor(spec):
spec['servers'][0]['description'] = 'Production server'
spec['servers'].append({'url': 'https://staging.example.com', 'description': 'Staging server'})
return spec The first line adds a description to the main server (added by APIFairy automatically). The second line adds a second server, also with a description. The definition of what keys can be used to describe a server is here. |
Thanks, this worked perfectly. |
Allow me to reopen this. So, I have set all the neccessary URL for the API. What is required is that I want to serve the docs on a different URL and maintain the API on the set Server URLs. According to the documentation, you can set to serve the |
I'm sorry, but I don't understand what is the problem that needs addressing. Have you tried changing your docs URL? Is anything not working as documented? |
Exactly, I am looking for a way on how to serve the docs on a different URL, e.g: Host the API on api.somedomain.com and then access the docs on developer.somedomain.com. |
Not to forget, the FileField doesn't support multiple file uploads? |
You are going to have to serve your documentation yourself. Are you reading the documentation? This is all covered there: https://apifairy.readthedocs.io/en/latest/intro.html#using-a-custom-documentation-endpoint.
FileField represents one uploaded file. |
Hi @miguelgrinberg I see in the core file there's support for multiple Server URLs or if I am mistaken with this line
How do I set the second URL for instance if I want to set a sandbox and live server URL.
The text was updated successfully, but these errors were encountered: