Skip to content

Commit ad416b2

Browse files
fix(api): better support union schemas with common properties
1 parent 0dab9d3 commit ad416b2

File tree

50 files changed

+771
-1600
lines changed

Some content is hidden

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

50 files changed

+771
-1600
lines changed

Diff for: src/gitpod/resources/runner_configurations/host_authentication_tokens.py

+3-102
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,13 @@
22

33
from __future__ import annotations
44

5-
from typing_extensions import Literal, overload
5+
from typing_extensions import Literal
66

77
import httpx
88

99
from ..._types import NOT_GIVEN, Body, Query, Headers, NotGiven
1010
from ..._utils import (
1111
is_given,
12-
required_args,
1312
maybe_transform,
1413
strip_not_given,
1514
async_maybe_transform,
@@ -173,11 +172,10 @@ def retrieve(
173172
cast_to=HostAuthenticationTokenRetrieveResponse,
174173
)
175174

176-
@overload
177175
def update(
178176
self,
179177
*,
180-
body: object,
178+
body: host_authentication_token_update_params.Body,
181179
connect_protocol_version: Literal[1],
182180
connect_timeout_ms: float | NotGiven = NOT_GIVEN,
183181
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
@@ -203,54 +201,6 @@ def update(
203201
204202
timeout: Override the client-level default timeout for this request, in seconds
205203
"""
206-
...
207-
208-
@overload
209-
def update(
210-
self,
211-
*,
212-
body: object,
213-
connect_protocol_version: Literal[1],
214-
connect_timeout_ms: float | NotGiven = NOT_GIVEN,
215-
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
216-
# The extra values given here take precedence over values defined on the client or passed to this method.
217-
extra_headers: Headers | None = None,
218-
extra_query: Query | None = None,
219-
extra_body: Body | None = None,
220-
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
221-
) -> object:
222-
"""
223-
UpdateHostAuthenticationToken
224-
225-
Args:
226-
connect_protocol_version: Define the version of the Connect protocol
227-
228-
connect_timeout_ms: Define the timeout, in ms
229-
230-
extra_headers: Send extra headers
231-
232-
extra_query: Add additional query parameters to the request
233-
234-
extra_body: Add additional JSON properties to the request
235-
236-
timeout: Override the client-level default timeout for this request, in seconds
237-
"""
238-
...
239-
240-
@required_args(["body", "connect_protocol_version"])
241-
def update(
242-
self,
243-
*,
244-
body: object,
245-
connect_protocol_version: Literal[1],
246-
connect_timeout_ms: float | NotGiven = NOT_GIVEN,
247-
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
248-
# The extra values given here take precedence over values defined on the client or passed to this method.
249-
extra_headers: Headers | None = None,
250-
extra_query: Query | None = None,
251-
extra_body: Body | None = None,
252-
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
253-
) -> object:
254204
extra_headers = {
255205
**strip_not_given(
256206
{
@@ -505,11 +455,10 @@ async def retrieve(
505455
cast_to=HostAuthenticationTokenRetrieveResponse,
506456
)
507457

508-
@overload
509458
async def update(
510459
self,
511460
*,
512-
body: object,
461+
body: host_authentication_token_update_params.Body,
513462
connect_protocol_version: Literal[1],
514463
connect_timeout_ms: float | NotGiven = NOT_GIVEN,
515464
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
@@ -535,54 +484,6 @@ async def update(
535484
536485
timeout: Override the client-level default timeout for this request, in seconds
537486
"""
538-
...
539-
540-
@overload
541-
async def update(
542-
self,
543-
*,
544-
body: object,
545-
connect_protocol_version: Literal[1],
546-
connect_timeout_ms: float | NotGiven = NOT_GIVEN,
547-
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
548-
# The extra values given here take precedence over values defined on the client or passed to this method.
549-
extra_headers: Headers | None = None,
550-
extra_query: Query | None = None,
551-
extra_body: Body | None = None,
552-
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
553-
) -> object:
554-
"""
555-
UpdateHostAuthenticationToken
556-
557-
Args:
558-
connect_protocol_version: Define the version of the Connect protocol
559-
560-
connect_timeout_ms: Define the timeout, in ms
561-
562-
extra_headers: Send extra headers
563-
564-
extra_query: Add additional query parameters to the request
565-
566-
extra_body: Add additional JSON properties to the request
567-
568-
timeout: Override the client-level default timeout for this request, in seconds
569-
"""
570-
...
571-
572-
@required_args(["body", "connect_protocol_version"])
573-
async def update(
574-
self,
575-
*,
576-
body: object,
577-
connect_protocol_version: Literal[1],
578-
connect_timeout_ms: float | NotGiven = NOT_GIVEN,
579-
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
580-
# The extra values given here take precedence over values defined on the client or passed to this method.
581-
extra_headers: Headers | None = None,
582-
extra_query: Query | None = None,
583-
extra_body: Body | None = None,
584-
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
585-
) -> object:
586487
extra_headers = {
587488
**strip_not_given(
588489
{

0 commit comments

Comments
 (0)