Keming

Results 210 comments of Keming

> I had to use nest-async as a workaround for async support. Otherwise, I'm afraid that there should the whole library be overwritten. You don't need to use `nest-async` in...

So far it doesn't support to change the content type. Check the discussion here: https://github.com/0b01001001/spectree/issues/53#issuecomment-678603927.

Appreciate your help to document `deprecated`. As for the new feature of `accessible`, I cannot find this in the [OpenAPI spec](https://swagger.io/specification/) (correct me if I'm wrong). Perhaps you can split...

Hi @IlyaKalosha1, thanks for asking. I checked the [FastAPI examples details](https://fastapi.tiangolo.com/tutorial/schema-extra-example/#technical-details) and [OpenAPI spec](https://swagger.io/specification/). I found this is not supported yet. Reason: * FastAPI added the `examples` to `"requestBody"/"content"/"application/json"/examples` (can...

Thanks for your feedback. Pydantic doesn't have a `file` type. Actually, flask will create a `werkzeug.datastructures.FileStorage` object. To support this, you need to provide a `File` type. ```py from werkzeug.datastructures...

> Pydantic doesn't have a file type. Actually, flask will create a werkzeug.datastructures.FileStorage object. To support this, you need to provide a File type. The problem is that cannot generate...

I found a solution. It may not be elegant. ```py from werkzeug.datastructures import FileStorage from pydantic import BaseModel FlaskFile = FileStorage def file_modify_schame(cls, field_schema): field_schema.update(format='file-storage') FlaskFile.__modify_schema__ = classmethod(file_modify_schame) class Form(BaseModel):...

Hi, I think your code is correct. But sadly swagger doesn't support the customized type of object. I think you can find the definition in swagger schemas below or redoc...

> Are there some reasons for choosing to add both request.form or request.json in the same `@api.validate(json=Schema)`? Instead of declaring the two different schemas? The request body can be either...

> Are there other custom types/combinations of custom types that you're likely to want to use beyond just `IPv4Address`/`IPv6Address`/`IPv4Address | IPv6Address`? I have a plan that would make `IPv4Address |...