Skip to content

Commit c23323d

Browse files
josteinlgithub-actions[bot]
authored andcommitted
Update OpenAPI spec to version 2025.12.19
1 parent 70fd79c commit c23323d

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

44 files changed

+530
-551
lines changed

nadag-innmelding-python-client/nadag_innmelding_python_client/api/default/post_nadag_innmelding_v_1_geoteknisk_unders.py

Lines changed: 16 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55

66
from ... import errors
77
from ...client import AuthenticatedClient, Client
8+
from ...models.diagnostics_dto import DiagnosticsDto
89
from ...models.epsg_code import EpsgCode
910
from ...models.geoteknisk_unders import GeotekniskUnders
1011
from ...models.validated_geoteknisk_unders import ValidatedGeotekniskUnders
@@ -41,7 +42,7 @@ def _get_kwargs(
4142

4243
def _parse_response(
4344
*, client: AuthenticatedClient | Client, response: httpx.Response
44-
) -> Any | ValidatedGeotekniskUnders | None:
45+
) -> Any | DiagnosticsDto | ValidatedGeotekniskUnders | None:
4546
if response.status_code == 200:
4647
response_200 = ValidatedGeotekniskUnders.from_dict(response.json())
4748

@@ -51,6 +52,11 @@ def _parse_response(
5152
response_401 = cast(Any, None)
5253
return response_401
5354

55+
if response.status_code == 422:
56+
response_422 = DiagnosticsDto.from_dict(response.json())
57+
58+
return response_422
59+
5460
if client.raise_on_unexpected_status:
5561
raise errors.UnexpectedStatus(response.status_code, response.content)
5662
else:
@@ -59,7 +65,7 @@ def _parse_response(
5965

6066
def _build_response(
6167
*, client: AuthenticatedClient | Client, response: httpx.Response
62-
) -> Response[Any | ValidatedGeotekniskUnders]:
68+
) -> Response[Any | DiagnosticsDto | ValidatedGeotekniskUnders]:
6369
return Response(
6470
status_code=HTTPStatus(response.status_code),
6571
content=response.content,
@@ -73,7 +79,7 @@ def sync_detailed(
7379
client: AuthenticatedClient,
7480
body: GeotekniskUnders,
7581
epsg_code: EpsgCode,
76-
) -> Response[Any | ValidatedGeotekniskUnders]:
82+
) -> Response[Any | DiagnosticsDto | ValidatedGeotekniskUnders]:
7783
"""Creates a new GeotekniskUnders.
7884
7985
Creates a new GeotekniskUnders. Returns the id of the newly created GeotekniskUnders.
@@ -89,7 +95,7 @@ def sync_detailed(
8995
httpx.TimeoutException: If the request takes longer than Client.timeout.
9096
9197
Returns:
92-
Response[Any | ValidatedGeotekniskUnders]
98+
Response[Any | DiagnosticsDto | ValidatedGeotekniskUnders]
9399
"""
94100

95101
kwargs = _get_kwargs(
@@ -109,7 +115,7 @@ def sync(
109115
client: AuthenticatedClient,
110116
body: GeotekniskUnders,
111117
epsg_code: EpsgCode,
112-
) -> Any | ValidatedGeotekniskUnders | None:
118+
) -> Any | DiagnosticsDto | ValidatedGeotekniskUnders | None:
113119
"""Creates a new GeotekniskUnders.
114120
115121
Creates a new GeotekniskUnders. Returns the id of the newly created GeotekniskUnders.
@@ -125,7 +131,7 @@ def sync(
125131
httpx.TimeoutException: If the request takes longer than Client.timeout.
126132
127133
Returns:
128-
Any | ValidatedGeotekniskUnders
134+
Any | DiagnosticsDto | ValidatedGeotekniskUnders
129135
"""
130136

131137
return sync_detailed(
@@ -140,7 +146,7 @@ async def asyncio_detailed(
140146
client: AuthenticatedClient,
141147
body: GeotekniskUnders,
142148
epsg_code: EpsgCode,
143-
) -> Response[Any | ValidatedGeotekniskUnders]:
149+
) -> Response[Any | DiagnosticsDto | ValidatedGeotekniskUnders]:
144150
"""Creates a new GeotekniskUnders.
145151
146152
Creates a new GeotekniskUnders. Returns the id of the newly created GeotekniskUnders.
@@ -156,7 +162,7 @@ async def asyncio_detailed(
156162
httpx.TimeoutException: If the request takes longer than Client.timeout.
157163
158164
Returns:
159-
Response[Any | ValidatedGeotekniskUnders]
165+
Response[Any | DiagnosticsDto | ValidatedGeotekniskUnders]
160166
"""
161167

162168
kwargs = _get_kwargs(
@@ -174,7 +180,7 @@ async def asyncio(
174180
client: AuthenticatedClient,
175181
body: GeotekniskUnders,
176182
epsg_code: EpsgCode,
177-
) -> Any | ValidatedGeotekniskUnders | None:
183+
) -> Any | DiagnosticsDto | ValidatedGeotekniskUnders | None:
178184
"""Creates a new GeotekniskUnders.
179185
180186
Creates a new GeotekniskUnders. Returns the id of the newly created GeotekniskUnders.
@@ -190,7 +196,7 @@ async def asyncio(
190196
httpx.TimeoutException: If the request takes longer than Client.timeout.
191197
192198
Returns:
193-
Any | ValidatedGeotekniskUnders
199+
Any | DiagnosticsDto | ValidatedGeotekniskUnders
194200
"""
195201

196202
return (

nadag-innmelding-python-client/nadag_innmelding_python_client/api/default/post_nadag_innmelding_v_1_geoteknisk_unders_geoteknisk_unders_id_unders_pkt.py

Lines changed: 25 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,12 @@
11
from http import HTTPStatus
2-
from typing import Any
2+
from typing import Any, cast
33
from urllib.parse import quote
44

55
import httpx
66

77
from ... import errors
88
from ...client import AuthenticatedClient, Client
9+
from ...models.diagnostics_dto import DiagnosticsDto
910
from ...models.epsg_code import EpsgCode
1011
from ...models.geoteknisk_borehull import GeotekniskBorehull
1112
from ...models.validated_geoteknisk_unders import ValidatedGeotekniskUnders
@@ -48,12 +49,25 @@ def _get_kwargs(
4849

4950
def _parse_response(
5051
*, client: AuthenticatedClient | Client, response: httpx.Response
51-
) -> ValidatedGeotekniskUnders | None:
52+
) -> Any | DiagnosticsDto | ValidatedGeotekniskUnders | None:
5253
if response.status_code == 200:
5354
response_200 = ValidatedGeotekniskUnders.from_dict(response.json())
5455

5556
return response_200
5657

58+
if response.status_code == 401:
59+
response_401 = cast(Any, None)
60+
return response_401
61+
62+
if response.status_code == 404:
63+
response_404 = cast(Any, None)
64+
return response_404
65+
66+
if response.status_code == 422:
67+
response_422 = DiagnosticsDto.from_dict(response.json())
68+
69+
return response_422
70+
5771
if client.raise_on_unexpected_status:
5872
raise errors.UnexpectedStatus(response.status_code, response.content)
5973
else:
@@ -62,7 +76,7 @@ def _parse_response(
6276

6377
def _build_response(
6478
*, client: AuthenticatedClient | Client, response: httpx.Response
65-
) -> Response[ValidatedGeotekniskUnders]:
79+
) -> Response[Any | DiagnosticsDto | ValidatedGeotekniskUnders]:
6680
return Response(
6781
status_code=HTTPStatus(response.status_code),
6882
content=response.content,
@@ -77,7 +91,7 @@ def sync_detailed(
7791
client: AuthenticatedClient,
7892
body: list[GeotekniskBorehull],
7993
epsg_code: EpsgCode,
80-
) -> Response[ValidatedGeotekniskUnders]:
94+
) -> Response[Any | DiagnosticsDto | ValidatedGeotekniskUnders]:
8195
"""Creates a set of GeotekniskBorehull.
8296
8397
Creates a set of GeotekniskBorehull.Returns the diagnostics of the newly created GeotekniskBorehull
@@ -93,7 +107,7 @@ def sync_detailed(
93107
httpx.TimeoutException: If the request takes longer than Client.timeout.
94108
95109
Returns:
96-
Response[ValidatedGeotekniskUnders]
110+
Response[Any | DiagnosticsDto | ValidatedGeotekniskUnders]
97111
"""
98112

99113
kwargs = _get_kwargs(
@@ -115,7 +129,7 @@ def sync(
115129
client: AuthenticatedClient,
116130
body: list[GeotekniskBorehull],
117131
epsg_code: EpsgCode,
118-
) -> ValidatedGeotekniskUnders | None:
132+
) -> Any | DiagnosticsDto | ValidatedGeotekniskUnders | None:
119133
"""Creates a set of GeotekniskBorehull.
120134
121135
Creates a set of GeotekniskBorehull.Returns the diagnostics of the newly created GeotekniskBorehull
@@ -131,7 +145,7 @@ def sync(
131145
httpx.TimeoutException: If the request takes longer than Client.timeout.
132146
133147
Returns:
134-
ValidatedGeotekniskUnders
148+
Any | DiagnosticsDto | ValidatedGeotekniskUnders
135149
"""
136150

137151
return sync_detailed(
@@ -148,7 +162,7 @@ async def asyncio_detailed(
148162
client: AuthenticatedClient,
149163
body: list[GeotekniskBorehull],
150164
epsg_code: EpsgCode,
151-
) -> Response[ValidatedGeotekniskUnders]:
165+
) -> Response[Any | DiagnosticsDto | ValidatedGeotekniskUnders]:
152166
"""Creates a set of GeotekniskBorehull.
153167
154168
Creates a set of GeotekniskBorehull.Returns the diagnostics of the newly created GeotekniskBorehull
@@ -164,7 +178,7 @@ async def asyncio_detailed(
164178
httpx.TimeoutException: If the request takes longer than Client.timeout.
165179
166180
Returns:
167-
Response[ValidatedGeotekniskUnders]
181+
Response[Any | DiagnosticsDto | ValidatedGeotekniskUnders]
168182
"""
169183

170184
kwargs = _get_kwargs(
@@ -184,7 +198,7 @@ async def asyncio(
184198
client: AuthenticatedClient,
185199
body: list[GeotekniskBorehull],
186200
epsg_code: EpsgCode,
187-
) -> ValidatedGeotekniskUnders | None:
201+
) -> Any | DiagnosticsDto | ValidatedGeotekniskUnders | None:
188202
"""Creates a set of GeotekniskBorehull.
189203
190204
Creates a set of GeotekniskBorehull.Returns the diagnostics of the newly created GeotekniskBorehull
@@ -200,7 +214,7 @@ async def asyncio(
200214
httpx.TimeoutException: If the request takes longer than Client.timeout.
201215
202216
Returns:
203-
ValidatedGeotekniskUnders
217+
Any | DiagnosticsDto | ValidatedGeotekniskUnders
204218
"""
205219

206220
return (

nadag-innmelding-python-client/nadag_innmelding_python_client/api/default/put_nadag_innmelding_v_1_geoteknisk_unders_geoteknisk_unders_id.py

Lines changed: 16 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66

77
from ... import errors
88
from ...client import AuthenticatedClient, Client
9+
from ...models.diagnostics_dto import DiagnosticsDto
910
from ...models.epsg_code import EpsgCode
1011
from ...models.geoteknisk_unders import GeotekniskUnders
1112
from ...models.validated_geoteknisk_unders import ValidatedGeotekniskUnders
@@ -45,7 +46,7 @@ def _get_kwargs(
4546

4647
def _parse_response(
4748
*, client: AuthenticatedClient | Client, response: httpx.Response
48-
) -> Any | ValidatedGeotekniskUnders | None:
49+
) -> Any | DiagnosticsDto | ValidatedGeotekniskUnders | None:
4950
if response.status_code == 200:
5051
response_200 = ValidatedGeotekniskUnders.from_dict(response.json())
5152

@@ -59,6 +60,11 @@ def _parse_response(
5960
response_404 = cast(Any, None)
6061
return response_404
6162

63+
if response.status_code == 422:
64+
response_422 = DiagnosticsDto.from_dict(response.json())
65+
66+
return response_422
67+
6268
if client.raise_on_unexpected_status:
6369
raise errors.UnexpectedStatus(response.status_code, response.content)
6470
else:
@@ -67,7 +73,7 @@ def _parse_response(
6773

6874
def _build_response(
6975
*, client: AuthenticatedClient | Client, response: httpx.Response
70-
) -> Response[Any | ValidatedGeotekniskUnders]:
76+
) -> Response[Any | DiagnosticsDto | ValidatedGeotekniskUnders]:
7177
return Response(
7278
status_code=HTTPStatus(response.status_code),
7379
content=response.content,
@@ -82,7 +88,7 @@ def sync_detailed(
8288
client: AuthenticatedClient,
8389
body: GeotekniskUnders,
8490
epsg_code: EpsgCode,
85-
) -> Response[Any | ValidatedGeotekniskUnders]:
91+
) -> Response[Any | DiagnosticsDto | ValidatedGeotekniskUnders]:
8692
"""Updates a GeotekniskUnders.
8793
8894
Updates a GeotekniskUnders.
@@ -99,7 +105,7 @@ def sync_detailed(
99105
httpx.TimeoutException: If the request takes longer than Client.timeout.
100106
101107
Returns:
102-
Response[Any | ValidatedGeotekniskUnders]
108+
Response[Any | DiagnosticsDto | ValidatedGeotekniskUnders]
103109
"""
104110

105111
kwargs = _get_kwargs(
@@ -121,7 +127,7 @@ def sync(
121127
client: AuthenticatedClient,
122128
body: GeotekniskUnders,
123129
epsg_code: EpsgCode,
124-
) -> Any | ValidatedGeotekniskUnders | None:
130+
) -> Any | DiagnosticsDto | ValidatedGeotekniskUnders | None:
125131
"""Updates a GeotekniskUnders.
126132
127133
Updates a GeotekniskUnders.
@@ -138,7 +144,7 @@ def sync(
138144
httpx.TimeoutException: If the request takes longer than Client.timeout.
139145
140146
Returns:
141-
Any | ValidatedGeotekniskUnders
147+
Any | DiagnosticsDto | ValidatedGeotekniskUnders
142148
"""
143149

144150
return sync_detailed(
@@ -155,7 +161,7 @@ async def asyncio_detailed(
155161
client: AuthenticatedClient,
156162
body: GeotekniskUnders,
157163
epsg_code: EpsgCode,
158-
) -> Response[Any | ValidatedGeotekniskUnders]:
164+
) -> Response[Any | DiagnosticsDto | ValidatedGeotekniskUnders]:
159165
"""Updates a GeotekniskUnders.
160166
161167
Updates a GeotekniskUnders.
@@ -172,7 +178,7 @@ async def asyncio_detailed(
172178
httpx.TimeoutException: If the request takes longer than Client.timeout.
173179
174180
Returns:
175-
Response[Any | ValidatedGeotekniskUnders]
181+
Response[Any | DiagnosticsDto | ValidatedGeotekniskUnders]
176182
"""
177183

178184
kwargs = _get_kwargs(
@@ -192,7 +198,7 @@ async def asyncio(
192198
client: AuthenticatedClient,
193199
body: GeotekniskUnders,
194200
epsg_code: EpsgCode,
195-
) -> Any | ValidatedGeotekniskUnders | None:
201+
) -> Any | DiagnosticsDto | ValidatedGeotekniskUnders | None:
196202
"""Updates a GeotekniskUnders.
197203
198204
Updates a GeotekniskUnders.
@@ -209,7 +215,7 @@ async def asyncio(
209215
httpx.TimeoutException: If the request takes longer than Client.timeout.
210216
211217
Returns:
212-
Any | ValidatedGeotekniskUnders
218+
Any | DiagnosticsDto | ValidatedGeotekniskUnders
213219
"""
214220

215221
return (

0 commit comments

Comments
 (0)