File tree Expand file tree Collapse file tree 2 files changed +27
-1
lines changed Expand file tree Collapse file tree 2 files changed +27
-1
lines changed Original file line number Diff line number Diff line change @@ -26,6 +26,8 @@ export default class ObjectModel extends Component {
2626 return null
2727 }
2828
29+ const { showExtensions } = getConfigs ( )
30+
2931 let description = schema . get ( "description" )
3032 let properties = schema . get ( "properties" )
3133 let additionalProperties = schema . get ( "additionalProperties" )
@@ -99,6 +101,30 @@ export default class ObjectModel extends Component {
99101 </ tr > )
100102 } ) . toArray ( )
101103 }
104+ {
105+ // empty row befor extensions...
106+ ! showExtensions ? null : < tr > </ tr >
107+ }
108+ {
109+ ! showExtensions ? null :
110+ schema . entrySeq ( ) . map (
111+ ( [ key , value ] ) => {
112+ if ( key . slice ( 0 , 2 ) !== "x-" ) {
113+ return
114+ }
115+
116+ const normalizedValue = ! value ? null : value . toJS ? value . toJS ( ) : value
117+
118+ return ( < tr key = { key } style = { { color : "#777" } } >
119+ < td >
120+ { key }
121+ </ td >
122+ < td style = { { verticalAlign : "top" } } >
123+ { JSON . stringify ( normalizedValue ) }
124+ </ td >
125+ </ tr > )
126+ } ) . toArray ( )
127+ }
102128 {
103129 ! additionalProperties || ! additionalProperties . size ? null
104130 : < tr >
Original file line number Diff line number Diff line change 1919
2020 & :first-of-type
2121 {
22- width : 124 px ;
22+ width : 174 px ;
2323 padding : 0 0 0 2em ;
2424 }
2525 }
You can’t perform that action at this time.
0 commit comments