File tree Expand file tree Collapse file tree 3 files changed +25
-1
lines changed
gitbook/src/components/DocumentView/OpenAPI Expand file tree Collapse file tree 3 files changed +25
-1
lines changed Original file line number Diff line number Diff line change
1
+ ---
2
+ " @gitbook/react-openapi " : patch
3
+ " gitbook " : patch
4
+ ---
5
+
6
+ OpenAPI: Make responses without objects clickable
Original file line number Diff line number Diff line change 565
565
}
566
566
567
567
.openapi-example-empty {
568
- @apply relative text-tint bg-tint min-h-20 flex flex-col justify-center items-center;
568
+ @apply relative text-tint min-h-20 flex flex-col justify-center items-center text-sm ;
569
569
}
570
570
571
571
/* Common Elements */
@@ -746,6 +746,10 @@ body:has(.openapi-select-popover) {
746
746
@apply px-3 transition-all;
747
747
}
748
748
749
+ .openapi-disclosure-group-trigger [aria-expanded = "true" ] > .openapi-disclosure-group-label {
750
+ @apply font-medium;
751
+ }
752
+
749
753
.openapi-disclosure-group-trigger [aria-expanded = "true" ] > .openapi-disclosure-group-icon > svg {
750
754
@apply rotate-90;
751
755
}
Original file line number Diff line number Diff line change @@ -50,6 +50,20 @@ export function OpenAPIResponses(props: {
50
50
] ;
51
51
}
52
52
53
+ if ( ! response . content ) {
54
+ return [
55
+ {
56
+ key : 'default' ,
57
+ label : '' ,
58
+ body : (
59
+ < pre className = "openapi-example-empty" >
60
+ < p > { t ( context . translation , 'no_content' ) } </ p >
61
+ </ pre >
62
+ ) ,
63
+ } ,
64
+ ] ;
65
+ }
66
+
53
67
return Object . entries ( response . content ?? { } ) . map ( ( [ contentType , mediaType ] ) => ( {
54
68
key : contentType ,
55
69
label : contentType ,
You can’t perform that action at this time.
0 commit comments