我正试图为OpenAPI编写配置,以解决如下请求: http://127.0.0.1:5000/api/v1/statistics?stratifications=color,blue,bodytype,normal 或 http://127.0.0.1:5000/api/v1/statistics?stratifications=color,blue,bodytype,normal,height,170 或者只是 http://127.0.0.1:5000/api/v1/statistics?stratifications=color,grey
进入将传递给我的函数的对象。这是我在配置中写的内容:
get:
tags: [statistics]
operationId: api.v1.statistics.endpoints.get_statistics
{% if not disable_security %}
security:
- jwt: [statistics]
{% endif %}
parameters:
- in: query
name: stratifications
description: Stratifications of statistic
schema:
type: object
style: form
explode: false
但这导致了
is not of type 'object'
jsonschema中出现错误,因为jsonschema需要字典,而需要字符串color,blue,bodytype,normal,height,170
。有没有办法在那里添加编码器?我认为风格定义编码器,但似乎不是这样
目前没有回答
相关问题 更多 >
编程相关推荐