Skip to content

Commit

Permalink
fix: openapi-playground updates
Browse files Browse the repository at this point in the history
  • Loading branch information
morlay committed Jan 21, 2025
1 parent 67b3c22 commit 31d822e
Showing 1 changed file with 4 additions and 10 deletions.
14 changes: 4 additions & 10 deletions webapp/openapi-playground/mod/openapi/ResponseView.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -39,10 +39,6 @@ export const ResponseView = component$({
<Token>{"{"}&nbsp;</Token>
<Indent>
{Object.entries(statusErr).map(([key, value]) => {
if (key === "code") {
return null;
}

return (
<Line>
<PropName>{key}</PropName>
Expand Down Expand Up @@ -89,12 +85,10 @@ export const ResponseView = component$({
});

type StatusErr = {
key: string,
msg?: string,
desc?: string,
code: string,
message?: string,
}


// x,v,"c,d" => x v "c,d"
function splitCsv(str: string) {
return str.split(",").reduce((accum, curr: string) => {
Expand Down Expand Up @@ -136,8 +130,8 @@ function parseStatusErr(statusErr: string = ""): StatusErr | null {
[key]: JSON.parse(value)
};
}, {
key: statusErr.slice(0, i)
}) as { key: string, msg?: string, desc?: string };
code: statusErr.slice(0, i)
}) as { code: string, message?: string, [k: string]: any };
}
return null;
}
Expand Down

0 comments on commit 31d822e

Please sign in to comment.