flask-openapi3 icon indicating copy to clipboard operation
flask-openapi3 copied to clipboard

Support for advanced schemas (oneof, anyof)

Open Soremwar opened this issue 1 year ago • 1 comments

Not really a bug, but a feature request

Is it possible to have support for schemas such as the one described in the Pydantic documentation. It's possible to achieve this currently by wrapping the values in a BaseModel, however it's not currently possible to have one of this objects at the root

Environment:

  • Python version: 3.12.4
  • Operating system: Windows 11
  • Flask version: 3.1.0
  • flask-openapi3 version: 4.0.3

Soremwar avatar Nov 25 '24 17:11 Soremwar

I don't quite understand what you mean, but I'm guessing RootModel will meet your needs.

luolingchun avatar Nov 26 '24 02:11 luolingchun