UNPKG

docusaurus-plugin-openapi-docs

Version:

OpenAPI plugin for Docusaurus.

33 lines (29 loc) 796 B
/* ============================================================================ * 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 { create } from "./utils"; import { MediaTypeObject } from "../openapi/types"; interface Props { style?: any; title: string; body: { content?: { [key: string]: MediaTypeObject; }; description?: string; required?: string[] | boolean; }; } export function createRequestSchema({ title, body, ...rest }: Props) { return [ create("RequestSchema", { title: title, body: body, ...rest, }), "\n\n", ]; }