Skip to content

Commit

Permalink
include swagger documentation updated
Browse files Browse the repository at this point in the history
  • Loading branch information
Tansito committed Dec 3, 2024
1 parent f3a8ab9 commit 0f18b2f
Showing 1 changed file with 40 additions and 3 deletions.
43 changes: 40 additions & 3 deletions gateway/api/v1/views/files.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,19 +64,26 @@ def provider_list(self, request):
return super().provider_list(request)

@swagger_auto_schema(
operation_description="Download a specific file",
operation_description="Download a specific file in the user directory",
manual_parameters=[
openapi.Parameter(
"file",
openapi.IN_QUERY,
description="file name",
description="File name",
type=openapi.TYPE_STRING,
required=True,
),
openapi.Parameter(
"function",
openapi.IN_QUERY,
description="Qiskit Function title",
type=openapi.TYPE_STRING,
required=True,
),
openapi.Parameter(
"provider",
openapi.IN_QUERY,
description="provider name",
description="Provider name",
type=openapi.TYPE_STRING,
required=False,
),
Expand All @@ -86,6 +93,36 @@ def provider_list(self, request):
def download(self, request):
return super().download(request)

@swagger_auto_schema(
operation_description="Download a specific file in the provider directory",
manual_parameters=[
openapi.Parameter(
"file",
openapi.IN_QUERY,
description="File name",
type=openapi.TYPE_STRING,
required=True,
),
openapi.Parameter(
"function",
openapi.IN_QUERY,
description="Qiskit Function title",
type=openapi.TYPE_STRING,
required=True,
),
openapi.Parameter(
"provider",
openapi.IN_QUERY,
description="Provider name",
type=openapi.TYPE_STRING,
required=True,
),
],
)
@action(methods=["GET"], detail=False, url_path="provider/download")
def provider_download(self, request):
return super().provider_download(request)

@swagger_auto_schema(
operation_description="Deletes file uploaded or produced by the programs",
request_body=openapi.Schema(
Expand Down

0 comments on commit 0f18b2f

Please sign in to comment.