kojiapi: prefix all routes with /api/composer-koji/v1

The cloud API will be moved to `/api/composer/v1` in the future.

Mention this in the `servers` section of the openapi.yml (relative URLs
are allowed) too, even though our generator does not consider it.
This commit is contained in:
Lars Karlitski 2020-09-23 22:27:48 +02:00 committed by Tom Gundersen
parent a8ba969f6e
commit 40d8440660
5 changed files with 11 additions and 7 deletions

View file

@ -42,7 +42,7 @@ def main(distro):
cr = compose_request(distro, "https://localhost:4343/kojihub")
print(json.dumps(cr))
r = requests.post("https://localhost/compose", json=cr,
r = requests.post("https://localhost/api/composer-koji/v1/compose", json=cr,
cert=("/etc/osbuild-composer/worker-crt.pem", "/etc/osbuild-composer/worker-key.pem"),
verify="/etc/osbuild-composer/ca-crt.pem")
if r.status_code != 201:
@ -54,7 +54,7 @@ def main(distro):
compose_id = r.json()["id"]
while True:
r = requests.get(f"https://localhost/compose/{compose_id}",
r = requests.get(f"https://localhost/api/composer-koji/v1/compose/{compose_id}",
cert=("/etc/osbuild-composer/worker-crt.pem", "/etc/osbuild-composer/worker-key.pem"),
verify="/etc/osbuild-composer/ca-crt.pem")
if r.status_code != 200: