feat(api): OpenAPI spec update via Stainless API (#145)

This commit is contained in:
stainless-app[bot] 2024-03-19 10:19:56 +00:00 committed by stainless-bot
parent 74050555d2
commit 33d58b178f
3 changed files with 10 additions and 2 deletions

View file

@ -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

View file

@ -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)

View file

@ -75,6 +75,8 @@ class BodyObjectDetection(TypedDict, total=False):
class BodyUnionMember10(TypedDict, total=False):
prompt: Required[str]
lora: str
max_tokens: int
raw: bool