Only swagger generation for end-point
See original GitHub issueHello @apryor6 . I am happy using this library, but sometimes I want to do something before validation, for example pass context to Marshmallow Schema, but I still want to generate swagger for this API.
I’d like to contribute to the library implementing such functionality. What is the best way to do it to your opinion?
- extend existing both
accepts
andresponds
decorators withvalidate: bool
param. - create new decorator
@swagger
just for generation swagger spec.
What do you think?
Issue Analytics
- State:
- Created 3 years ago
- Comments:10 (3 by maintainers)
Top Results From Across the Web
API Code & Client Generator | Swagger Codegen
Codegen simplifies your build process by generating server stubs and client SDKs for any API defined with the OpenAPI specification. Download Codegen today....
Read more >Show only specific APIs on Swagger — Asp.Net Core - Medium
If we run the application and type endpoint “swagger” in the URL, we are already able to see the documentation with all the...
Read more >Selective Generation with Swagger Codegen
When generating the stub code for the backend powering the API, it may not always be desirable to generate stubs for every endpoint...
Read more >Hiding Endpoints From Swagger Documentation in Spring Boot
Let's have a look at how we can hide endpoints from Swagger API documentation. ... Note: We can only use @Hidden when we're...
Read more >Configuring and Using Swagger UI in ASP.NET Core Web API
NET Core API using only the latest . ... SwaggerGen : A Swagger generator that builds SwaggerDocument objects directly from our routes, ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Started implementation and realized that we can pass an instance of schema to the decorator, so it’s not a problem to pass context into constructor directly. as well as
many
parameter. according to https://github.com/apryor6/flask_accepts/commit/c32b169e8d7099cc0a6fc85dc326160216a13185@vladarefiev @apryor6 hey guys, I’m interesting in this topic as well. The main problem to me is that I cannot pass some extra params to
Schema
constructor directly, for one case I want to passpartial
(but I know that it’is already implemented), for another case it could be a context. That’s deffinetly not a problem withpartial
parameter, but there are some problems with context, since in many cases the context should be generated in runtime, not import time (like if a part of context should be some data from request or request itself). Maybe the high-level interface could look like:and somewhere under the hood:
wdyt? let me know if I can help somehow