docs: add swagger error codes for /trace/:name/[log|download]

This commit is contained in:
Stefan Strigler 2022-12-02 13:39:58 +01:00
parent 9100b13db6
commit f8dd8d652d
1 changed files with 6 additions and 2 deletions

View File

@ -140,7 +140,8 @@ schema("/trace/:name/download") ->
'application/octet-stream' => 'application/octet-stream' =>
#{schema => #{type => "string", format => "binary"}} #{schema => #{type => "string", format => "binary"}}
} }
} },
404 => emqx_dashboard_swagger:error_codes(['NOT_FOUND'], <<"Trace Name Not Found">>)
} }
} }
}; };
@ -174,7 +175,10 @@ schema("/trace/:name/log") ->
[ [
{items, hoconsc:mk(binary(), #{example => "TEXT-LOG-ITEMS"})}, {items, hoconsc:mk(binary(), #{example => "TEXT-LOG-ITEMS"})},
{meta, fields(bytes) ++ fields(position)} {meta, fields(bytes) ++ fields(position)}
] ],
400 => emqx_dashboard_swagger:error_codes(
['READ_FILE_ERROR', 'RPC_ERROR', 'NODE_ERROR'], <<"Trace Log Failed">>
)
} }
} }
}. }.