File tree Expand file tree Collapse file tree 3 files changed +5
-3
lines changed
components/DocumentView/utils Expand file tree Collapse file tree 3 files changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -92,6 +92,7 @@ const getBlockHeight = memoize((block: DocumentBlock | undefined): number => {
92
92
case 'images' :
93
93
case 'image' :
94
94
case 'swagger' :
95
+ case 'openapi-operation' :
95
96
return 768 / ( 16 / 9 ) ;
96
97
case 'file' :
97
98
case 'expandable' :
Original file line number Diff line number Diff line change @@ -37,7 +37,7 @@ export async function getDocumentSections(
37
37
} ) ;
38
38
}
39
39
40
- if ( block . type === 'swagger' && block . meta ?. id ) {
40
+ if ( ( block . type === 'swagger' || block . type === 'openapi-operation' ) && block . meta ?. id ) {
41
41
const { data : operation } = await resolveOpenAPIBlock ( {
42
42
block,
43
43
context,
Original file line number Diff line number Diff line change @@ -22,7 +22,7 @@ export function hasFullWidthBlock(document: JSONDocument): boolean {
22
22
if ( node . data && 'fullWidth' in node . data && node . data . fullWidth ) {
23
23
return true ;
24
24
}
25
- if ( node . type === 'swagger' ) {
25
+ if ( node . type === 'swagger' || node . type === 'openapi-operation' ) {
26
26
return true ;
27
27
}
28
28
}
@@ -120,7 +120,8 @@ export function getBlockTitle(block: DocumentBlock): string {
120
120
return block . data . title ?? '' ;
121
121
}
122
122
123
- case 'swagger' : {
123
+ case 'swagger' :
124
+ case 'openapi-operation' : {
124
125
return `${ block . data . method ?. toUpperCase ( ) } ${ block . data . path } ` ;
125
126
}
126
127
default :
You can’t perform that action at this time.
0 commit comments