Keming

Results 256 comments of Keming

- Do we need to provide different `Response` types for different web frameworks? - flask has a very complex return type, it can be json, json+status, json+headers, json+status+headers, response. It's...

> I'm not sure whether adding annotations to flask.Response has any benefit over the current approach, since it just adds more code without improving type safety. Agree. This doesn't improve...

I see. This might affect more than we thought. 1. It's backward compatible, but returning a `jsonify()` will break the type check in flask 2. Some users are using the...

I don't quite get it. - if it's correct to return `Union[A, B]`, maybe you should use pydantic RootModel with Union? - if it's about some specific usage, maybe you...

I just tried the Union type for pydantic, it looks like the generated JSON schema already supports the OpenAPI discriminator. But we need to do some post-processing as the https://github.com/0b01001001/spectree/blob/493b56012d03b4b7d13898a5883f0c3deeb98055/spectree/spec.py#L362

- [v1/v2 download percentage](https://pepy.tech/projects/pydantic?timeRange=threeMonths&category=version&includeCIDownloads=true&granularity=daily&viewType=line&versions=1.*%2C2.*) Since there are still lots of people using pydantic v1 (may not 100% accurate for spectree but I don't have other telemetries), I still plan to...

- drop pydantic v1 in https://github.com/0b01001001/spectree/pull/455 spectree v2 alpha is released.

I also use `typ` in the codebase since `type` is a soft keyword in Python. - ref: https://docs.python.org/3.14/reference/lexical_analysis.html#soft-keywords

Hi @smeng9, thanks for your feedback. Are you using any Flask extensions for WebSocket support?

Hi @thomas-zahner, > So is there a linker error when using openSSL? I've https://github.com/lycheeverse/lychee/pull/1928 to switch from openSSL to rustls. When we switch, we will also drop the rustls-tls feature...