From c5c7339c05dc0b0a10f23baaf3786d297c14126b Mon Sep 17 00:00:00 2001 From: Nick De Villiers Date: Mon, 4 Sep 2023 09:55:13 +0100 Subject: [PATCH] fix(api): Fix openapi documentation display script --- templates/docs/api.html | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/templates/docs/api.html b/templates/docs/api.html index 500a64e9..41da4fc7 100644 --- a/templates/docs/api.html +++ b/templates/docs/api.html @@ -156,12 +156,10 @@

{{tag}}

{%endfor%} {%endif%} {%if "requestBody" in item[endpoint][method]%} - {%if "parameters" not in item[endpoint] and "parameters" not in item[endpoint][method]%} -

Parameters

-
- {%endif%} - {%for property in item[endpoint][method]["requestBody"]["content"]["application/json"]["schema"]["properties"]%} -

{{property}} ({{item[endpoint][method]["requestBody"]["content"]["application/json"]["schema"]["properties"][property]["type"]}}): {%if property in item[endpoint][method]["requestBody"]["content"]["application/json"]["schema"]["required"]%}Required{%else%}Optional{%endif%}. {{item[endpoint][method]["requestBody"]["content"]["application/json"]["schema"]["properties"][property]["description"].replace(" -", "\n -")}}

+

Request body (multipart/form-data)

+
+ {%for property in item[endpoint][method]["requestBody"]["content"]["multipart/form-data"]["schema"]["properties"]%} +

{{property}} ({{item[endpoint][method]["requestBody"]["content"]["multipart/form-data"]["schema"]["properties"][property]["type"]}}): {%if property in item[endpoint][method]["requestBody"]["content"]["multipart/form-data"]["schema"]["required"]%}Required{%else%}Optional{%endif%}. {{item[endpoint][method]["requestBody"]["content"]["multipart/form-data"]["schema"]["properties"][property]["description"].replace(" -", "\n -")}}

{%endfor%} {%endif%}

Responses