mirror of
https://github.com/thegeneralist01/twitter-openapi
synced 2026-01-11 15:40:26 +01:00
add docs
Signed-off-by: ふぁ <yuki@yuki0311.com>
This commit is contained in:
parent
283d94fabf
commit
4d7c0c3ab5
2 changed files with 25 additions and 0 deletions
|
|
@ -13,5 +13,10 @@
|
|||
"header": "securitySchemes",
|
||||
"get_parameters": "string",
|
||||
"post_parameters": "string"
|
||||
},
|
||||
"docs": {
|
||||
"header": "securitySchemes",
|
||||
"get_parameters": "schema_content",
|
||||
"post_parameters": "schema_content"
|
||||
}
|
||||
}
|
||||
|
|
@ -140,6 +140,25 @@ for lang in variable.keys():
|
|||
if param[method].get("requestBody") is not None:
|
||||
req["requestBody"] = param[method].get("requestBody")
|
||||
|
||||
if variable[lang].get(method + "_parameters") == "schema_content":
|
||||
for p_key in placeholder.data[key.split("/")[-1]].keys():
|
||||
if p_key.lower() == "query":
|
||||
continue
|
||||
req["parameters"].append(
|
||||
{
|
||||
"name": p_key.lower(),
|
||||
"in": "query",
|
||||
"required": True,
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": placeholder_to_yaml(
|
||||
placeholder.data[key.split("/")[-1]][p_key]
|
||||
),
|
||||
},
|
||||
},
|
||||
}
|
||||
)
|
||||
|
||||
if variable[lang].get(method + "_parameters") == "schema_parameters":
|
||||
for p_key in placeholder.data[key.split("/")[-1]].keys():
|
||||
if p_key.lower() == "query":
|
||||
|
|
@ -148,6 +167,7 @@ for lang in variable.keys():
|
|||
{
|
||||
"name": p_key.lower(),
|
||||
"in": "query",
|
||||
"required": True,
|
||||
"schema": placeholder_to_yaml(
|
||||
placeholder.data[key.split("/")[-1]][p_key]
|
||||
),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue