Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unify endpoint response with the remaining endpoints #1233

Merged
merged 1 commit into from
Feb 2, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 11 additions & 5 deletions openapi/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2302,11 +2302,17 @@ components:
type: string
description: sha of the Pull Request's head commit.
PythonPlatforms:
type: array
items:
type: string
description: Platform information.
example: linux-x86_64
type: object
description: A listing of available platforms.
required:
- s2i
properties:
s2i:
type: array
items:
type: string
description: Platform information.
example: linux-x86_64
PythonPackageDependencies:
type: array
items:
Expand Down
4 changes: 2 additions & 2 deletions thoth/user_api/api_v1.py
Original file line number Diff line number Diff line change
Expand Up @@ -492,11 +492,11 @@ def list_python_package_indexes():
return GRAPH.get_python_package_index_all()


def get_python_platform() -> typing.List[str]:
def get_python_platform() -> typing.Dict[str, typing.List[str]]:
"""List available platforms for the Python ecosystem."""
from .openapi_server import GRAPH

return GRAPH.get_python_package_version_platform_all()
return {"platform": GRAPH.get_python_package_version_platform_all()}


def list_python_package_versions(
Expand Down