From 4cea10c9c135ecfa1b6e6992dd195da611534dc5 Mon Sep 17 00:00:00 2001 From: jfuller Date: Thu, 4 May 2023 11:51:33 +0200 Subject: [PATCH] Preparation of 1.3.4 release --- CHANGELOG.md | 2 + .../bindings/pyproject.toml | 2 +- .../api/authentication_status/__init__.py | 1 + .../authentication_status_retrieve.py | 85 +++++++++ .../api/controlled_access_test/__init__.py | 1 + .../controlled_access_test_retrieve.py | 86 +++++++++ .../api/token_auth_test/__init__.py | 2 + .../token_auth_test/token_auth_test_create.py | 85 +++++++++ .../token_auth_test_retrieve.py | 83 +++++++++ .../python_client/api/v1/v1_builds_list.py | 7 + .../api/v1/v1_builds_retrieve.py | 14 +- .../api/v1/v1_components_list.py | 42 +++++ .../bindings/python_client/models/__init__.py | 11 +- ...entication_status_retrieve_response_200.py | 75 ++++++++ .../python_client/models/build_type_enum.py | 2 + .../python_client/models/component.py | 141 +++------------ .../models/component_sources_item.py | 49 ----- .../models/component_upstreams_item.py | 49 ----- ...olled_access_test_retrieve_response_200.py | 59 +++++++ .../python_client/models/software_build.py | 12 +- .../models/software_build_summary.py | 4 +- ...=> token_auth_test_create_response_200.py} | 32 ++-- .../token_auth_test_retrieve_response_200.py | 59 +++++++ .../models/v1_builds_list_build_type.py | 2 + component_registry_bindings/constants.py | 2 +- .../openapi_schema.yml | 167 +++++++++++++++--- setup.py | 2 +- 27 files changed, 809 insertions(+), 267 deletions(-) create mode 100644 component_registry_bindings/bindings/python_client/api/authentication_status/__init__.py create mode 100644 component_registry_bindings/bindings/python_client/api/authentication_status/authentication_status_retrieve.py create mode 100644 component_registry_bindings/bindings/python_client/api/controlled_access_test/__init__.py create mode 100644 component_registry_bindings/bindings/python_client/api/controlled_access_test/controlled_access_test_retrieve.py create mode 100644 component_registry_bindings/bindings/python_client/api/token_auth_test/__init__.py create mode 100644 component_registry_bindings/bindings/python_client/api/token_auth_test/token_auth_test_create.py create mode 100644 component_registry_bindings/bindings/python_client/api/token_auth_test/token_auth_test_retrieve.py create mode 100644 component_registry_bindings/bindings/python_client/models/authentication_status_retrieve_response_200.py delete mode 100644 component_registry_bindings/bindings/python_client/models/component_sources_item.py delete mode 100644 component_registry_bindings/bindings/python_client/models/component_upstreams_item.py create mode 100644 component_registry_bindings/bindings/python_client/models/controlled_access_test_retrieve_response_200.py rename component_registry_bindings/bindings/python_client/models/{component_provides_item.py => token_auth_test_create_response_200.py} (50%) create mode 100644 component_registry_bindings/bindings/python_client/models/token_auth_test_retrieve_response_200.py diff --git a/CHANGELOG.md b/CHANGELOG.md index c29a3b4..fbabaf0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -12,6 +12,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## Unreleased +## [1.3.4] - 2023-05-04 + ## [1.3.3] - 2023-04-04 ## [1.3.2] - 2023-03-30 diff --git a/component_registry_bindings/bindings/pyproject.toml b/component_registry_bindings/bindings/pyproject.toml index 0309f55..0407af0 100644 --- a/component_registry_bindings/bindings/pyproject.toml +++ b/component_registry_bindings/bindings/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "bindings" -version = "1.3.3" +version = "1.3.4" description = "A client library for accessing Component Registry API" authors = [] diff --git a/component_registry_bindings/bindings/python_client/api/authentication_status/__init__.py b/component_registry_bindings/bindings/python_client/api/authentication_status/__init__.py new file mode 100644 index 0000000..289f187 --- /dev/null +++ b/component_registry_bindings/bindings/python_client/api/authentication_status/__init__.py @@ -0,0 +1 @@ +from .authentication_status_retrieve import * diff --git a/component_registry_bindings/bindings/python_client/api/authentication_status/authentication_status_retrieve.py b/component_registry_bindings/bindings/python_client/api/authentication_status/authentication_status_retrieve.py new file mode 100644 index 0000000..294d9b5 --- /dev/null +++ b/component_registry_bindings/bindings/python_client/api/authentication_status/authentication_status_retrieve.py @@ -0,0 +1,85 @@ +from typing import Any, Dict, Optional + +import requests + +from ...client import Client +from ...models.authentication_status_retrieve_response_200 import ( + AuthenticationStatusRetrieveResponse200, +) +from ...types import UNSET, Response, Unset + +QUERY_PARAMS = {} + + +def _get_kwargs( + *, + client: Client, +) -> Dict[str, Any]: + url = "{}/api/authentication_status".format( + client.base_url, + ) + + headers: Dict[str, Any] = client.get_headers() + + return { + "url": url, + "headers": headers, + } + + +def _parse_response( + *, response: requests.Response +) -> Optional[AuthenticationStatusRetrieveResponse200]: + if response.status_code == 200: + _response_200 = response.json() + response_200: AuthenticationStatusRetrieveResponse200 + if isinstance(_response_200, Unset): + response_200 = UNSET + else: + response_200 = AuthenticationStatusRetrieveResponse200.from_dict( + _response_200 + ) + + return response_200 + return None + + +def _build_response( + *, response: requests.Response +) -> Response[AuthenticationStatusRetrieveResponse200]: + return Response( + status_code=response.status_code, + content=response.content, + headers=response.headers, + parsed=_parse_response(response=response), + ) + + +def sync_detailed( + *, + client: Client, +) -> Response[AuthenticationStatusRetrieveResponse200]: + kwargs = _get_kwargs( + client=client, + ) + + response = requests.get( + verify=client.verify_ssl, + auth=client.auth, + timeout=client.timeout, + **kwargs, + ) + response.raise_for_status() + + return _build_response(response=response) + + +def sync( + *, + client: Client, +) -> Optional[AuthenticationStatusRetrieveResponse200]: + """View to determine whether you are currently authenticated and, if so, as whom.""" + + return sync_detailed( + client=client, + ).parsed diff --git a/component_registry_bindings/bindings/python_client/api/controlled_access_test/__init__.py b/component_registry_bindings/bindings/python_client/api/controlled_access_test/__init__.py new file mode 100644 index 0000000..f51ee35 --- /dev/null +++ b/component_registry_bindings/bindings/python_client/api/controlled_access_test/__init__.py @@ -0,0 +1 @@ +from .controlled_access_test_retrieve import * diff --git a/component_registry_bindings/bindings/python_client/api/controlled_access_test/controlled_access_test_retrieve.py b/component_registry_bindings/bindings/python_client/api/controlled_access_test/controlled_access_test_retrieve.py new file mode 100644 index 0000000..2fc4216 --- /dev/null +++ b/component_registry_bindings/bindings/python_client/api/controlled_access_test/controlled_access_test_retrieve.py @@ -0,0 +1,86 @@ +from typing import Any, Dict, Optional + +import requests + +from ...client import Client +from ...models.controlled_access_test_retrieve_response_200 import ( + ControlledAccessTestRetrieveResponse200, +) +from ...types import UNSET, Response, Unset + +QUERY_PARAMS = {} + + +def _get_kwargs( + *, + client: Client, +) -> Dict[str, Any]: + url = "{}/api/controlled_access_test".format( + client.base_url, + ) + + headers: Dict[str, Any] = client.get_headers() + + return { + "url": url, + "headers": headers, + } + + +def _parse_response( + *, response: requests.Response +) -> Optional[ControlledAccessTestRetrieveResponse200]: + if response.status_code == 200: + _response_200 = response.json() + response_200: ControlledAccessTestRetrieveResponse200 + if isinstance(_response_200, Unset): + response_200 = UNSET + else: + response_200 = ControlledAccessTestRetrieveResponse200.from_dict( + _response_200 + ) + + return response_200 + return None + + +def _build_response( + *, response: requests.Response +) -> Response[ControlledAccessTestRetrieveResponse200]: + return Response( + status_code=response.status_code, + content=response.content, + headers=response.headers, + parsed=_parse_response(response=response), + ) + + +def sync_detailed( + *, + client: Client, +) -> Response[ControlledAccessTestRetrieveResponse200]: + kwargs = _get_kwargs( + client=client, + ) + + response = requests.get( + verify=client.verify_ssl, + auth=client.auth, + timeout=client.timeout, + **kwargs, + ) + response.raise_for_status() + + return _build_response(response=response) + + +def sync( + *, + client: Client, +) -> Optional[ControlledAccessTestRetrieveResponse200]: + """View to determine whether you are authenticated with an account that has a specific + role.""" + + return sync_detailed( + client=client, + ).parsed diff --git a/component_registry_bindings/bindings/python_client/api/token_auth_test/__init__.py b/component_registry_bindings/bindings/python_client/api/token_auth_test/__init__.py new file mode 100644 index 0000000..8564d13 --- /dev/null +++ b/component_registry_bindings/bindings/python_client/api/token_auth_test/__init__.py @@ -0,0 +1,2 @@ +from .token_auth_test_create import * +from .token_auth_test_retrieve import * diff --git a/component_registry_bindings/bindings/python_client/api/token_auth_test/token_auth_test_create.py b/component_registry_bindings/bindings/python_client/api/token_auth_test/token_auth_test_create.py new file mode 100644 index 0000000..aa3d42e --- /dev/null +++ b/component_registry_bindings/bindings/python_client/api/token_auth_test/token_auth_test_create.py @@ -0,0 +1,85 @@ +from typing import Any, Dict, Optional, Union + +import requests + +from ...client import AuthenticatedClient +from ...models.token_auth_test_create_response_200 import TokenAuthTestCreateResponse200 +from ...types import UNSET, Response, Unset + +QUERY_PARAMS = {} + + +def _get_kwargs( + *, + client: AuthenticatedClient, +) -> Dict[str, Any]: + url = "{}/api/token_auth_test".format( + client.base_url, + ) + + headers: Dict[str, Any] = client.get_headers() + + return { + "url": url, + "headers": headers, + } + + +def _parse_response( + *, response: requests.Response +) -> Optional[Union[Any, TokenAuthTestCreateResponse200]]: + if response.status_code == 200: + _response_200 = response.json() + response_200: TokenAuthTestCreateResponse200 + if isinstance(_response_200, Unset): + response_200 = UNSET + else: + response_200 = TokenAuthTestCreateResponse200.from_dict(_response_200) + + return response_200 + if response.status_code == 401: + response_401 = None + + return response_401 + return None + + +def _build_response( + *, response: requests.Response +) -> Response[Union[Any, TokenAuthTestCreateResponse200]]: + return Response( + status_code=response.status_code, + content=response.content, + headers=response.headers, + parsed=_parse_response(response=response), + ) + + +def sync_detailed( + *, + client: AuthenticatedClient, +) -> Response[Union[Any, TokenAuthTestCreateResponse200]]: + kwargs = _get_kwargs( + client=client, + ) + + response = requests.post( + verify=client.verify_ssl, + auth=client.auth, + timeout=client.timeout, + **kwargs, + ) + response.raise_for_status() + + return _build_response(response=response) + + +def sync( + *, + client: AuthenticatedClient, +) -> Optional[Union[Any, TokenAuthTestCreateResponse200]]: + """View to test authentication with DRF Tokens.""" + + return sync_detailed( + client=client, + ).parsed diff --git a/component_registry_bindings/bindings/python_client/api/token_auth_test/token_auth_test_retrieve.py b/component_registry_bindings/bindings/python_client/api/token_auth_test/token_auth_test_retrieve.py new file mode 100644 index 0000000..934c8f4 --- /dev/null +++ b/component_registry_bindings/bindings/python_client/api/token_auth_test/token_auth_test_retrieve.py @@ -0,0 +1,83 @@ +from typing import Any, Dict, Optional + +import requests + +from ...client import AuthenticatedClient +from ...models.token_auth_test_retrieve_response_200 import ( + TokenAuthTestRetrieveResponse200, +) +from ...types import UNSET, Response, Unset + +QUERY_PARAMS = {} + + +def _get_kwargs( + *, + client: AuthenticatedClient, +) -> Dict[str, Any]: + url = "{}/api/token_auth_test".format( + client.base_url, + ) + + headers: Dict[str, Any] = client.get_headers() + + return { + "url": url, + "headers": headers, + } + + +def _parse_response( + *, response: requests.Response +) -> Optional[TokenAuthTestRetrieveResponse200]: + if response.status_code == 200: + _response_200 = response.json() + response_200: TokenAuthTestRetrieveResponse200 + if isinstance(_response_200, Unset): + response_200 = UNSET + else: + response_200 = TokenAuthTestRetrieveResponse200.from_dict(_response_200) + + return response_200 + return None + + +def _build_response( + *, response: requests.Response +) -> Response[TokenAuthTestRetrieveResponse200]: + return Response( + status_code=response.status_code, + content=response.content, + headers=response.headers, + parsed=_parse_response(response=response), + ) + + +def sync_detailed( + *, + client: AuthenticatedClient, +) -> Response[TokenAuthTestRetrieveResponse200]: + kwargs = _get_kwargs( + client=client, + ) + + response = requests.get( + verify=client.verify_ssl, + auth=client.auth, + timeout=client.timeout, + **kwargs, + ) + response.raise_for_status() + + return _build_response(response=response) + + +def sync( + *, + client: AuthenticatedClient, +) -> Optional[TokenAuthTestRetrieveResponse200]: + """View to test authentication with DRF Tokens.""" + + return sync_detailed( + client=client, + ).parsed diff --git a/component_registry_bindings/bindings/python_client/api/v1/v1_builds_list.py b/component_registry_bindings/bindings/python_client/api/v1/v1_builds_list.py index 90a114b..cd6f6b9 100644 --- a/component_registry_bindings/bindings/python_client/api/v1/v1_builds_list.py +++ b/component_registry_bindings/bindings/python_client/api/v1/v1_builds_list.py @@ -8,6 +8,7 @@ from ...types import UNSET, Response, Unset QUERY_PARAMS = { + "build_id": str, "build_type": V1BuildsListBuildType, "exclude_fields": List[str], "include_fields": List[str], @@ -22,6 +23,7 @@ def _get_kwargs( *, client: Client, + build_id: Union[Unset, None, str] = UNSET, build_type: Union[Unset, None, V1BuildsListBuildType] = UNSET, exclude_fields: Union[Unset, None, List[str]] = UNSET, include_fields: Union[Unset, None, List[str]] = UNSET, @@ -59,6 +61,7 @@ def _get_kwargs( json_include_fields = include_fields params: Dict[str, Any] = { + "build_id": build_id, "build_type": json_build_type, "exclude_fields": json_exclude_fields, "include_fields": json_include_fields, @@ -106,6 +109,7 @@ def _build_response( def sync_detailed( *, client: Client, + build_id: Union[Unset, None, str] = UNSET, build_type: Union[Unset, None, V1BuildsListBuildType] = UNSET, exclude_fields: Union[Unset, None, List[str]] = UNSET, include_fields: Union[Unset, None, List[str]] = UNSET, @@ -117,6 +121,7 @@ def sync_detailed( ) -> Response[PaginatedSoftwareBuildList]: kwargs = _get_kwargs( client=client, + build_id=build_id, build_type=build_type, exclude_fields=exclude_fields, include_fields=include_fields, @@ -141,6 +146,7 @@ def sync_detailed( def sync( *, client: Client, + build_id: Union[Unset, None, str] = UNSET, build_type: Union[Unset, None, V1BuildsListBuildType] = UNSET, exclude_fields: Union[Unset, None, List[str]] = UNSET, include_fields: Union[Unset, None, List[str]] = UNSET, @@ -154,6 +160,7 @@ def sync( return sync_detailed( client=client, + build_id=build_id, build_type=build_type, exclude_fields=exclude_fields, include_fields=include_fields, diff --git a/component_registry_bindings/bindings/python_client/api/v1/v1_builds_retrieve.py b/component_registry_bindings/bindings/python_client/api/v1/v1_builds_retrieve.py index 2e47540..b3df5ad 100644 --- a/component_registry_bindings/bindings/python_client/api/v1/v1_builds_retrieve.py +++ b/component_registry_bindings/bindings/python_client/api/v1/v1_builds_retrieve.py @@ -13,15 +13,15 @@ def _get_kwargs( - build_id: int, + uuid: str, *, client: Client, exclude_fields: Union[Unset, None, List[str]] = UNSET, include_fields: Union[Unset, None, List[str]] = UNSET, ) -> Dict[str, Any]: - url = "{}/api/v1/builds/{build_id}".format( + url = "{}/api/v1/builds/{uuid}".format( client.base_url, - build_id=build_id, + uuid=uuid, ) headers: Dict[str, Any] = client.get_headers() @@ -76,14 +76,14 @@ def _build_response(*, response: requests.Response) -> Response[SoftwareBuild]: def sync_detailed( - build_id: int, + uuid: str, *, client: Client, exclude_fields: Union[Unset, None, List[str]] = UNSET, include_fields: Union[Unset, None, List[str]] = UNSET, ) -> Response[SoftwareBuild]: kwargs = _get_kwargs( - build_id=build_id, + uuid=uuid, client=client, exclude_fields=exclude_fields, include_fields=include_fields, @@ -101,7 +101,7 @@ def sync_detailed( def sync( - build_id: int, + uuid: str, *, client: Client, exclude_fields: Union[Unset, None, List[str]] = UNSET, @@ -110,7 +110,7 @@ def sync( """View for api/v1/builds""" return sync_detailed( - build_id=build_id, + uuid=uuid, client=client, exclude_fields=exclude_fields, include_fields=include_fields, diff --git a/component_registry_bindings/bindings/python_client/api/v1/v1_components_list.py b/component_registry_bindings/bindings/python_client/api/v1/v1_components_list.py index df7d7d7..4b0642e 100644 --- a/component_registry_bindings/bindings/python_client/api/v1/v1_components_list.py +++ b/component_registry_bindings/bindings/python_client/api/v1/v1_components_list.py @@ -14,10 +14,14 @@ "description": str, "el_match": str, "exclude_fields": List[str], + "gomod_components": bool, "include_fields": List[str], + "latest_components": bool, + "latest_components_by_streams": bool, "limit": int, "missing_copyright": bool, "missing_license": bool, + "missing_scan_url": bool, "name": str, "namespace": V1ComponentsListNamespace, "nevra": str, @@ -37,6 +41,8 @@ "re_upstreams": str, "related_url": str, "release": str, + "released_components": bool, + "root_components": bool, "search": str, "sources": str, "tags": int, @@ -55,10 +61,14 @@ def _get_kwargs( description: Union[Unset, None, str] = UNSET, el_match: Union[Unset, None, str] = UNSET, exclude_fields: Union[Unset, None, List[str]] = UNSET, + gomod_components: Union[Unset, None, bool] = UNSET, include_fields: Union[Unset, None, List[str]] = UNSET, + latest_components: Union[Unset, None, bool] = UNSET, + latest_components_by_streams: Union[Unset, None, bool] = UNSET, limit: Union[Unset, None, int] = UNSET, missing_copyright: Union[Unset, None, bool] = UNSET, missing_license: Union[Unset, None, bool] = UNSET, + missing_scan_url: Union[Unset, None, bool] = UNSET, name: Union[Unset, None, str] = UNSET, namespace: Union[Unset, None, V1ComponentsListNamespace] = UNSET, nevra: Union[Unset, None, str] = UNSET, @@ -78,6 +88,8 @@ def _get_kwargs( re_upstreams: Union[Unset, None, str] = UNSET, related_url: Union[Unset, None, str] = UNSET, release: Union[Unset, None, str] = UNSET, + released_components: Union[Unset, None, bool] = UNSET, + root_components: Union[Unset, None, bool] = UNSET, search: Union[Unset, None, str] = UNSET, sources: Union[Unset, None, str] = UNSET, tags: Union[Unset, None, int] = UNSET, @@ -124,10 +136,14 @@ def _get_kwargs( "description": description, "el_match": el_match, "exclude_fields": json_exclude_fields, + "gomod_components": gomod_components, "include_fields": json_include_fields, + "latest_components": latest_components, + "latest_components_by_streams": latest_components_by_streams, "limit": limit, "missing_copyright": missing_copyright, "missing_license": missing_license, + "missing_scan_url": missing_scan_url, "name": name, "namespace": json_namespace, "nevra": nevra, @@ -147,6 +163,8 @@ def _get_kwargs( "re_upstreams": re_upstreams, "related_url": related_url, "release": release, + "released_components": released_components, + "root_components": root_components, "search": search, "sources": sources, "tags": tags, @@ -194,10 +212,14 @@ def sync_detailed( description: Union[Unset, None, str] = UNSET, el_match: Union[Unset, None, str] = UNSET, exclude_fields: Union[Unset, None, List[str]] = UNSET, + gomod_components: Union[Unset, None, bool] = UNSET, include_fields: Union[Unset, None, List[str]] = UNSET, + latest_components: Union[Unset, None, bool] = UNSET, + latest_components_by_streams: Union[Unset, None, bool] = UNSET, limit: Union[Unset, None, int] = UNSET, missing_copyright: Union[Unset, None, bool] = UNSET, missing_license: Union[Unset, None, bool] = UNSET, + missing_scan_url: Union[Unset, None, bool] = UNSET, name: Union[Unset, None, str] = UNSET, namespace: Union[Unset, None, V1ComponentsListNamespace] = UNSET, nevra: Union[Unset, None, str] = UNSET, @@ -217,6 +239,8 @@ def sync_detailed( re_upstreams: Union[Unset, None, str] = UNSET, related_url: Union[Unset, None, str] = UNSET, release: Union[Unset, None, str] = UNSET, + released_components: Union[Unset, None, bool] = UNSET, + root_components: Union[Unset, None, bool] = UNSET, search: Union[Unset, None, str] = UNSET, sources: Union[Unset, None, str] = UNSET, tags: Union[Unset, None, int] = UNSET, @@ -232,10 +256,14 @@ def sync_detailed( description=description, el_match=el_match, exclude_fields=exclude_fields, + gomod_components=gomod_components, include_fields=include_fields, + latest_components=latest_components, + latest_components_by_streams=latest_components_by_streams, limit=limit, missing_copyright=missing_copyright, missing_license=missing_license, + missing_scan_url=missing_scan_url, name=name, namespace=namespace, nevra=nevra, @@ -255,6 +283,8 @@ def sync_detailed( re_upstreams=re_upstreams, related_url=related_url, release=release, + released_components=released_components, + root_components=root_components, search=search, sources=sources, tags=tags, @@ -283,10 +313,14 @@ def sync( description: Union[Unset, None, str] = UNSET, el_match: Union[Unset, None, str] = UNSET, exclude_fields: Union[Unset, None, List[str]] = UNSET, + gomod_components: Union[Unset, None, bool] = UNSET, include_fields: Union[Unset, None, List[str]] = UNSET, + latest_components: Union[Unset, None, bool] = UNSET, + latest_components_by_streams: Union[Unset, None, bool] = UNSET, limit: Union[Unset, None, int] = UNSET, missing_copyright: Union[Unset, None, bool] = UNSET, missing_license: Union[Unset, None, bool] = UNSET, + missing_scan_url: Union[Unset, None, bool] = UNSET, name: Union[Unset, None, str] = UNSET, namespace: Union[Unset, None, V1ComponentsListNamespace] = UNSET, nevra: Union[Unset, None, str] = UNSET, @@ -306,6 +340,8 @@ def sync( re_upstreams: Union[Unset, None, str] = UNSET, related_url: Union[Unset, None, str] = UNSET, release: Union[Unset, None, str] = UNSET, + released_components: Union[Unset, None, bool] = UNSET, + root_components: Union[Unset, None, bool] = UNSET, search: Union[Unset, None, str] = UNSET, sources: Union[Unset, None, str] = UNSET, tags: Union[Unset, None, int] = UNSET, @@ -323,10 +359,14 @@ def sync( description=description, el_match=el_match, exclude_fields=exclude_fields, + gomod_components=gomod_components, include_fields=include_fields, + latest_components=latest_components, + latest_components_by_streams=latest_components_by_streams, limit=limit, missing_copyright=missing_copyright, missing_license=missing_license, + missing_scan_url=missing_scan_url, name=name, namespace=namespace, nevra=nevra, @@ -346,6 +386,8 @@ def sync( re_upstreams=re_upstreams, related_url=related_url, release=release, + released_components=released_components, + root_components=root_components, search=search, sources=sources, tags=tags, diff --git a/component_registry_bindings/bindings/python_client/models/__init__.py b/component_registry_bindings/bindings/python_client/models/__init__.py index 317fee8..a8aacb2 100644 --- a/component_registry_bindings/bindings/python_client/models/__init__.py +++ b/component_registry_bindings/bindings/python_client/models/__init__.py @@ -1,5 +1,8 @@ """ Contains all the data models used in inputs/outputs """ +from .authentication_status_retrieve_response_200 import ( + AuthenticationStatusRetrieveResponse200, +) from .build_type_enum import BuildTypeEnum from .channel import Channel from .channel_product_streams_item import ChannelProductStreamsItem @@ -13,10 +16,10 @@ from .component_product_variants_item import ComponentProductVariantsItem from .component_product_versions_item import ComponentProductVersionsItem from .component_products_item import ComponentProductsItem -from .component_provides_item import ComponentProvidesItem -from .component_sources_item import ComponentSourcesItem from .component_type_enum import ComponentTypeEnum -from .component_upstreams_item import ComponentUpstreamsItem +from .controlled_access_test_retrieve_response_200 import ( + ControlledAccessTestRetrieveResponse200, +) from .namespace_enum import NamespaceEnum from .paginated_channel_list import PaginatedChannelList from .paginated_component_list import PaginatedComponentList @@ -53,6 +56,8 @@ from .software_build_components_item import SoftwareBuildComponentsItem from .software_build_summary import SoftwareBuildSummary from .tag import Tag +from .token_auth_test_create_response_200 import TokenAuthTestCreateResponse200 +from .token_auth_test_retrieve_response_200 import TokenAuthTestRetrieveResponse200 from .v1_builds_list_build_type import V1BuildsListBuildType from .v1_channels_list_type import V1ChannelsListType from .v1_components_list_namespace import V1ComponentsListNamespace diff --git a/component_registry_bindings/bindings/python_client/models/authentication_status_retrieve_response_200.py b/component_registry_bindings/bindings/python_client/models/authentication_status_retrieve_response_200.py new file mode 100644 index 0000000..b201570 --- /dev/null +++ b/component_registry_bindings/bindings/python_client/models/authentication_status_retrieve_response_200.py @@ -0,0 +1,75 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +import attr + +from ..types import UNSET, ComponentRegistryModel, Unset + +T = TypeVar("T", bound="AuthenticationStatusRetrieveResponse200") + + +@attr.s(auto_attribs=True) +class AuthenticationStatusRetrieveResponse200(ComponentRegistryModel): + """ """ + + oidc_enabled: Union[Unset, str] = UNSET + user: Union[Unset, str] = UNSET + auth: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + oidc_enabled = self.oidc_enabled + user = self.user + auth = self.auth + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + if oidc_enabled is not UNSET: + field_dict["oidc_enabled"] = oidc_enabled + if user is not UNSET: + field_dict["user"] = user + if auth is not UNSET: + field_dict["auth"] = auth + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() if isinstance(src_dict, dict) else {} + oidc_enabled = d.pop("oidc_enabled", UNSET) + + user = d.pop("user", UNSET) + + auth = d.pop("auth", UNSET) + + authentication_status_retrieve_response_200 = cls( + oidc_enabled=oidc_enabled, + user=user, + auth=auth, + ) + + authentication_status_retrieve_response_200.additional_properties = d + return authentication_status_retrieve_response_200 + + @staticmethod + def get_fields(): + return { + "oidc_enabled": str, + "user": str, + "auth": str, + } + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/component_registry_bindings/bindings/python_client/models/build_type_enum.py b/component_registry_bindings/bindings/python_client/models/build_type_enum.py index a15de72..3e29729 100644 --- a/component_registry_bindings/bindings/python_client/models/build_type_enum.py +++ b/component_registry_bindings/bindings/python_client/models/build_type_enum.py @@ -4,6 +4,8 @@ class BuildTypeEnum(str, Enum): BREW = "BREW" KOJI = "KOJI" + CENTOS = "CENTOS" + APP_INTERFACE = "APP_INTERFACE" # This is a temporary tweak to accept empty Enum NONE = "" diff --git a/component_registry_bindings/bindings/python_client/models/component.py b/component_registry_bindings/bindings/python_client/models/component.py index 5f567d3..4f7dd25 100644 --- a/component_registry_bindings/bindings/python_client/models/component.py +++ b/component_registry_bindings/bindings/python_client/models/component.py @@ -8,10 +8,7 @@ from ..models.component_product_variants_item import ComponentProductVariantsItem from ..models.component_product_versions_item import ComponentProductVersionsItem from ..models.component_products_item import ComponentProductsItem -from ..models.component_provides_item import ComponentProvidesItem -from ..models.component_sources_item import ComponentSourcesItem from ..models.component_type_enum import ComponentTypeEnum -from ..models.component_upstreams_item import ComponentUpstreamsItem from ..models.namespace_enum import NamespaceEnum from ..models.software_build_summary import SoftwareBuildSummary from ..models.tag import Tag @@ -56,9 +53,9 @@ class Component(ComponentRegistryModel): product_streams: List[ComponentProductStreamsItem] product_variants: List[ComponentProductVariantsItem] channels: List[ComponentChannelsItem] - sources: List[ComponentSourcesItem] - provides: List[ComponentProvidesItem] - upstreams: List[ComponentUpstreamsItem] + sources: str + provides: str + upstreams: str manifest: str filename: str additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) @@ -172,36 +169,9 @@ def to_dict(self) -> Dict[str, Any]: channels.append(channels_item) - sources: List[Dict[str, Any]] = UNSET - if not isinstance(self.sources, Unset): - sources = [] - for sources_item_data in self.sources: - sources_item: Dict[str, Any] = UNSET - if not isinstance(sources_item_data, Unset): - sources_item = sources_item_data.to_dict() - - sources.append(sources_item) - - provides: List[Dict[str, Any]] = UNSET - if not isinstance(self.provides, Unset): - provides = [] - for provides_item_data in self.provides: - provides_item: Dict[str, Any] = UNSET - if not isinstance(provides_item_data, Unset): - provides_item = provides_item_data.to_dict() - - provides.append(provides_item) - - upstreams: List[Dict[str, Any]] = UNSET - if not isinstance(self.upstreams, Unset): - upstreams = [] - for upstreams_item_data in self.upstreams: - upstreams_item: Dict[str, Any] = UNSET - if not isinstance(upstreams_item_data, Unset): - upstreams_item = upstreams_item_data.to_dict() - - upstreams.append(upstreams_item) - + sources = self.sources + provides = self.provides + upstreams = self.upstreams manifest = self.manifest filename = self.filename @@ -469,39 +439,21 @@ def to_multipart(self) -> Dict[str, Any]: _temp_channels.append(channels_item) channels = (None, json.dumps(_temp_channels), "application/json") - sources: Union[Unset, Tuple[None, str, str]] = UNSET - if not isinstance(self.sources, Unset): - _temp_sources = [] - for sources_item_data in self.sources: - sources_item: Dict[str, Any] = UNSET - if not isinstance(sources_item_data, Unset): - sources_item = sources_item_data.to_dict() - - _temp_sources.append(sources_item) - sources = (None, json.dumps(_temp_sources), "application/json") - - provides: Union[Unset, Tuple[None, str, str]] = UNSET - if not isinstance(self.provides, Unset): - _temp_provides = [] - for provides_item_data in self.provides: - provides_item: Dict[str, Any] = UNSET - if not isinstance(provides_item_data, Unset): - provides_item = provides_item_data.to_dict() - - _temp_provides.append(provides_item) - provides = (None, json.dumps(_temp_provides), "application/json") - - upstreams: Union[Unset, Tuple[None, str, str]] = UNSET - if not isinstance(self.upstreams, Unset): - _temp_upstreams = [] - for upstreams_item_data in self.upstreams: - upstreams_item: Dict[str, Any] = UNSET - if not isinstance(upstreams_item_data, Unset): - upstreams_item = upstreams_item_data.to_dict() - - _temp_upstreams.append(upstreams_item) - upstreams = (None, json.dumps(_temp_upstreams), "application/json") - + sources = ( + self.sources + if self.sources is UNSET + else (None, str(self.sources), "text/plain") + ) + provides = ( + self.provides + if self.provides is UNSET + else (None, str(self.provides), "text/plain") + ) + upstreams = ( + self.upstreams + if self.upstreams is UNSET + else (None, str(self.upstreams), "text/plain") + ) manifest = ( self.manifest if self.manifest is UNSET @@ -759,50 +711,11 @@ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: channels.append(channels_item) - sources = [] - _sources = d.pop("sources", UNSET) - if _sources is UNSET: - sources = UNSET - else: - for sources_item_data in _sources or []: - _sources_item = sources_item_data - sources_item: ComponentSourcesItem - if isinstance(_sources_item, Unset): - sources_item = UNSET - else: - sources_item = ComponentSourcesItem.from_dict(_sources_item) - - sources.append(sources_item) + sources = d.pop("sources", UNSET) - provides = [] - _provides = d.pop("provides", UNSET) - if _provides is UNSET: - provides = UNSET - else: - for provides_item_data in _provides or []: - _provides_item = provides_item_data - provides_item: ComponentProvidesItem - if isinstance(_provides_item, Unset): - provides_item = UNSET - else: - provides_item = ComponentProvidesItem.from_dict(_provides_item) - - provides.append(provides_item) - - upstreams = [] - _upstreams = d.pop("upstreams", UNSET) - if _upstreams is UNSET: - upstreams = UNSET - else: - for upstreams_item_data in _upstreams or []: - _upstreams_item = upstreams_item_data - upstreams_item: ComponentUpstreamsItem - if isinstance(_upstreams_item, Unset): - upstreams_item = UNSET - else: - upstreams_item = ComponentUpstreamsItem.from_dict(_upstreams_item) + provides = d.pop("provides", UNSET) - upstreams.append(upstreams_item) + upstreams = d.pop("upstreams", UNSET) manifest = d.pop("manifest", UNSET) @@ -884,9 +797,9 @@ def get_fields(): "product_streams": List[ComponentProductStreamsItem], "product_variants": List[ComponentProductVariantsItem], "channels": List[ComponentChannelsItem], - "sources": List[ComponentSourcesItem], - "provides": List[ComponentProvidesItem], - "upstreams": List[ComponentUpstreamsItem], + "sources": str, + "provides": str, + "upstreams": str, "manifest": str, "filename": str, } diff --git a/component_registry_bindings/bindings/python_client/models/component_sources_item.py b/component_registry_bindings/bindings/python_client/models/component_sources_item.py deleted file mode 100644 index 5723cc4..0000000 --- a/component_registry_bindings/bindings/python_client/models/component_sources_item.py +++ /dev/null @@ -1,49 +0,0 @@ -from typing import Any, Dict, List, Type, TypeVar - -import attr - -from ..types import ComponentRegistryModel - -T = TypeVar("T", bound="ComponentSourcesItem") - - -@attr.s(auto_attribs=True) -class ComponentSourcesItem(ComponentRegistryModel): - """ """ - - additional_properties: Dict[str, str] = attr.ib(init=False, factory=dict) - - def to_dict(self) -> Dict[str, Any]: - - field_dict: Dict[str, Any] = {} - field_dict.update(self.additional_properties) - - return field_dict - - @classmethod - def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: - d = src_dict.copy() if isinstance(src_dict, dict) else {} - component_sources_item = cls() - - component_sources_item.additional_properties = d - return component_sources_item - - @staticmethod - def get_fields(): - return {} - - @property - def additional_keys(self) -> List[str]: - return list(self.additional_properties.keys()) - - def __getitem__(self, key: str) -> str: - return self.additional_properties[key] - - def __setitem__(self, key: str, value: str) -> None: - self.additional_properties[key] = value - - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] - - def __contains__(self, key: str) -> bool: - return key in self.additional_properties diff --git a/component_registry_bindings/bindings/python_client/models/component_upstreams_item.py b/component_registry_bindings/bindings/python_client/models/component_upstreams_item.py deleted file mode 100644 index 1ad1197..0000000 --- a/component_registry_bindings/bindings/python_client/models/component_upstreams_item.py +++ /dev/null @@ -1,49 +0,0 @@ -from typing import Any, Dict, List, Type, TypeVar - -import attr - -from ..types import ComponentRegistryModel - -T = TypeVar("T", bound="ComponentUpstreamsItem") - - -@attr.s(auto_attribs=True) -class ComponentUpstreamsItem(ComponentRegistryModel): - """ """ - - additional_properties: Dict[str, str] = attr.ib(init=False, factory=dict) - - def to_dict(self) -> Dict[str, Any]: - - field_dict: Dict[str, Any] = {} - field_dict.update(self.additional_properties) - - return field_dict - - @classmethod - def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: - d = src_dict.copy() if isinstance(src_dict, dict) else {} - component_upstreams_item = cls() - - component_upstreams_item.additional_properties = d - return component_upstreams_item - - @staticmethod - def get_fields(): - return {} - - @property - def additional_keys(self) -> List[str]: - return list(self.additional_properties.keys()) - - def __getitem__(self, key: str) -> str: - return self.additional_properties[key] - - def __setitem__(self, key: str, value: str) -> None: - self.additional_properties[key] = value - - def __delitem__(self, key: str) -> None: - del self.additional_properties[key] - - def __contains__(self, key: str) -> bool: - return key in self.additional_properties diff --git a/component_registry_bindings/bindings/python_client/models/controlled_access_test_retrieve_response_200.py b/component_registry_bindings/bindings/python_client/models/controlled_access_test_retrieve_response_200.py new file mode 100644 index 0000000..8ead599 --- /dev/null +++ b/component_registry_bindings/bindings/python_client/models/controlled_access_test_retrieve_response_200.py @@ -0,0 +1,59 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +import attr + +from ..types import UNSET, ComponentRegistryModel, Unset + +T = TypeVar("T", bound="ControlledAccessTestRetrieveResponse200") + + +@attr.s(auto_attribs=True) +class ControlledAccessTestRetrieveResponse200(ComponentRegistryModel): + """ """ + + user: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + user = self.user + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + if user is not UNSET: + field_dict["user"] = user + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() if isinstance(src_dict, dict) else {} + user = d.pop("user", UNSET) + + controlled_access_test_retrieve_response_200 = cls( + user=user, + ) + + controlled_access_test_retrieve_response_200.additional_properties = d + return controlled_access_test_retrieve_response_200 + + @staticmethod + def get_fields(): + return { + "user": str, + } + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/component_registry_bindings/bindings/python_client/models/software_build.py b/component_registry_bindings/bindings/python_client/models/software_build.py index bf4423a..001291d 100644 --- a/component_registry_bindings/bindings/python_client/models/software_build.py +++ b/component_registry_bindings/bindings/python_client/models/software_build.py @@ -17,9 +17,10 @@ class SoftwareBuild(ComponentRegistryModel): """Show detailed information for SoftwareBuild(s). Add or remove fields using ?include_fields=&exclude_fields=""" + uuid: str link: str web_url: str - build_id: int + build_id: str build_type: BuildTypeEnum name: str source: str @@ -30,6 +31,7 @@ class SoftwareBuild(ComponentRegistryModel): additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: + uuid = self.uuid link = self.link web_url = self.web_url build_id = self.build_id @@ -70,6 +72,8 @@ def to_dict(self) -> Dict[str, Any]: field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) + if uuid is not UNSET: + field_dict["uuid"] = uuid if link is not UNSET: field_dict["link"] = link if web_url is not UNSET: @@ -96,6 +100,8 @@ def to_dict(self) -> Dict[str, Any]: @classmethod def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: d = src_dict.copy() if isinstance(src_dict, dict) else {} + uuid = d.pop("uuid", UNSET) + link = d.pop("link", UNSET) web_url = d.pop("web_url", UNSET) @@ -160,6 +166,7 @@ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: components.append(components_item) software_build = cls( + uuid=uuid, link=link, web_url=web_url, build_id=build_id, @@ -178,9 +185,10 @@ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: @staticmethod def get_fields(): return { + "uuid": str, "link": str, "web_url": str, - "build_id": int, + "build_id": str, "build_type": BuildTypeEnum, "name": str, "source": str, diff --git a/component_registry_bindings/bindings/python_client/models/software_build_summary.py b/component_registry_bindings/bindings/python_client/models/software_build_summary.py index 2cfa1df..168c267 100644 --- a/component_registry_bindings/bindings/python_client/models/software_build_summary.py +++ b/component_registry_bindings/bindings/python_client/models/software_build_summary.py @@ -14,7 +14,7 @@ class SoftwareBuildSummary(ComponentRegistryModel): Add or remove fields using ?include_fields=&exclude_fields=""" link: str - build_id: int + build_id: str build_type: BuildTypeEnum name: str source: str @@ -79,7 +79,7 @@ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: def get_fields(): return { "link": str, - "build_id": int, + "build_id": str, "build_type": BuildTypeEnum, "name": str, "source": str, diff --git a/component_registry_bindings/bindings/python_client/models/component_provides_item.py b/component_registry_bindings/bindings/python_client/models/token_auth_test_create_response_200.py similarity index 50% rename from component_registry_bindings/bindings/python_client/models/component_provides_item.py rename to component_registry_bindings/bindings/python_client/models/token_auth_test_create_response_200.py index 81dec68..538a505 100644 --- a/component_registry_bindings/bindings/python_client/models/component_provides_item.py +++ b/component_registry_bindings/bindings/python_client/models/token_auth_test_create_response_200.py @@ -1,45 +1,55 @@ -from typing import Any, Dict, List, Type, TypeVar +from typing import Any, Dict, List, Type, TypeVar, Union import attr -from ..types import ComponentRegistryModel +from ..types import UNSET, ComponentRegistryModel, Unset -T = TypeVar("T", bound="ComponentProvidesItem") +T = TypeVar("T", bound="TokenAuthTestCreateResponse200") @attr.s(auto_attribs=True) -class ComponentProvidesItem(ComponentRegistryModel): +class TokenAuthTestCreateResponse200(ComponentRegistryModel): """ """ - additional_properties: Dict[str, str] = attr.ib(init=False, factory=dict) + user: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: + user = self.user field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) + if user is not UNSET: + field_dict["user"] = user return field_dict @classmethod def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: d = src_dict.copy() if isinstance(src_dict, dict) else {} - component_provides_item = cls() + user = d.pop("user", UNSET) - component_provides_item.additional_properties = d - return component_provides_item + token_auth_test_create_response_200 = cls( + user=user, + ) + + token_auth_test_create_response_200.additional_properties = d + return token_auth_test_create_response_200 @staticmethod def get_fields(): - return {} + return { + "user": str, + } @property def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) - def __getitem__(self, key: str) -> str: + def __getitem__(self, key: str) -> Any: return self.additional_properties[key] - def __setitem__(self, key: str, value: str) -> None: + def __setitem__(self, key: str, value: Any) -> None: self.additional_properties[key] = value def __delitem__(self, key: str) -> None: diff --git a/component_registry_bindings/bindings/python_client/models/token_auth_test_retrieve_response_200.py b/component_registry_bindings/bindings/python_client/models/token_auth_test_retrieve_response_200.py new file mode 100644 index 0000000..e2ef658 --- /dev/null +++ b/component_registry_bindings/bindings/python_client/models/token_auth_test_retrieve_response_200.py @@ -0,0 +1,59 @@ +from typing import Any, Dict, List, Type, TypeVar, Union + +import attr + +from ..types import UNSET, ComponentRegistryModel, Unset + +T = TypeVar("T", bound="TokenAuthTestRetrieveResponse200") + + +@attr.s(auto_attribs=True) +class TokenAuthTestRetrieveResponse200(ComponentRegistryModel): + """ """ + + user: Union[Unset, str] = UNSET + additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) + + def to_dict(self) -> Dict[str, Any]: + user = self.user + + field_dict: Dict[str, Any] = {} + field_dict.update(self.additional_properties) + if user is not UNSET: + field_dict["user"] = user + + return field_dict + + @classmethod + def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: + d = src_dict.copy() if isinstance(src_dict, dict) else {} + user = d.pop("user", UNSET) + + token_auth_test_retrieve_response_200 = cls( + user=user, + ) + + token_auth_test_retrieve_response_200.additional_properties = d + return token_auth_test_retrieve_response_200 + + @staticmethod + def get_fields(): + return { + "user": str, + } + + @property + def additional_keys(self) -> List[str]: + return list(self.additional_properties.keys()) + + def __getitem__(self, key: str) -> Any: + return self.additional_properties[key] + + def __setitem__(self, key: str, value: Any) -> None: + self.additional_properties[key] = value + + def __delitem__(self, key: str) -> None: + del self.additional_properties[key] + + def __contains__(self, key: str) -> bool: + return key in self.additional_properties diff --git a/component_registry_bindings/bindings/python_client/models/v1_builds_list_build_type.py b/component_registry_bindings/bindings/python_client/models/v1_builds_list_build_type.py index 2b3de36..641178a 100644 --- a/component_registry_bindings/bindings/python_client/models/v1_builds_list_build_type.py +++ b/component_registry_bindings/bindings/python_client/models/v1_builds_list_build_type.py @@ -2,7 +2,9 @@ class V1BuildsListBuildType(str, Enum): + APP_INTERFACE = "APP_INTERFACE" BREW = "BREW" + CENTOS = "CENTOS" KOJI = "KOJI" # This is a temporary tweak to accept empty Enum NONE = "" diff --git a/component_registry_bindings/constants.py b/component_registry_bindings/constants.py index 338c391..f42eaf8 100644 --- a/component_registry_bindings/constants.py +++ b/component_registry_bindings/constants.py @@ -1,7 +1,7 @@ from typing import Dict, List COMPONENT_REGISTRY_API_VERSION: str = "v1" -COMPONENT_REGISTRY_BINDINGS_USERAGENT: str = "component-registry-bindings-1.3.3" +COMPONENT_REGISTRY_BINDINGS_USERAGENT: str = "component-registry-bindings-1.3.4" COMPONENT_REGISTRY_BINDINGS_API_PATH: str = ( f".bindings.python_client.api.{COMPONENT_REGISTRY_API_VERSION}" ) diff --git a/component_registry_bindings/openapi_schema.yml b/component_registry_bindings/openapi_schema.yml index 3ed5d4d..20852c8 100644 --- a/component_registry_bindings/openapi_schema.yml +++ b/component_registry_bindings/openapi_schema.yml @@ -1,9 +1,48 @@ openapi: 3.0.3 info: title: Component Registry API - version: 1.3.3 + version: 1.3.4 description: REST API auto-generated docs for Component Registry paths: + /api/authentication_status: + get: + operationId: authentication_status_retrieve + description: View to determine whether you are currently authenticated and, + if so, as whom. + tags: + - authentication_status + responses: + '200': + content: + application/json: + schema: + type: object + properties: + oidc_enabled: + type: string + user: + type: string + auth: + type: string + description: '' + /api/controlled_access_test: + get: + operationId: controlled_access_test_retrieve + description: |- + View to determine whether you are authenticated with an account that has a specific + role. + tags: + - controlled_access_test + responses: + '200': + content: + application/json: + schema: + type: object + properties: + user: + type: string + description: '' /api/healthy: get: operationId: healthy_retrieve @@ -14,17 +53,61 @@ paths: responses: '200': description: No response body + /api/token_auth_test: + get: + operationId: token_auth_test_retrieve + description: View to test authentication with DRF Tokens. + tags: + - token_auth_test + security: + - tokenAuth: [] + - {} + responses: + '200': + content: + application/json: + schema: + type: object + properties: + user: + type: string + description: '' + post: + operationId: token_auth_test_create + description: View to test authentication with DRF Tokens. + tags: + - token_auth_test + security: + - tokenAuth: [] + responses: + '200': + content: + application/json: + schema: + type: object + properties: + user: + type: string + description: '' + '401': + description: No response body /api/v1/builds: get: operationId: v1_builds_list description: View for api/v1/builds parameters: + - in: query + name: build_id + schema: + type: string - in: query name: build_type schema: type: string enum: + - APP_INTERFACE - BREW + - CENTOS - KOJI - in: query name: exclude_fields @@ -77,19 +160,11 @@ paths: schema: $ref: '#/components/schemas/PaginatedSoftwareBuildList' description: '' - /api/v1/builds/{build_id}: + /api/v1/builds/{uuid}: get: operationId: v1_builds_retrieve description: View for api/v1/builds parameters: - - in: path - name: build_id - schema: - type: integer - maximum: 2147483647 - minimum: -2147483648 - description: A unique value identifying this software build. - required: true - in: query name: exclude_fields schema: @@ -106,6 +181,13 @@ paths: type: string description: 'Include only specified fields in the response. Multiple values may be separated by commas. Example: `include_fields=software_build.build_id,name`' + - in: path + name: uuid + schema: + type: string + format: uuid + description: A UUID string identifying this software build. + required: true tags: - v1 responses: @@ -241,6 +323,11 @@ paths: type: string description: 'Exclude only specified fields in the response. Multiple values may be separated by commas. Example: `exclude_fields=software_build.build_id,name`' + - in: query + name: gomod_components + schema: + type: boolean + description: Show only gomod components, hide go-packages - in: query name: include_fields schema: @@ -249,6 +336,16 @@ paths: type: string description: 'Include only specified fields in the response. Multiple values may be separated by commas. Example: `include_fields=software_build.build_id,name`' + - in: query + name: latest_components + schema: + type: boolean + description: Show only latest components + - in: query + name: latest_components_by_streams + schema: + type: boolean + description: Show only latest components across product streams - name: limit required: false in: query @@ -265,6 +362,11 @@ paths: schema: type: boolean description: Show only unscanned components (where license concluded is empty) + - in: query + name: missing_scan_url + schema: + type: boolean + description: Show only unscanned components (where OpenLCS scan URL is empty) - in: query name: name schema: @@ -346,6 +448,16 @@ paths: name: release schema: type: string + - in: query + name: released_components + schema: + type: boolean + description: Show only released components + - in: query + name: root_components + schema: + type: boolean + description: Show only root components (source RPMs, index container images) - name: search required: false in: query @@ -1180,6 +1292,8 @@ components: enum: - BREW - KOJI + - CENTOS + - APP_INTERFACE type: string Channel: type: object @@ -1396,25 +1510,13 @@ components: type: string readOnly: true sources: - type: array - items: - type: object - additionalProperties: - type: string + type: string readOnly: true provides: - type: array - items: - type: object - additionalProperties: - type: string + type: string readOnly: true upstreams: - type: array - items: - type: object - additionalProperties: - type: string + type: string readOnly: true manifest: type: string @@ -2004,6 +2106,10 @@ components: Show detailed information for SoftwareBuild(s). Add or remove fields using ?include_fields=&exclude_fields= properties: + uuid: + type: string + format: uuid + readOnly: true link: type: string readOnly: true @@ -2011,7 +2117,7 @@ components: type: string readOnly: true build_id: - type: integer + type: string readOnly: true build_type: allOf: @@ -2053,6 +2159,7 @@ components: - name - source - tags + - uuid - web_url SoftwareBuildSummary: type: object @@ -2064,7 +2171,7 @@ components: type: string readOnly: true build_id: - type: integer + type: string readOnly: true build_type: allOf: @@ -2099,3 +2206,9 @@ components: required: - created_at - name + securitySchemes: + tokenAuth: + type: apiKey + in: header + name: Authorization + description: Token-based authentication with required prefix "Token" diff --git a/setup.py b/setup.py index 1c27483..b67e6eb 100644 --- a/setup.py +++ b/setup.py @@ -5,7 +5,7 @@ setup( name="component-registry-bindings", - version="1.3.3", + version="1.3.4", author="Jakub Frejlach, Red Hat Product Security", author_email="jfrejlac@redhat.com", description="Python bindings for accessing Component Registry API",