Skip to content

Commit b73d1a0

Browse files
josteinlgithub-actions[bot]
authored andcommitted
Update OpenAPI spec to version 2025.10.23
1 parent ca4a0e9 commit b73d1a0

13 files changed

+828
-46
lines changed

nadag-innmelding-python-client/nadag_innmelding_python_client/api/default/get_nadag_innmelding_v_1_kodeliste_code_list_name.py renamed to nadag-innmelding-python-client/nadag_innmelding_python_client/api/default/get_kodeliste_code_list_name.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ def _get_kwargs(
1414
) -> dict[str, Any]:
1515
_kwargs: dict[str, Any] = {
1616
"method": "get",
17-
"url": f"/nadag/innmelding/v1/kodeliste/{code_list_name}",
17+
"url": f"/kodeliste/{code_list_name}",
1818
}
1919

2020
return _kwargs

nadag-innmelding-python-client/nadag_innmelding_python_client/api/default/get_nadag_innmelding_v_1_kodeliste_code_list_name_code_name.py renamed to nadag-innmelding-python-client/nadag_innmelding_python_client/api/default/get_kodeliste_code_list_name_code_name.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ def _get_kwargs(
1515
) -> dict[str, Any]:
1616
_kwargs: dict[str, Any] = {
1717
"method": "get",
18-
"url": f"/nadag/innmelding/v1/kodeliste/{code_list_name}/{code_name}",
18+
"url": f"/kodeliste/{code_list_name}/{code_name}",
1919
}
2020

