Skip to content

Commit a7db7fc

Browse files
committed
assign any to schema with no type
1 parent ac5ff63 commit a7db7fc

1 file changed

Lines changed: 6 additions & 1 deletion

File tree

  • packages/docusaurus-theme-openapi-docs/src/theme/ParamsItem

packages/docusaurus-theme-openapi-docs/src/theme/ParamsItem/index.tsx

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,9 +70,14 @@ function ParamsItem({ param, ...rest }: Props) {
7070
let schema = param.schema;
7171
let defaultValue: string | undefined;
7272

73-
if (!schema || !schema?.type) {
73+
if (!schema) {
7474
schema = { type: "any" };
7575
}
76+
77+
if (!schema.type) {
78+
schema.type = "any";
79+
}
80+
7681
if (schema) {
7782
if (schema.items) {
7883
defaultValue = schema.items.default;

0 commit comments

Comments
 (0)