docusaurus-plugin-openapi-docs
Version:
OpenAPI plugin for Docusaurus.
25 lines (21 loc) • 721 B
text/typescript
/* ============================================================================
* Copyright (c) Palo Alto Networks
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
* ========================================================================== */
import { createRequestSchema } from "./createRequestSchema";
import { MediaTypeObject } from "../openapi/types";
interface Props {
title: string;
body: {
content?: {
[key: string]: MediaTypeObject;
};
description?: string;
required?: boolean;
};
}
export function createRequestBodyDetails({ title, body }: Props) {
return createRequestSchema({ title, body });
}