File: specs.py

package info (click to toggle)
python-openapi-core 0.19.4-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 2,008 kB
  • sloc: python: 18,868; makefile: 47
file content (8 lines) | stat: -rw-r--r-- 226 bytes parent folder | download
1
2
3
4
5
6
7
8
from jsonschema_path import SchemaPath

from openapi_core.schema.servers import get_server_url


def get_spec_url(spec: SchemaPath, index: int = 0) -> str:
    servers = spec / "servers"
    return get_server_url(servers / 0)