Skip to content

Commit

Permalink
fix: removed groupId query parameters where not needed
Browse files Browse the repository at this point in the history
  • Loading branch information
keithmanville committed Jul 2, 2024
1 parent d4e78cb commit 2f45f1c
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 3 deletions.
9 changes: 7 additions & 2 deletions src/dioptra/restapi/v1/experiments/controller.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,12 @@
from dioptra.restapi.routes import V1_EXPERIMENTS_ROUTE
from dioptra.restapi.v1 import utils
from dioptra.restapi.v1.entrypoints.schema import EntrypointRefSchema
from dioptra.restapi.v1.jobs.schema import JobPageSchema, JobSchema, JobStatusSchema
from dioptra.restapi.v1.jobs.schema import (
ExperimentJobGetQueryParameters,
JobPageSchema,
JobSchema,
JobStatusSchema,
)
from dioptra.restapi.v1.jobs.service import (
ExperimentJobIdService,
ExperimentJobIdStatusService,
Expand Down Expand Up @@ -236,7 +241,7 @@ def __init__(
super().__init__(*args, **kwargs)

@login_required
@accepts(query_params_schema=ExperimentGetQueryParameters, api=api)
@accepts(query_params_schema=ExperimentJobGetQueryParameters, api=api)
@responds(schema=JobPageSchema, api=api)
def get(self, id: int):
"""Returns a list of jobs for a specified Experiment."""
Expand Down
8 changes: 8 additions & 0 deletions src/dioptra/restapi/v1/jobs/schema.py
Original file line number Diff line number Diff line change
Expand Up @@ -153,3 +153,11 @@ class JobGetQueryParameters(
SearchQueryParametersSchema,
):
"""The query parameters for the GET method of the /jobs endpoint."""


class ExperimentJobGetQueryParameters(
PagingQueryParametersSchema,
SearchQueryParametersSchema,
):
"""The query parameters for the GET method of the /experiments/{id}/jobs
endpoint."""
1 change: 0 additions & 1 deletion src/dioptra/restapi/v1/schemas.py
Original file line number Diff line number Diff line change
Expand Up @@ -240,7 +240,6 @@ class SearchQueryParametersSchema(Schema):

class ResourceGetQueryParameters(
PagingQueryParametersSchema,
GroupIdQueryParametersSchema,
SearchQueryParametersSchema,
):
"""The query parameters for the GET method of the resource endpoints."""
Expand Down

0 comments on commit 2f45f1c

Please sign in to comment.