File tree 1 file changed +25
-0
lines changed
packages/docusaurus-theme-openapi-docs/src/theme/Schema
1 file changed +25
-0
lines changed Original file line number Diff line number Diff line change @@ -747,6 +747,31 @@ const SchemaNode: React.FC<SchemaProps> = ({ schema, schemaType }) => {
747
747
) ;
748
748
}
749
749
750
+ // Handle primitives
751
+ if (
752
+ schema . type &&
753
+ ! schema . oneOf &&
754
+ ! schema . anyOf &&
755
+ ! schema . properties &&
756
+ ! schema . allOf &&
757
+ ! schema . items &&
758
+ ! schema . additionalProperties
759
+ ) {
760
+ const schemaName = getSchemaName ( schema ) ;
761
+ return (
762
+ < SchemaItem
763
+ collapsible = { false }
764
+ name = { schema . type }
765
+ required = { Boolean ( schema . required ) }
766
+ schemaName = { schemaName }
767
+ qualifierMessage = { getQualifierMessage ( schema ) }
768
+ schema = { schema }
769
+ discriminator = { false }
770
+ children = { null }
771
+ />
772
+ ) ;
773
+ }
774
+
750
775
return (
751
776
< div >
752
777
{ schema . oneOf && < AnyOneOf schema = { schema } schemaType = { schemaType } /> }
You can’t perform that action at this time.
0 commit comments