From b9c65322011e9347cf89905aaf23551280518995 Mon Sep 17 00:00:00 2001 From: Jakub Frejlach Date: Mon, 20 Nov 2023 10:35:20 +0100 Subject: [PATCH] Regenerate bindings for 1.4.0 release --- .../bindings/python_client/api/v1/__init__.py | 3 +- .../api/v1/v1_components_list.py | 143 ++++++++++++++--- .../api/v1/v1_components_provides_retrieve.py | 119 -------------- ...=> v1_components_update_license_update.py} | 14 +- .../python_client/models/build_type_enum.py | 2 + .../python_client/models/component.py | 4 +- .../python_client/models/product_stream.py | 41 ++++- .../python_client/models/product_version.py | 13 +- .../models/v1_builds_list_build_type.py | 2 + .../openapi_schema.yml | 149 ++++++++++++------ 10 files changed, 278 insertions(+), 212 deletions(-) delete mode 100644 component_registry_bindings/bindings/python_client/api/v1/v1_components_provides_retrieve.py rename component_registry_bindings/bindings/python_client/api/v1/{v1_components_olcs_test_update.py => v1_components_update_license_update.py} (92%) diff --git a/component_registry_bindings/bindings/python_client/api/v1/__init__.py b/component_registry_bindings/bindings/python_client/api/v1/__init__.py index 396e842..b10c0ac 100644 --- a/component_registry_bindings/bindings/python_client/api/v1/__init__.py +++ b/component_registry_bindings/bindings/python_client/api/v1/__init__.py @@ -4,10 +4,9 @@ from .v1_channels_retrieve import * from .v1_components_list import * from .v1_components_manifest_retrieve import * -from .v1_components_olcs_test_update import * -from .v1_components_provides_retrieve import * from .v1_components_retrieve import * from .v1_components_taxonomy_retrieve import * +from .v1_components_update_license_update import * from .v1_product_streams_list import * from .v1_product_streams_manifest_retrieve import * from .v1_product_streams_retrieve import * 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 81d995e..2d0bea3 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 @@ -9,18 +9,20 @@ from ...types import UNSET, Response, Unset QUERY_PARAMS = { + "active_streams": bool, "arch": str, "channels": str, "description": str, + "downstreams": 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_license_concluded": bool, + "missing_license_declared": bool, "missing_scan_url": bool, "name": str, "namespace": V1ComponentsListNamespace, @@ -33,21 +35,28 @@ "product_versions": str, "products": str, "provides": str, + "provides_name": str, "purl": str, + "re_downstreams": str, "re_name": str, "re_provides": str, + "re_provides_name": str, "re_purl": str, "re_sources": str, + "re_sources_name": str, "re_upstreams": str, + "re_upstreams_name": str, "related_url": str, "release": str, "released_components": bool, "root_components": bool, "search": str, "sources": str, + "sources_name": str, "tags": int, "type": V1ComponentsListType, "upstreams": str, + "upstreams_name": str, "version": str, "view": str, } @@ -56,18 +65,20 @@ def _get_kwargs( *, client: Client, + active_streams: Union[Unset, None, bool] = UNSET, arch: Union[Unset, None, str] = UNSET, channels: Union[Unset, None, str] = UNSET, description: Union[Unset, None, str] = UNSET, + downstreams: 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_license_concluded: Union[Unset, None, bool] = UNSET, + missing_license_declared: 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, @@ -80,21 +91,28 @@ def _get_kwargs( product_versions: Union[Unset, None, str] = UNSET, products: Union[Unset, None, str] = UNSET, provides: Union[Unset, None, str] = UNSET, + provides_name: Union[Unset, None, str] = UNSET, purl: Union[Unset, None, str] = UNSET, + re_downstreams: Union[Unset, None, str] = UNSET, re_name: Union[Unset, None, str] = UNSET, re_provides: Union[Unset, None, str] = UNSET, + re_provides_name: Union[Unset, None, str] = UNSET, re_purl: Union[Unset, None, str] = UNSET, re_sources: Union[Unset, None, str] = UNSET, + re_sources_name: Union[Unset, None, str] = UNSET, re_upstreams: Union[Unset, None, str] = UNSET, + re_upstreams_name: 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, + sources_name: Union[Unset, None, str] = UNSET, tags: Union[Unset, None, int] = UNSET, type: Union[Unset, None, V1ComponentsListType] = UNSET, upstreams: Union[Unset, None, str] = UNSET, + upstreams_name: Union[Unset, None, str] = UNSET, version: Union[Unset, None, str] = UNSET, view: Union[Unset, None, str] = UNSET, ) -> Dict[str, Any]: @@ -131,18 +149,20 @@ def _get_kwargs( json_type = V1ComponentsListType(type).value if type else None params: Dict[str, Any] = { + "active_streams": active_streams, "arch": arch, "channels": channels, "description": description, + "downstreams": downstreams, "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_license_concluded": missing_license_concluded, + "missing_license_declared": missing_license_declared, "missing_scan_url": missing_scan_url, "name": name, "namespace": json_namespace, @@ -155,21 +175,28 @@ def _get_kwargs( "product_versions": product_versions, "products": products, "provides": provides, + "provides_name": provides_name, "purl": purl, + "re_downstreams": re_downstreams, "re_name": re_name, "re_provides": re_provides, + "re_provides_name": re_provides_name, "re_purl": re_purl, "re_sources": re_sources, + "re_sources_name": re_sources_name, "re_upstreams": re_upstreams, + "re_upstreams_name": re_upstreams_name, "related_url": related_url, "release": release, "released_components": released_components, "root_components": root_components, "search": search, "sources": sources, + "sources_name": sources_name, "tags": tags, "type": json_type, "upstreams": upstreams, + "upstreams_name": upstreams_name, "version": version, "view": view, } @@ -207,18 +234,20 @@ def _build_response(*, response: requests.Response) -> Response[PaginatedCompone def sync_detailed( *, client: Client, + active_streams: Union[Unset, None, bool] = UNSET, arch: Union[Unset, None, str] = UNSET, channels: Union[Unset, None, str] = UNSET, description: Union[Unset, None, str] = UNSET, + downstreams: 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_license_concluded: Union[Unset, None, bool] = UNSET, + missing_license_declared: 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, @@ -231,38 +260,47 @@ def sync_detailed( product_versions: Union[Unset, None, str] = UNSET, products: Union[Unset, None, str] = UNSET, provides: Union[Unset, None, str] = UNSET, + provides_name: Union[Unset, None, str] = UNSET, purl: Union[Unset, None, str] = UNSET, + re_downstreams: Union[Unset, None, str] = UNSET, re_name: Union[Unset, None, str] = UNSET, re_provides: Union[Unset, None, str] = UNSET, + re_provides_name: Union[Unset, None, str] = UNSET, re_purl: Union[Unset, None, str] = UNSET, re_sources: Union[Unset, None, str] = UNSET, + re_sources_name: Union[Unset, None, str] = UNSET, re_upstreams: Union[Unset, None, str] = UNSET, + re_upstreams_name: 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, + sources_name: Union[Unset, None, str] = UNSET, tags: Union[Unset, None, int] = UNSET, type: Union[Unset, None, V1ComponentsListType] = UNSET, upstreams: Union[Unset, None, str] = UNSET, + upstreams_name: Union[Unset, None, str] = UNSET, version: Union[Unset, None, str] = UNSET, view: Union[Unset, None, str] = UNSET, ) -> Response[PaginatedComponentList]: kwargs = _get_kwargs( client=client, + active_streams=active_streams, arch=arch, channels=channels, description=description, + downstreams=downstreams, 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_license_concluded=missing_license_concluded, + missing_license_declared=missing_license_declared, missing_scan_url=missing_scan_url, name=name, namespace=namespace, @@ -275,21 +313,28 @@ def sync_detailed( product_versions=product_versions, products=products, provides=provides, + provides_name=provides_name, purl=purl, + re_downstreams=re_downstreams, re_name=re_name, re_provides=re_provides, + re_provides_name=re_provides_name, re_purl=re_purl, re_sources=re_sources, + re_sources_name=re_sources_name, re_upstreams=re_upstreams, + re_upstreams_name=re_upstreams_name, related_url=related_url, release=release, released_components=released_components, root_components=root_components, search=search, sources=sources, + sources_name=sources_name, tags=tags, type=type, upstreams=upstreams, + upstreams_name=upstreams_name, version=version, view=view, ) @@ -308,18 +353,20 @@ def sync_detailed( def sync( *, client: Client, + active_streams: Union[Unset, None, bool] = UNSET, arch: Union[Unset, None, str] = UNSET, channels: Union[Unset, None, str] = UNSET, description: Union[Unset, None, str] = UNSET, + downstreams: 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_license_concluded: Union[Unset, None, bool] = UNSET, + missing_license_declared: 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, @@ -332,21 +379,28 @@ def sync( product_versions: Union[Unset, None, str] = UNSET, products: Union[Unset, None, str] = UNSET, provides: Union[Unset, None, str] = UNSET, + provides_name: Union[Unset, None, str] = UNSET, purl: Union[Unset, None, str] = UNSET, + re_downstreams: Union[Unset, None, str] = UNSET, re_name: Union[Unset, None, str] = UNSET, re_provides: Union[Unset, None, str] = UNSET, + re_provides_name: Union[Unset, None, str] = UNSET, re_purl: Union[Unset, None, str] = UNSET, re_sources: Union[Unset, None, str] = UNSET, + re_sources_name: Union[Unset, None, str] = UNSET, re_upstreams: Union[Unset, None, str] = UNSET, + re_upstreams_name: 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, + sources_name: Union[Unset, None, str] = UNSET, tags: Union[Unset, None, int] = UNSET, type: Union[Unset, None, V1ComponentsListType] = UNSET, upstreams: Union[Unset, None, str] = UNSET, + upstreams_name: Union[Unset, None, str] = UNSET, version: Union[Unset, None, str] = UNSET, view: Union[Unset, None, str] = UNSET, ) -> Optional[PaginatedComponentList]: @@ -354,18 +408,20 @@ def sync( return sync_detailed( client=client, + active_streams=active_streams, arch=arch, channels=channels, description=description, + downstreams=downstreams, 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_license_concluded=missing_license_concluded, + missing_license_declared=missing_license_declared, missing_scan_url=missing_scan_url, name=name, namespace=namespace, @@ -378,21 +434,28 @@ def sync( product_versions=product_versions, products=products, provides=provides, + provides_name=provides_name, purl=purl, + re_downstreams=re_downstreams, re_name=re_name, re_provides=re_provides, + re_provides_name=re_provides_name, re_purl=re_purl, re_sources=re_sources, + re_sources_name=re_sources_name, re_upstreams=re_upstreams, + re_upstreams_name=re_upstreams_name, related_url=related_url, release=release, released_components=released_components, root_components=root_components, search=search, sources=sources, + sources_name=sources_name, tags=tags, type=type, upstreams=upstreams, + upstreams_name=upstreams_name, version=version, view=view, ).parsed @@ -401,18 +464,20 @@ def sync( async def async_detailed( *, client: Client, + active_streams: Union[Unset, None, bool] = UNSET, arch: Union[Unset, None, str] = UNSET, channels: Union[Unset, None, str] = UNSET, description: Union[Unset, None, str] = UNSET, + downstreams: 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_license_concluded: Union[Unset, None, bool] = UNSET, + missing_license_declared: 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, @@ -425,38 +490,47 @@ async def async_detailed( product_versions: Union[Unset, None, str] = UNSET, products: Union[Unset, None, str] = UNSET, provides: Union[Unset, None, str] = UNSET, + provides_name: Union[Unset, None, str] = UNSET, purl: Union[Unset, None, str] = UNSET, + re_downstreams: Union[Unset, None, str] = UNSET, re_name: Union[Unset, None, str] = UNSET, re_provides: Union[Unset, None, str] = UNSET, + re_provides_name: Union[Unset, None, str] = UNSET, re_purl: Union[Unset, None, str] = UNSET, re_sources: Union[Unset, None, str] = UNSET, + re_sources_name: Union[Unset, None, str] = UNSET, re_upstreams: Union[Unset, None, str] = UNSET, + re_upstreams_name: 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, + sources_name: Union[Unset, None, str] = UNSET, tags: Union[Unset, None, int] = UNSET, type: Union[Unset, None, V1ComponentsListType] = UNSET, upstreams: Union[Unset, None, str] = UNSET, + upstreams_name: Union[Unset, None, str] = UNSET, version: Union[Unset, None, str] = UNSET, view: Union[Unset, None, str] = UNSET, ) -> Response[PaginatedComponentList]: kwargs = _get_kwargs( client=client, + active_streams=active_streams, arch=arch, channels=channels, description=description, + downstreams=downstreams, 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_license_concluded=missing_license_concluded, + missing_license_declared=missing_license_declared, missing_scan_url=missing_scan_url, name=name, namespace=namespace, @@ -469,21 +543,28 @@ async def async_detailed( product_versions=product_versions, products=products, provides=provides, + provides_name=provides_name, purl=purl, + re_downstreams=re_downstreams, re_name=re_name, re_provides=re_provides, + re_provides_name=re_provides_name, re_purl=re_purl, re_sources=re_sources, + re_sources_name=re_sources_name, re_upstreams=re_upstreams, + re_upstreams_name=re_upstreams_name, related_url=related_url, release=release, released_components=released_components, root_components=root_components, search=search, sources=sources, + sources_name=sources_name, tags=tags, type=type, upstreams=upstreams, + upstreams_name=upstreams_name, version=version, view=view, ) @@ -502,18 +583,20 @@ async def async_detailed( async def async_( *, client: Client, + active_streams: Union[Unset, None, bool] = UNSET, arch: Union[Unset, None, str] = UNSET, channels: Union[Unset, None, str] = UNSET, description: Union[Unset, None, str] = UNSET, + downstreams: 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_license_concluded: Union[Unset, None, bool] = UNSET, + missing_license_declared: 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, @@ -526,21 +609,28 @@ async def async_( product_versions: Union[Unset, None, str] = UNSET, products: Union[Unset, None, str] = UNSET, provides: Union[Unset, None, str] = UNSET, + provides_name: Union[Unset, None, str] = UNSET, purl: Union[Unset, None, str] = UNSET, + re_downstreams: Union[Unset, None, str] = UNSET, re_name: Union[Unset, None, str] = UNSET, re_provides: Union[Unset, None, str] = UNSET, + re_provides_name: Union[Unset, None, str] = UNSET, re_purl: Union[Unset, None, str] = UNSET, re_sources: Union[Unset, None, str] = UNSET, + re_sources_name: Union[Unset, None, str] = UNSET, re_upstreams: Union[Unset, None, str] = UNSET, + re_upstreams_name: 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, + sources_name: Union[Unset, None, str] = UNSET, tags: Union[Unset, None, int] = UNSET, type: Union[Unset, None, V1ComponentsListType] = UNSET, upstreams: Union[Unset, None, str] = UNSET, + upstreams_name: Union[Unset, None, str] = UNSET, version: Union[Unset, None, str] = UNSET, view: Union[Unset, None, str] = UNSET, ) -> Optional[PaginatedComponentList]: @@ -549,18 +639,20 @@ async def async_( return ( await async_detailed( client=client, + active_streams=active_streams, arch=arch, channels=channels, description=description, + downstreams=downstreams, 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_license_concluded=missing_license_concluded, + missing_license_declared=missing_license_declared, missing_scan_url=missing_scan_url, name=name, namespace=namespace, @@ -573,21 +665,28 @@ async def async_( product_versions=product_versions, products=products, provides=provides, + provides_name=provides_name, purl=purl, + re_downstreams=re_downstreams, re_name=re_name, re_provides=re_provides, + re_provides_name=re_provides_name, re_purl=re_purl, re_sources=re_sources, + re_sources_name=re_sources_name, re_upstreams=re_upstreams, + re_upstreams_name=re_upstreams_name, related_url=related_url, release=release, released_components=released_components, root_components=root_components, search=search, sources=sources, + sources_name=sources_name, tags=tags, type=type, upstreams=upstreams, + upstreams_name=upstreams_name, version=version, view=view, ) diff --git a/component_registry_bindings/bindings/python_client/api/v1/v1_components_provides_retrieve.py b/component_registry_bindings/bindings/python_client/api/v1/v1_components_provides_retrieve.py deleted file mode 100644 index b29c771..0000000 --- a/component_registry_bindings/bindings/python_client/api/v1/v1_components_provides_retrieve.py +++ /dev/null @@ -1,119 +0,0 @@ -from typing import Any, Dict, Optional - -import requests - -from ...client import Client -from ...models.component import Component -from ...types import UNSET, Response, Unset - -QUERY_PARAMS = {} - - -def _get_kwargs( - uuid: str, - *, - client: Client, -) -> Dict[str, Any]: - url = "{}/api/v1/components/{uuid}/provides".format( - client.base_url, - uuid=uuid, - ) - - headers: Dict[str, Any] = client.get_headers() - - return { - "url": url, - "headers": headers, - } - - -def _parse_response(*, response: requests.Response) -> Optional[Component]: - if response.status_code == 200: - _response_200 = response.json() - response_200: Component - if isinstance(_response_200, Unset): - response_200 = UNSET - else: - response_200 = Component.from_dict(_response_200) - - return response_200 - return None - - -def _build_response(*, response: requests.Response) -> Response[Component]: - return Response( - status_code=response.status_code, - content=response.content, - headers=response.headers, - parsed=_parse_response(response=response), - ) - - -def sync_detailed( - uuid: str, - *, - client: Client, -) -> Response[Component]: - kwargs = _get_kwargs( - uuid=uuid, - 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( - uuid: str, - *, - client: Client, -) -> Optional[Component]: - """View for api/v1/components""" - - return sync_detailed( - uuid=uuid, - client=client, - ).parsed - - -async def async_detailed( - uuid: str, - *, - client: Client, -) -> Response[Component]: - kwargs = _get_kwargs( - uuid=uuid, - client=client, - ) - - async with client.get_async_session().get( - verify_ssl=client.verify_ssl, raise_for_status=True, **kwargs - ) as response: - content = await response.read() - resp = requests.Response() - resp.status_code = response.status - resp._content = content - - return _build_response(response=resp) - - -async def async_( - uuid: str, - *, - client: Client, -) -> Optional[Component]: - """View for api/v1/components""" - - return ( - await async_detailed( - uuid=uuid, - client=client, - ) - ).parsed diff --git a/component_registry_bindings/bindings/python_client/api/v1/v1_components_olcs_test_update.py b/component_registry_bindings/bindings/python_client/api/v1/v1_components_update_license_update.py similarity index 92% rename from component_registry_bindings/bindings/python_client/api/v1/v1_components_olcs_test_update.py rename to component_registry_bindings/bindings/python_client/api/v1/v1_components_update_license_update.py index f4b3242..cfb0aa7 100644 --- a/component_registry_bindings/bindings/python_client/api/v1/v1_components_olcs_test_update.py +++ b/component_registry_bindings/bindings/python_client/api/v1/v1_components_update_license_update.py @@ -2,7 +2,7 @@ import requests -from ...client import Client +from ...client import AuthenticatedClient from ...models.component import Component from ...types import UNSET, Response, Unset @@ -13,12 +13,12 @@ def _get_kwargs( uuid: str, *, - client: Client, + client: AuthenticatedClient, form_data: Component, multipart_data: Component, json_body: Component, ) -> Dict[str, Any]: - url = "{}/api/v1/components/{uuid}/olcs_test".format( + url = "{}/api/v1/components/{uuid}/update_license".format( client.base_url, uuid=uuid, ) @@ -65,7 +65,7 @@ def _build_response(*, response: requests.Response) -> Response[Component]: def sync_detailed( uuid: str, *, - client: Client, + client: AuthenticatedClient, form_data: Component, multipart_data: Component, json_body: Component, @@ -92,7 +92,7 @@ def sync_detailed( def sync( uuid: str, *, - client: Client, + client: AuthenticatedClient, form_data: Component, multipart_data: Component, json_body: Component, @@ -111,7 +111,7 @@ def sync( async def async_detailed( uuid: str, *, - client: Client, + client: AuthenticatedClient, form_data: Component, multipart_data: Component, json_body: Component, @@ -138,7 +138,7 @@ async def async_detailed( async def async_( uuid: str, *, - client: Client, + client: AuthenticatedClient, form_data: Component, multipart_data: Component, json_body: Component, 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 3e29729..6b60148 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 @@ -6,6 +6,8 @@ class BuildTypeEnum(str, Enum): KOJI = "KOJI" CENTOS = "CENTOS" APP_INTERFACE = "APP_INTERFACE" + PNC = "PNC" + PYXIS = "PYXIS" # 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 8cb557d..3f6f9c5 100644 --- a/component_registry_bindings/bindings/python_client/models/component.py +++ b/component_registry_bindings/bindings/python_client/models/component.py @@ -38,7 +38,7 @@ class Component(ComponentRegistryModel): arch: str nvr: str nevra: str - epoch: str + epoch: int copyright_text: str license_concluded: str license_concluded_list: List[str] @@ -782,7 +782,7 @@ def get_fields(): "arch": str, "nvr": str, "nevra": str, - "epoch": str, + "epoch": int, "copyright_text": str, "license_concluded": str, "license_concluded_list": List[str], diff --git a/component_registry_bindings/bindings/python_client/models/product_stream.py b/component_registry_bindings/bindings/python_client/models/product_stream.py index 39920d6..f58a91b 100644 --- a/component_registry_bindings/bindings/python_client/models/product_stream.py +++ b/component_registry_bindings/bindings/python_client/models/product_stream.py @@ -35,12 +35,14 @@ class ProductStream(ComponentRegistryModel): upstreams: str tags: List[Tag] channels: List[ProductStreamChannelsItem] - cpe: str active: bool brew_tags: ProductStreamBrewTags + cpes: List[str] + cpes_matching_patterns: List[str] yum_repositories: List[str] composes: ProductStreamComposes et_product_versions: List[str] + exclude_components: List[str] manifest: str relations: List[ProductStreamRelationsItem] products: List[ProductStreamProductsItem] @@ -78,12 +80,19 @@ def to_dict(self) -> Dict[str, Any]: channels.append(channels_item) - cpe = self.cpe active = self.active brew_tags: Dict[str, Any] = UNSET if not isinstance(self.brew_tags, Unset): brew_tags = self.brew_tags.to_dict() + cpes: List[str] = UNSET + if not isinstance(self.cpes, Unset): + cpes = self.cpes + + cpes_matching_patterns: List[str] = UNSET + if not isinstance(self.cpes_matching_patterns, Unset): + cpes_matching_patterns = self.cpes_matching_patterns + yum_repositories: List[str] = UNSET if not isinstance(self.yum_repositories, Unset): yum_repositories = self.yum_repositories @@ -96,6 +105,10 @@ def to_dict(self) -> Dict[str, Any]: if not isinstance(self.et_product_versions, Unset): et_product_versions = self.et_product_versions + exclude_components: List[str] = UNSET + if not isinstance(self.exclude_components, Unset): + exclude_components = self.exclude_components + manifest = self.manifest relations: List[Dict[str, Any]] = UNSET if not isinstance(self.relations, Unset): @@ -161,18 +174,22 @@ def to_dict(self) -> Dict[str, Any]: field_dict["tags"] = tags if not isinstance(channels, Unset): field_dict["channels"] = channels - if not isinstance(cpe, Unset): - field_dict["cpe"] = cpe if not isinstance(active, Unset): field_dict["active"] = active if not isinstance(brew_tags, Unset): field_dict["brew_tags"] = brew_tags + if not isinstance(cpes, Unset): + field_dict["cpes"] = cpes + if not isinstance(cpes_matching_patterns, Unset): + field_dict["cpes_matching_patterns"] = cpes_matching_patterns if not isinstance(yum_repositories, Unset): field_dict["yum_repositories"] = yum_repositories if not isinstance(composes, Unset): field_dict["composes"] = composes if not isinstance(et_product_versions, Unset): field_dict["et_product_versions"] = et_product_versions + if not isinstance(exclude_components, Unset): + field_dict["exclude_components"] = exclude_components if not isinstance(manifest, Unset): field_dict["manifest"] = manifest if not isinstance(relations, Unset): @@ -237,8 +254,6 @@ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: channels.append(channels_item) - cpe = d.pop("cpe", UNSET) - active = d.pop("active", UNSET) _brew_tags = d.pop("brew_tags", UNSET) @@ -248,6 +263,10 @@ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: else: brew_tags = ProductStreamBrewTags.from_dict(_brew_tags) + cpes = cast(List[str], d.pop("cpes", UNSET)) + + cpes_matching_patterns = cast(List[str], d.pop("cpes_matching_patterns", UNSET)) + yum_repositories = cast(List[str], d.pop("yum_repositories", UNSET)) _composes = d.pop("composes", UNSET) @@ -259,6 +278,8 @@ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: et_product_versions = cast(List[str], d.pop("et_product_versions", UNSET)) + exclude_components = cast(List[str], d.pop("exclude_components", UNSET)) + manifest = d.pop("manifest", UNSET) relations = [] @@ -339,12 +360,14 @@ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: upstreams=upstreams, tags=tags, channels=channels, - cpe=cpe, active=active, brew_tags=brew_tags, + cpes=cpes, + cpes_matching_patterns=cpes_matching_patterns, yum_repositories=yum_repositories, composes=composes, et_product_versions=et_product_versions, + exclude_components=exclude_components, manifest=manifest, relations=relations, products=products, @@ -369,12 +392,14 @@ def get_fields(): "upstreams": str, "tags": List[Tag], "channels": List[ProductStreamChannelsItem], - "cpe": str, "active": bool, "brew_tags": ProductStreamBrewTags, + "cpes": List[str], + "cpes_matching_patterns": List[str], "yum_repositories": List[str], "composes": ProductStreamComposes, "et_product_versions": List[str], + "exclude_components": List[str], "manifest": str, "relations": List[ProductStreamRelationsItem], "products": List[ProductStreamProductsItem], diff --git a/component_registry_bindings/bindings/python_client/models/product_version.py b/component_registry_bindings/bindings/python_client/models/product_version.py index fdbf03a..d9d186f 100644 --- a/component_registry_bindings/bindings/python_client/models/product_version.py +++ b/component_registry_bindings/bindings/python_client/models/product_version.py @@ -1,4 +1,4 @@ -from typing import Any, Dict, List, Type, TypeVar +from typing import Any, Dict, List, Type, TypeVar, cast import attr @@ -32,6 +32,7 @@ class ProductVersion(ComponentRegistryModel): upstreams: str tags: List[Tag] channels: List[ProductVersionChannelsItem] + cpe_patterns: List[str] products: List[ProductVersionProductsItem] product_streams: List[ProductVersionProductStreamsItem] product_variants: List[ProductVersionProductVariantsItem] @@ -67,6 +68,10 @@ def to_dict(self) -> Dict[str, Any]: channels.append(channels_item) + cpe_patterns: List[str] = UNSET + if not isinstance(self.cpe_patterns, Unset): + cpe_patterns = self.cpe_patterns + products: List[Dict[str, Any]] = UNSET if not isinstance(self.products, Unset): products = [] @@ -121,6 +126,8 @@ def to_dict(self) -> Dict[str, Any]: field_dict["tags"] = tags if not isinstance(channels, Unset): field_dict["channels"] = channels + if not isinstance(cpe_patterns, Unset): + field_dict["cpe_patterns"] = cpe_patterns if not isinstance(products, Unset): field_dict["products"] = products if not isinstance(product_streams, Unset): @@ -181,6 +188,8 @@ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: channels.append(channels_item) + cpe_patterns = cast(List[str], d.pop("cpe_patterns", UNSET)) + products = [] _products = d.pop("products", UNSET) if _products is UNSET: @@ -242,6 +251,7 @@ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: upstreams=upstreams, tags=tags, channels=channels, + cpe_patterns=cpe_patterns, products=products, product_streams=product_streams, product_variants=product_variants, @@ -264,6 +274,7 @@ def get_fields(): "upstreams": str, "tags": List[Tag], "channels": List[ProductVersionChannelsItem], + "cpe_patterns": List[str], "products": List[ProductVersionProductsItem], "product_streams": List[ProductVersionProductStreamsItem], "product_variants": List[ProductVersionProductVariantsItem], 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 641178a..7b35a15 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 @@ -6,6 +6,8 @@ class V1BuildsListBuildType(str, Enum): BREW = "BREW" CENTOS = "CENTOS" KOJI = "KOJI" + PNC = "PNC" + PYXIS = "PYXIS" # This is a temporary tweak to accept empty Enum NONE = "" diff --git a/component_registry_bindings/openapi_schema.yml b/component_registry_bindings/openapi_schema.yml index 20852c8..8a5bd23 100644 --- a/component_registry_bindings/openapi_schema.yml +++ b/component_registry_bindings/openapi_schema.yml @@ -1,7 +1,7 @@ openapi: 3.0.3 info: title: Component Registry API - version: 1.3.4 + version: 1.4.1 description: REST API auto-generated docs for Component Registry paths: /api/authentication_status: @@ -109,6 +109,8 @@ paths: - BREW - CENTOS - KOJI + - PNC + - PYXIS - in: query name: exclude_fields schema: @@ -298,6 +300,11 @@ paths: operationId: v1_components_list description: View for api/v1/components parameters: + - in: query + name: active_streams + schema: + type: boolean + description: Show components from active streams - in: query name: arch schema: @@ -310,6 +317,10 @@ paths: name: description schema: type: string + - in: query + name: downstreams + schema: + type: string - in: query name: el_match schema: @@ -336,11 +347,6 @@ 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: @@ -358,10 +364,15 @@ paths: type: boolean description: Show only unscanned components (where copyright text is empty) - in: query - name: missing_license + name: missing_license_concluded schema: type: boolean description: Show only unscanned components (where license concluded is empty) + - in: query + name: missing_license_declared + schema: + type: boolean + description: Show only unscanned components (where license declared is empty) - in: query name: missing_scan_url schema: @@ -396,6 +407,7 @@ paths: name: ofuri schema: type: string + description: Show only latest root components of product - in: query name: product_streams schema: @@ -416,10 +428,18 @@ paths: name: provides schema: type: string + - in: query + name: provides_name + schema: + type: string - in: query name: purl schema: type: string + - in: query + name: re_downstreams + schema: + type: string - in: query name: re_name schema: @@ -428,6 +448,10 @@ paths: name: re_provides schema: type: string + - in: query + name: re_provides_name + schema: + type: string - in: query name: re_purl schema: @@ -436,10 +460,18 @@ paths: name: re_sources schema: type: string + - in: query + name: re_sources_name + schema: + type: string - in: query name: re_upstreams schema: type: string + - in: query + name: re_upstreams_name + schema: + type: string - in: query name: related_url schema: @@ -468,6 +500,10 @@ paths: name: sources schema: type: string + - in: query + name: sources_name + schema: + type: string - in: query name: tags schema: @@ -492,6 +528,10 @@ paths: name: upstreams schema: type: string + - in: query + name: upstreams_name + schema: + type: string - in: query name: version schema: @@ -567,42 +607,9 @@ paths: schema: $ref: '#/components/schemas/Component' description: '' - /api/v1/components/{uuid}/olcs_test: - put: - operationId: v1_components_olcs_test_update - description: Allow OpenLCS to upload copyright text / license scan results for - a component - parameters: - - in: path - name: uuid - schema: - type: string - format: uuid - description: A UUID string identifying this component. - required: true - tags: - - v1 - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/Component' - application/x-www-form-urlencoded: - schema: - $ref: '#/components/schemas/Component' - multipart/form-data: - schema: - $ref: '#/components/schemas/Component' - responses: - '200': - content: - application/json: - schema: - $ref: '#/components/schemas/Component' - description: '' - /api/v1/components/{uuid}/provides: + /api/v1/components/{uuid}/taxonomy: get: - operationId: v1_components_provides_retrieve + operationId: v1_components_taxonomy_retrieve description: View for api/v1/components parameters: - in: path @@ -621,10 +628,11 @@ paths: schema: $ref: '#/components/schemas/Component' description: '' - /api/v1/components/{uuid}/taxonomy: - get: - operationId: v1_components_taxonomy_retrieve - description: View for api/v1/components + /api/v1/components/{uuid}/update_license: + put: + operationId: v1_components_update_license_update + description: Allow OpenLCS to upload copyright text / license scan results for + a component parameters: - in: path name: uuid @@ -635,6 +643,19 @@ paths: required: true tags: - v1 + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/Component' + application/x-www-form-urlencoded: + schema: + $ref: '#/components/schemas/Component' + multipart/form-data: + schema: + $ref: '#/components/schemas/Component' + security: + - tokenAuth: [] responses: '200': content: @@ -1294,6 +1315,8 @@ components: - KOJI - CENTOS - APP_INTERFACE + - PNC + - PYXIS type: string Channel: type: object @@ -1438,7 +1461,7 @@ components: type: string readOnly: true epoch: - type: string + type: integer readOnly: true copyright_text: type: string @@ -1848,9 +1871,6 @@ components: additionalProperties: type: string readOnly: true - cpe: - type: string - readOnly: true active: type: boolean readOnly: true @@ -1858,6 +1878,18 @@ components: type: object additionalProperties: {} readOnly: true + cpes: + type: array + items: + type: string + maxLength: 1000 + readOnly: true + cpes_matching_patterns: + type: array + items: + type: string + maxLength: 1000 + readOnly: true yum_repositories: type: array items: @@ -1874,6 +1906,12 @@ components: type: string maxLength: 200 readOnly: true + exclude_components: + type: array + items: + type: string + maxLength: 200 + readOnly: true manifest: type: string readOnly: true @@ -1913,9 +1951,11 @@ components: - channels - components - composes - - cpe + - cpes + - cpes_matching_patterns - description - et_product_versions + - exclude_components - link - manifest - name @@ -2064,6 +2104,12 @@ components: additionalProperties: type: string readOnly: true + cpe_patterns: + type: array + items: + type: string + maxLength: 1000 + readOnly: true products: type: array items: @@ -2090,6 +2136,7 @@ components: - builds - channels - components + - cpe_patterns - description - link - name