2121
return _kwargs
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,177 @@
1+
from http import HTTPStatus
2+
from typing import Any, Optional, Union, cast
3+
from uuid import UUID
4+
5+
import httpx
6+
7+
from ... import errors
8+
from ...client import AuthenticatedClient, Client
9+
from ...models.diagnostics_dto import DiagnosticsDto
10+
from ...types import Response
11+
12+
13+
def _get_kwargs(
14+
root_lokal_id: UUID,
15+
root_versjon_id: int,
16+
) -> dict[str, Any]:
17+
_kwargs: dict[str, Any] = {
18+
"method": "get",
19+
"url": f"/validation/diagnosticsFromRoot/{root_lokal_id}/{root_versjon_id}",
20+
}
21+
22+
return _kwargs
23+
24+
25+
def _parse_response(
26+
*, client: Union[AuthenticatedClient, Client], response: httpx.Response
27+
) -> Optional[Union[Any, DiagnosticsDto]]:
28+
if response.status_code == 200:
29+
response_200 = DiagnosticsDto.from_dict(response.json())
30+
31+
return response_200
32+
33+
if response.status_code == 401:
34+
response_401 = cast(Any, None)
35+
return response_401
36+
37+
if client.raise_on_unexpected_status:
38+
raise errors.UnexpectedStatus(response.status_code, response.content)
39+
else:
40+
return None
41+
42+
43+
def _build_response(
44+
*, client: Union[AuthenticatedClient, Client], response: httpx.Response
45+
) -> Response[Union[Any, DiagnosticsDto]]:
46+
return Response(
47+
status_code=HTTPStatus(response.status_code),
48+
content=response.content,
49+
headers=response.headers,
50+
parsed=_parse_response(client=client, response=response),
51+
)
52+
53+
54+
def sync_detailed(
55+
root_lokal_id: UUID,
56+
root_versjon_id: int,
57+
*,
58+
client: Union[AuthenticatedClient, Client],
59+
) -> Response[Union[Any, DiagnosticsDto]]:
60+
"""Fetches a DiagnosticsDto from root ID.
61+
62+
Fetches all diagnostics from the Identifikasjon of a root.
63+
64+
Args:
65+
root_lokal_id (UUID):
66+
root_versjon_id (int):
67+
68+
Raises:
69+
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
70+
httpx.TimeoutException: If the request takes longer than Client.timeout.
71+
72+
Returns:
73+
Response[Union[Any, DiagnosticsDto]]
74+
"""
75+
76+
kwargs = _get_kwargs(
77+
root_lokal_id=root_lokal_id,
78+
root_versjon_id=root_versjon_id,
79+
)
80+
81+
response = client.get_httpx_client().request(
82+
**kwargs,
83+
)
84+
85+
return _build_response(client=client, response=response)
86+
87+
88+
def sync(
89+
root_lokal_id: UUID,
90+
root_versjon_id: int,
91+
*,
92+
client: Union[AuthenticatedClient, Client],
93+
) -> Optional[Union[Any, DiagnosticsDto]]:
94+
"""Fetches a DiagnosticsDto from root ID.
95+
96+
Fetches all diagnostics from the Identifikasjon of a root.
97+
98+
Args:
99+
root_lokal_id (UUID):
100+
root_versjon_id (int):
101+
102+
Raises:
103+
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
104+
httpx.TimeoutException: If the request takes longer than Client.timeout.
105+
106+
Returns:
107+
Union[Any, DiagnosticsDto]
108+
"""
109+
110+
return sync_detailed(
111+
root_lokal_id=root_lokal_id,
112+
root_versjon_id=root_versjon_id,
113+
client=client,
114+
).parsed
115+
116+
117+
async def asyncio_detailed(
118+
root_lokal_id: UUID,
119+
root_versjon_id: int,
120+
*,
121+
client: Union[AuthenticatedClient, Client],
122+
) -> Response[Union[Any, DiagnosticsDto]]:
123+
"""Fetches a DiagnosticsDto from root ID.
124+
125+
Fetches all diagnostics from the Identifikasjon of a root.
126+
127+
Args:
128+
root_lokal_id (UUID):
129+
root_versjon_id (int):
130+
131+
Raises:
132+
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
133+
httpx.TimeoutException: If the request takes longer than Client.timeout.
134+
135+
Returns:
136+
Response[Union[Any, DiagnosticsDto]]
137+
"""
138+
139+
kwargs = _get_kwargs(
140+
root_lokal_id=root_lokal_id,
141+
root_versjon_id=root_versjon_id,
142+
)
143+
144+
response = await client.get_async_httpx_client().request(**kwargs)
145+
146+
return _build_response(client=client, response=response)
147+
148+
149+
async def asyncio(
150+
root_lokal_id: UUID,
151+
root_versjon_id: int,
152+
*,
153+
client: Union[AuthenticatedClient, Client],
154+
) -> Optional[Union[Any, DiagnosticsDto]]:
155+
"""Fetches a DiagnosticsDto from root ID.
156+
157+
Fetches all diagnostics from the Identifikasjon of a root.
158+
159+
Args:
160+
root_lokal_id (UUID):
161+
root_versjon_id (int):
162+
163+
Raises:
164+
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
165+
httpx.TimeoutException: If the request takes longer than Client.timeout.
166+
167+
Returns:
168+
Union[Any, DiagnosticsDto]
169+
"""
170+
171+
return (
172+
await asyncio_detailed(
173+
root_lokal_id=root_lokal_id,
174+
root_versjon_id=root_versjon_id,
175+
client=client,
176+
)
177+
).parsed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,177 @@
1+
from http import HTTPStatus
2+
from typing import Any, Optional, Union, cast
3+
from uuid import UUID
4+
5+
import httpx
6+
7+
from ... import errors
8+
from ...client import AuthenticatedClient, Client
9+
from ...models.diagnostics_dto import DiagnosticsDto
10+
from ...types import Response
11+
12+
13+
def _get_kwargs(
14+
target_lokal_id: UUID,
15+
target_versjon_id: int,
16+
) -> dict[str, Any]:
17+
_kwargs: dict[str, Any] = {
18+
"method": "get",
19+
"url": f"/validation/diagnosticsFromTarget/{target_lokal_id}/{target_versjon_id}",
20+
}
21+
22+
return _kwargs
23+
24+
25+
def _parse_response(
26+
*, client: Union[AuthenticatedClient, Client], response: httpx.Response
27+
) -> Optional[Union[Any, DiagnosticsDto]]:
28+
if response.status_code == 200:
29+
response_200 = DiagnosticsDto.from_dict(response.json())
30+
31+
return response_200
32+
33+
if response.status_code == 401:
34+
response_401 = cast(Any, None)
35+
return response_401
36+
37+
if client.raise_on_unexpected_status:
38+
raise errors.UnexpectedStatus(response.status_code, response.content)
39+
else:
40+
return None
41+
42+
43+
def _build_response(
44+
*, client: Union[AuthenticatedClient, Client], response: httpx.Response
45+
) -> Response[Union[Any, DiagnosticsDto]]:
46+
return Response(
47+
status_code=HTTPStatus(response.status_code),
48+
content=response.content,
49+
headers=response.headers,
50+
parsed=_parse_response(client=client, response=response),
51+
)
52+
53+
54+
def sync_detailed(
55+
target_lokal_id: UUID,
56+
target_versjon_id: int,
57+
*,
58+
client: Union[AuthenticatedClient, Client],
59+
) -> Response[Union[Any, DiagnosticsDto]]:
60+
"""Fetches diagnostics for a target ID.
61+
62+
Fetches all diagnostics from the Identifikasjon of a target.
63+
64+
Args:
65+
target_lokal_id (UUID):
66+
target_versjon_id (int):
67+
68+
Raises:
69+
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
70+
httpx.TimeoutException: If the request takes longer than Client.timeout.
71+
72+
Returns:
73+
Response[Union[Any, DiagnosticsDto]]
74+
"""
75+
76+
kwargs = _get_kwargs(
77+
target_lokal_id=target_lokal_id,
78+
target_versjon_id=target_versjon_id,
79+
)
80+
81+
response = client.get_httpx_client().request(
82+
**kwargs,
83+
)
84+
85+
return _build_response(client=client, response=response)
86+
87+
88+
def sync(
89+
target_lokal_id: UUID,
90+
target_versjon_id: int,
91+
*,
92+
client: Union[AuthenticatedClient, Client],
93+
) -> Optional[Union[Any, DiagnosticsDto]]:
94+
"""Fetches diagnostics for a target ID.
95+
96+
Fetches all diagnostics from the Identifikasjon of a target.
97+
98+
Args:
99+
target_lokal_id (UUID):
100+
target_versjon_id (int):
101+
102+
Raises:
103+
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
104+
httpx.TimeoutException: If the request takes longer than Client.timeout.
105+
106+
Returns:
107+
Union[Any, DiagnosticsDto]
108+
"""
109+
110+
return sync_detailed(
111+
target_lokal_id=target_lokal_id,
112+
target_versjon_id=target_versjon_id,
113+
client=client,
114+
).parsed
115+
116+
117+
async def asyncio_detailed(
118+
target_lokal_id: UUID,
119+
target_versjon_id: int,
120+
*,
121+
client: Union[AuthenticatedClient, Client],
122+
) -> Response[Union[Any, DiagnosticsDto]]:
123+
"""Fetches diagnostics for a target ID.
124+
125+
Fetches all diagnostics from the Identifikasjon of a target.
126+
127+
Args:
128+
target_lokal_id (UUID):
129+
target_versjon_id (int):
130+
131+
Raises:
132+
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
133+
httpx.TimeoutException: If the request takes longer than Client.timeout.
134+
135+
Returns:
136+
Response[Union[Any, DiagnosticsDto]]
137+
"""
138+
139+
kwargs = _get_kwargs(
140+
target_lokal_id=target_lokal_id,
141+
target_versjon_id=target_versjon_id,
142+
)
143+
144+
response = await client.get_async_httpx_client().request(**kwargs)
145+
146+
return _build_response(client=client, response=response)
147+
148+
149+
async def asyncio(
150+
target_lokal_id: UUID,
151+
target_versjon_id: int,
152+
*,
153+
client: Union[AuthenticatedClient, Client],
154+
) -> Optional[Union[Any, DiagnosticsDto]]:
155+
"""Fetches diagnostics for a target ID.
156+
157+
Fetches all diagnostics from the Identifikasjon of a target.
158+
159+
Args:
160+
target_lokal_id (UUID):
161+
target_versjon_id (int):
162+
163+
Raises:
164+
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
165+
httpx.TimeoutException: If the request takes longer than Client.timeout.
166+
167+
Returns:
168+
Union[Any, DiagnosticsDto]
169+
"""
170+
171+
return (
172+
await asyncio_detailed(
173+
target_lokal_id=target_lokal_id,
174+
target_versjon_id=target_versjon_id,
175+
client=client,
176+
)
177+
).parsed

0 commit comments

Comments
 (0)