openapi-core/openapi_core/spec/specs.py
2021-05-02 22:07:35 +01:00

6 lines
158 B
Python

from openapi_core.spec.servers import get_server_url
def get_spec_url(spec, index=0):
servers = spec / 'servers'
return get_server_url(servers / 0)