Comments (3)
请详细描述你的需求,HelloModel
并没有继承BaseModel
,如果你想直接返回HelloSchema,可以直接使用:
HelloSchema(
msg="success",
title="ok"
).json()
我觉没必要重复实现此功能!
from flask-openapi3.
视图函数可以直接返回一个sqlalchemy model的实例
return db.get_or_404(Product, pk)
from flask-openapi3.
不考虑支持,sqlalchemy model序列化是一个用户自定义个过程,我们不能主观定义一个固定的序列化结果。
from flask-openapi3.
Related Issues (20)
- Apply multi responses to one HttpStatus or apply arbitrary str as responses key HOT 3
- Allow 422 response to specified model not only array HOT 3
- Optional null value with model_fields_set HOT 3
- Missing Pydantic Calculated Fields From openapi.json HOT 3
- How to add examples to swagger HOT 1
- Issues using flask-openapi3 when its views are decorated
- Swagger Validator Error when application is deployed HOT 3
- Pyinstller build breaks docs HOT 2
- Error when using 'gt' or 'lt' constraints in Pydantic Field()
- Release v4.0 HOT 4
- With OpenApi Support base url for all flask api is not working HOT 1
- Swagger-UI template does not includes oauth2-redirect.html HOT 4
- How to use flask-openapi3 in existing projects based on flask? HOT 3
- `populate_by_name` doesn't work for `query` instances HOT 1
- Does not meet Flask specifications HOT 4
- provide a way to order the endpoints HOT 1
- APIBlueprint route methods are processed by the Blueprint base class, not APIScaffold HOT 2
- Request OpenAPI integration support
- About get_openapi3_docs
- support Quart
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from flask-openapi3.