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 7
7
8
8
import { SchemaObject } from "../openapi/types" ;
9
9
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
+ }
11
14
if ( schema . format ) {
12
15
if ( schema . type ) {
13
16
return `${ schema . type } <${ schema . format } >` ;
@@ -51,10 +54,10 @@ function prettyName(schema: SchemaObject, circular?: boolean) {
51
54
}
52
55
53
56
export function getSchemaName (
54
- schema : SchemaObject ,
57
+ schema : SchemaObject | string ,
55
58
circular ?: boolean
56
59
) : string {
57
- if ( schema . items ) {
60
+ if ( typeof schema !== "string" && schema . items ) {
58
61
return prettyName ( schema . items , circular ) + "[]" ;
59
62
}
60
63
You can’t perform that action at this time.
0 commit comments