Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

Regenerate bindings for 4.1.0 release #50

Merged
merged 2 commits into from
Jul 1, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## Unreleased

## [4.1.0] - 2024-07-01

## [4.0.0] - 2024-06-17
### Added
- add `.file` operation for `trackers` (OSIDB-2029)
Expand Down
2 changes: 1 addition & 1 deletion osidb_bindings.spec
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
%define name osidb_bindings
%define version 4.0.0
%define version 4.1.0
%define release 0%{?dist}

Name: %{name}
Expand Down
2 changes: 1 addition & 1 deletion osidb_bindings/bindings/pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "bindings"
version = "4.0.0"
version = "4.1.0"
description = "A client library for accessing OSIDB API"

authors = []
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from typing import Any, Dict, Optional
from typing import Any, Dict, Optional, Union

import requests

Expand All @@ -9,7 +9,9 @@
)
from ...types import UNSET, Response, Unset

QUERY_PARAMS = {}
QUERY_PARAMS = {
"create_jira_task": bool,
}
REQUEST_BODY_TYPE = Flaw


Expand All @@ -20,6 +22,7 @@ def _get_kwargs(
form_data: Flaw,
multipart_data: Flaw,
json_body: Flaw,
create_jira_task: Union[Unset, None, bool] = UNSET,
) -> Dict[str, Any]:
url = "{}/osidb/api/v1/flaws/{id}".format(
client.base_url,
Expand All @@ -28,6 +31,11 @@ def _get_kwargs(

headers: Dict[str, Any] = client.get_headers()

params: Dict[str, Any] = {
"create_jira_task": create_jira_task,
}
params = {k: v for k, v in params.items() if v is not UNSET and v is not None}

json_json_body: Dict[str, Any] = UNSET
if not isinstance(json_body, Unset):
json_body.to_dict()
Expand All @@ -40,6 +48,7 @@ def _get_kwargs(
"url": url,
"headers": headers,
"json": form_data.to_dict(),
"params": params,
}


Expand Down Expand Up @@ -76,13 +85,15 @@ def sync_detailed(
form_data: Flaw,
multipart_data: Flaw,
json_body: Flaw,
create_jira_task: Union[Unset, None, bool] = UNSET,
) -> Response[OsidbApiV1FlawsUpdateResponse200]:
kwargs = _get_kwargs(
id=id,
client=client,
form_data=form_data,
multipart_data=multipart_data,
json_body=json_body,
create_jira_task=create_jira_task,
)

response = requests.put(
Expand All @@ -103,6 +114,7 @@ def sync(
form_data: Flaw,
multipart_data: Flaw,
json_body: Flaw,
create_jira_task: Union[Unset, None, bool] = UNSET,
) -> Optional[OsidbApiV1FlawsUpdateResponse200]:
""" """

Expand All @@ -112,6 +124,7 @@ def sync(
form_data=form_data,
multipart_data=multipart_data,
json_body=json_body,
create_jira_task=create_jira_task,
).parsed


Expand All @@ -122,13 +135,15 @@ async def async_detailed(
form_data: Flaw,
multipart_data: Flaw,
json_body: Flaw,
create_jira_task: Union[Unset, None, bool] = UNSET,
) -> Response[OsidbApiV1FlawsUpdateResponse200]:
kwargs = _get_kwargs(
id=id,
client=client,
form_data=form_data,
multipart_data=multipart_data,
json_body=json_body,
create_jira_task=create_jira_task,
)

async with client.get_async_session().put(
Expand All @@ -149,6 +164,7 @@ async def async_(
form_data: Flaw,
multipart_data: Flaw,
json_body: Flaw,
create_jira_task: Union[Unset, None, bool] = UNSET,
) -> Optional[OsidbApiV1FlawsUpdateResponse200]:
""" """

Expand All @@ -159,5 +175,6 @@ async def async_(
form_data=form_data,
multipart_data=multipart_data,
json_body=json_body,
create_jira_task=create_jira_task,
)
).parsed
2 changes: 1 addition & 1 deletion osidb_bindings/constants.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
from typing import List

OSIDB_API_VERSION: str = "v1"
OSIDB_BINDINGS_VERSION: str = "4.0.0"
OSIDB_BINDINGS_VERSION: str = "4.1.0"
OSIDB_BINDINGS_USERAGENT: str = f"osidb-bindings-{OSIDB_BINDINGS_VERSION}"
OSIDB_BINDINGS_API_PATH: str = ".bindings.python_client.api.osidb"
OSIDB_BINDINGS_PLACEHOLDER_FIELD: str = (
Expand Down
8 changes: 7 additions & 1 deletion osidb_bindings/openapi_schema.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
openapi: 3.0.3
info:
title: OSIDB API
version: 4.0.0
version: 4.1.1
description: REST API autogenerated docs for the OSIDB and its components
paths:
/auth/token:
Expand Down Expand Up @@ -5628,6 +5628,12 @@ paths:
type: string
description: User generated api key for Jira authentication.
required: true
- in: query
name: create_jira_task
schema:
type: boolean
description: If set to true, it will trigger the creation of a Jira task if
the flaw doesn't already have one associated.
- in: path
name: id
schema:
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

setup(
name="osidb_bindings",
version="4.0.0",
version="4.1.0",
author="Jakub Frejlach, Red Hat Product Security",
author_email="[email protected]",
description="Python bindings for accessing OSIDB API",
Expand Down