Skip to content

Commit

Permalink
Nest oonirun-links into oonirun/links (#826)
Browse files Browse the repository at this point in the history
* Nest oonirun-links into oonirun/links

* Bump version tag
  • Loading branch information
hellais authored Mar 15, 2024
1 parent ca2857c commit e486936
Show file tree
Hide file tree
Showing 4 changed files with 67 additions and 67 deletions.
2 changes: 1 addition & 1 deletion ooniapi/services/oonirun/src/oonirun/__about__.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
VERSION = "0.5.0rc0"
VERSION = "0.6.0rc0"
14 changes: 7 additions & 7 deletions ooniapi/services/oonirun/src/oonirun/routers/oonirun.py
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ class OONIRunLinkCreateEdit(OONIRunLinkBase):


@router.post(
"/v2/oonirun-links",
"/v2/oonirun/links",
tags=["oonirun"],
dependencies=[Depends(role_required(["admin", "user"]))],
response_model=OONIRunLink,
Expand Down Expand Up @@ -228,7 +228,7 @@ def create_oonirun_link(


@router.put(
"/v2/oonirun-links/{oonirun_link_id}",
"/v2/oonirun/links/{oonirun_link_id}",
dependencies=[Depends(role_required(["admin", "user"]))],
tags=["oonirun"],
response_model=OONIRunLink,
Expand Down Expand Up @@ -407,7 +407,7 @@ class OONIRunLinkRevisions(BaseModel):


@router.get(
"/v2/oonirun-links/{oonirun_link_id}/revisions",
"/v2/oonirun/links/{oonirun_link_id}/revisions",
tags=["oonirun"],
response_model=OONIRunLinkRevisions,
)
Expand Down Expand Up @@ -438,7 +438,7 @@ def get_oonirun_link_revisions(


@router.get(
"/v2/oonirun-links/{oonirun_link_id}/engine-descriptor/{revision_number}",
"/v2/oonirun/links/{oonirun_link_id}/engine-descriptor/{revision_number}",
tags=["oonirun"],
response_model=OONIRunLinkEngineDescriptor,
)
Expand Down Expand Up @@ -486,7 +486,7 @@ def get_oonirun_link_engine_descriptor(


@router.get(
"/v2/oonirun-links/{oonirun_link_id}/full-descriptor/{revision_number}",
"/v2/oonirun/links/{oonirun_link_id}/full-descriptor/{revision_number}",
tags=["oonirun"],
response_model=OONIRunLink,
)
Expand Down Expand Up @@ -526,7 +526,7 @@ def get_oonirun_link_revision(


@router.get(
"/v2/oonirun-links/{oonirun_link_id}", tags=["oonirun"], response_model=OONIRunLink
"/v2/oonirun/links/{oonirun_link_id}", tags=["oonirun"], response_model=OONIRunLink
)
def get_latest_oonirun_link(
oonirun_link_id: str,
Expand All @@ -551,7 +551,7 @@ class OONIRunLinkList(BaseModel):
oonirun_links: List[OONIRunLink]


@router.get("/v2/oonirun-links", tags=["oonirun"])
@router.get("/v2/oonirun/links", tags=["oonirun"])
def list_oonirun_links(
is_mine: Annotated[
Optional[bool],
Expand Down
2 changes: 1 addition & 1 deletion ooniapi/services/oonirun/tests/test_integration.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,6 @@ def test_integration(server):
with httpx.Client(base_url=f"http://127.0.0.1:{LISTEN_PORT}") as client:
r = client.get("/version")
assert r.status_code == 200
r = client.get("/api/v2/oonirun-links")
r = client.get("/api/v2/oonirun/links")
j = r.json()
assert isinstance(j["oonirun_links"], list)
Loading

0 comments on commit e486936

Please sign in to comment.