Comments (7)
APIBlueprint
inherited from Blueprint
, so i think you can use the route()
method directly .
but it doesn't work for swagger...
from flask-openapi3.
Yes, that is the point. I am not quite sure what the difference is between route()
and individual methods like get()
, but I suppose it should be possible to override it in APIBlueprint
?
That would also avoid having to refactor in cases where an endpoint supports more than one HTTP methods...
from flask-openapi3.
This library focuses more on RESTful APIs and OpenAPI docs.
from flask-openapi3.
I am sorry, this answer doesn't make sense to me. Why is that different for OpenAPI docs whether a route is registered my route()
vs. get()
? (As mentioned, I am not clear about the difference between the two, but both can server JSON, XML or whatever and can support different auth schemes...?)
from flask-openapi3.
I did some more digging. The API docs state that get()
is a shortcut for route()
with methods=["GET"]
From: https://flask.palletsprojects.com/en/2.0.x/api/#flask.Blueprint.get
However, the library does not support using route()
, so that is why I am asking.
from flask-openapi3.
We can make it for swagger. But if you specify two HTTP methods in route()
(e.g. GET, POST), you'll get two API with same parameters in swagger,it feels weird.
I think get
for query resources and post
for created . Why don't we use get
and post
separately to make things easier?
from flask-openapi3.
Fair enough.
from flask-openapi3.
Related Issues (20)
- Remove validate response before return [Breaking Changes]
- Latest release dropped the required=True on request body by default HOT 1
- Required header is not found HOT 1
- Support APIView
- CORS does not work with OpenAPI HOT 3
- async routes not working HOT 3
- should doc strings render as markdown? HOT 1
- Request: Support List[pydantic.BaseModel] as response HOT 3
- Request with headers using pydantic alias not working HOT 1
- `flask openapi` command not available HOT 5
- Outdated use of `VALIDATE_RESPONSE`
- Feature Request - allow initialization variables in register_api_view HOT 1
- Feature Request - custom get_operation_id_for_path handler HOT 2
- Feature request - Optiona to add top-level extensions to openapi spec HOT 3
- Enable sponsoring on the project HOT 1
- security_schemes(SecurityScheme) supports json format
- BaseModel Config support `openapi_extra`
- Working for v3.0 HOT 9
- Add ability to disable other sources of documentation HOT 3
- How to get the parsed Pydantic models of an endpoint globally? HOT 1
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.