Coder Social home page Coder Social logo

flask-siwadoc's Issues

缺少针对header的校验

针对header仅提供了文档支持,但并未对header参数进行校验,不知是否有意为之?

如果使用了蓝图 要如何注册呢

#注册告警接口蓝图
from alarm.main import blue
app.register_blueprint(blue, url_prefix='/alarmapi')
你好请问下 如果引入了蓝图要如何注册

接口比较多,没办法创建两个接口文档

AssertionError: A name collision occurred between blueprints <flask.blueprints.Blueprint object at 0x7f9ea0a14cc0> and <flask.blueprints.Blueprint object at 0x7f9ea0a149b0>. Both share the same name "siwadoc". Blueprints that are created on the fly need unique names.

上传多个文件对象且用文件名自动生成key

图片

  • 这里的方法,只能写死前端要传几个文件,但其实不知道前端会传几个文件
  • 这里的file1: file2: 直接就是key了,其实并不能这样设置,而是要根据上传的文件名作为key
  • 大神,这里的siwa接口该如何去编辑呢?

defination status code

siwa.doc 方法的x参数并没有用上

code_msg = {}
if code_msg:
    wrapper.x = code_msg    

这段代码相当于写死了,没有透出接口

padantic 数据类型是 另一个model时,解析出错

大佬你好,这是一个非常棒的项目。但是我发现在用的时候,如果padantic模型中的一个数据校验来源于另一个模型时,flask在解析请求的时候会无法解析另一个模型类型的数据。例如,
class A(BaseModel):
aa: str
bb: int

class B(BaseModel):
dd: int
cc : List[A]

@app.route("/hello", methods=["POST"])
@siwa.doc(query=B, tags=["data_conf"], group="user")
def users_list(query: B):
print(query)
return jsonify(query)
这个时候对数据校验的时候, cc的部分就会无法解析。报错:
cc-> 0
value is not a valid dict (type=type_error.dict)

关于加入Header参数的支持

我是先用的Flask,后来看到fastapi的自动文档接口很爽试了一下,但一下没放弃Flask
试用了你的flask-siwadoc,效果很好,支持一下!

我看到doc函数支持query和Body两种来源的参数,但还有一种比较常用的是在Header里面,比如token,现在似乎还不支持?
希望在未来能够增加这一支持!

你好,flask-siwadoc这个包支持传入token吗?

你好,flask-siwadoc这个包支持传入token吗?
我在后端做了接口token校验,没有token的话无法请求接口,那么在flask-siwadoc能不能像Java springboot中的swagger一样将token放在请求头,每次调用接口时自动携带

English description:
Hello, does the flask-siwadoc package support passing tokens?
I have done the token verification of the interface on the back end and cannot request the interface without the token. Then in flask-siwadoc, can I put the token in the request header like swagger in Java springboot and carry it automatically every time the interface is called

能否在离线环境中使用?

希望在公司内网使用,有些js脚本能否通过外网机器下载后配置到工程内,从而无Internet环境也能够打开文档页面?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.