Reorganize repo structure and standards references
This commit is contained in:
1 parent
3cb93a81be
commit
be2054274d
5885 files changed
+2588
-195
No files matched your search
+36
@@ -0,0 +1,36 @@
|
||||
import { ApiEndpointDto } from "../dtos/ApiEndpointDto";
|
||||
import { useTranslation } from "react-i18next";
|
||||
import CollapsibleRow from "~/components/ui/tables/CollapsibleRow";
|
||||
import ApiEndpointTitle from "./ApiEndpointTitle";
|
||||
import MonacoEditor from "~/components/editors/MonacoEditor";
|
||||
|
||||
export default function ApiEndpoint({ item }: { item: ApiEndpointDto }) {
|
||||
const { t } = useTranslation();
|
||||
|
||||
return (
|
||||
<div>
|
||||
<CollapsibleRow className="bg-secondary" value={<ApiEndpointTitle item={item} />} title={<ApiEndpointTitle item={item} />}>
|
||||
<div className="space-y-1 overflow-hidden pt-2">
|
||||
<div className="space-y-2">
|
||||
{item.responseSchema && (
|
||||
<>
|
||||
<div className="text-foreground text-sm font-bold">{t("api.docs.responseSchema")}</div>
|
||||
<div className="h-96 overflow-auto p-2">
|
||||
<MonacoEditor value={item.responseSchema} onChange={() => {}} theme="vs-dark" language="json" />
|
||||
</div>
|
||||
</>
|
||||
)}
|
||||
{item.bodyExample && (
|
||||
<>
|
||||
<div className="text-foreground text-sm font-bold">{t("api.docs.bodyExample")}</div>
|
||||
<div className="h-96 overflow-auto p-2">
|
||||
<MonacoEditor value={item.bodyExample} onChange={() => {}} theme="vs-dark" language="json" />
|
||||
</div>
|
||||
</>
|
||||
)}
|
||||
</div>
|
||||
</div>
|
||||
</CollapsibleRow>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
Reference in new issue
Block a user