fix: documentation on create webhook had invalid body key and headers were not being showed as required (#643)

This commit is contained in:
Shubham Palriwala
2023-08-03 17:18:31 +05:30
committed by GitHub
parent 73904e11a6
commit dba3677633
2 changed files with 9 additions and 2 deletions

View File

@@ -10,6 +10,7 @@ interface APICallProps {
label: string;
type: string;
description: string;
required?: boolean;
}[];
bodies: {
label: string;
@@ -69,7 +70,13 @@ export function APILayout({ method, url, description, headers, bodies, responses
<p className="not-prose -mb-1 pt-2 font-bold">Headers</p>
<div>
{headers.map((q) => (
<Parameter key={q.label} label={q.label} type={q.type} description={q.description} />
<Parameter
key={q.label}
label={q.label}
type={q.type}
description={q.description}
required={q.required}
/>
))}
</div>
</div>

View File

@@ -41,7 +41,7 @@ export const meta = {
]}
example={`{
"url": "https://mysystem.com/myendpoint",
"trigger": "responseFinished"
"triggers": ["responseFinished"]
}`}
responses={[
{