File tree Expand file tree Collapse file tree 1 file changed +6
-3
lines changed
packages/docusaurus-plugin-openapi-docs/src/markdown Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Original file line number Diff line number Diff line change 77
88import { SchemaObject } from "../openapi/types" ;
99
10- function prettyName ( schema : SchemaObject , circular ?: boolean ) {
10+ function prettyName ( schema : SchemaObject | string , circular ?: boolean ) {
11+ if ( typeof schema === "string" ) {
12+ return schema . startsWith ( "circular(" ) ? schema : "" ;
13+ }
1114 if ( schema . format ) {
1215 if ( schema . type ) {
1316 return `${ schema . type } <${ schema . format } >` ;
@@ -51,10 +54,10 @@ function prettyName(schema: SchemaObject, circular?: boolean) {
5154}
5255
5356export function getSchemaName (
54- schema : SchemaObject ,
57+ schema : SchemaObject | string ,
5558 circular ?: boolean
5659) : string {
57- if ( schema . items ) {
60+ if ( typeof schema !== "string" && schema . items ) {
5861 return prettyName ( schema . items , circular ) + "[]" ;
5962 }
6063
You can’t perform that action at this time.
0 commit comments