mirror of
https://github.com/cloudflare/cloudflare-python.git
synced 2026-01-16 23:01:03 +00:00
feat(api): OpenAPI spec update via Stainless API (#145)
This commit is contained in:
parent
74050555d2
commit
33d58b178f
3 changed files with 10 additions and 2 deletions
|
|
@ -86,7 +86,7 @@ Most tests require you to [set up a mock server](https://github.com/stoplightio/
|
|||
|
||||
```bash
|
||||
# you will need npm installed
|
||||
npx prism path/to/your/openapi.yml
|
||||
npx prism mock path/to/your/openapi.yml
|
||||
```
|
||||
|
||||
```bash
|
||||
|
|
|
|||
|
|
@ -3,6 +3,7 @@ from __future__ import annotations
|
|||
import inspect
|
||||
from typing import TYPE_CHECKING, Any, Type, Union, Generic, TypeVar, Callable, cast
|
||||
from datetime import date, datetime
|
||||
from functools import lru_cache
|
||||
from typing_extensions import (
|
||||
Unpack,
|
||||
Literal,
|
||||
|
|
@ -533,7 +534,12 @@ else:
|
|||
|
||||
|
||||
if PYDANTIC_V2:
|
||||
from pydantic import TypeAdapter
|
||||
if TYPE_CHECKING:
|
||||
from pydantic import TypeAdapter
|
||||
else:
|
||||
from pydantic import TypeAdapter as _TypeAdapter
|
||||
|
||||
TypeAdapter = lru_cache(_TypeAdapter)
|
||||
|
||||
def _validate_non_model_type(*, type_: type[_T], value: object) -> _T:
|
||||
return TypeAdapter(type_).validate_python(value)
|
||||
|
|
|
|||
|
|
@ -75,6 +75,8 @@ class BodyObjectDetection(TypedDict, total=False):
|
|||
class BodyUnionMember10(TypedDict, total=False):
|
||||
prompt: Required[str]
|
||||
|
||||
lora: str
|
||||
|
||||
max_tokens: int
|
||||
|
||||
raw: bool
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue