File tree Expand file tree Collapse file tree 4 files changed +40
-2
lines changed Expand file tree Collapse file tree 4 files changed +40
-2
lines changed Original file line number Diff line number Diff line change 3
3
< h2 class ="operation-header sharable-header ">
4
4
< a class ="share-link " href ="#{{operation.anchor}} "> </ a > {{operation.summary}}
5
5
</ h2 >
6
+ < endpoint-link *ngIf ="pathInMiddlePanel "
7
+ [verb] ="operation.verb " [path] ="operation.path "> </ endpoint-link >
6
8
< div class ="operation-tags " *ngIf ="operation.info.tags.length ">
7
9
< a *ngFor ="let tag of operation.info.tags " attr.href ="#tag/{{tag}} "> {{tag}} </ a >
8
10
</ div >
@@ -16,7 +18,8 @@ <h2 class="operation-header sharable-header">
16
18
< div class ="operation-samples ">
17
19
< h4 class ="operation-params-subheader "> Definition</ h4 >
18
20
19
- < endpoint-link [verb] ="operation.verb " [path] ="operation.path "> </ endpoint-link >
21
+ < endpoint-link *ngIf ="!pathInMiddlePanel "
22
+ [verb] ="operation.verb " [path] ="operation.path "> </ endpoint-link >
20
23
21
24
< div >
22
25
< request-samples [pointer] ="pointer " [schemaPointer] ="operation.bodyParam?._pointer ">
Original file line number Diff line number Diff line change 57
57
background : $samples-panel-bg-color ;
58
58
}
59
59
60
+ .operation-samples pre {
61
+ color : $sample-panel-color ;
62
+ }
63
+
60
64
.operation-samples header ,
61
65
.operation-samples > h5 {
62
66
color : $sample-panel-headers-color ;
103
107
padding-bottom : 0 ;
104
108
}
105
109
}
110
+
111
+ .operation-content /deep/ endpoint-link {
112
+ margin-bottom : 16px ;
113
+
114
+ .operation-endpoint [class ] {
115
+ padding : 5px 30px 5px 5px ;
116
+ border : 0 ;
117
+ border-bottom : 1px solid $border-color ;
118
+ border-radius : 0 ;
119
+ background-color : transparent ;
120
+ }
121
+ .operation-api-url-path {
122
+ color : $black ;
123
+ }
124
+
125
+ .expand-icon {
126
+ top : 8px ;
127
+ background-color : $border-color ;
128
+ }
129
+
130
+ .servers-overlay {
131
+ border : 1px solid $border-color ;
132
+ border-top : 0 ;
133
+ }
134
+ }
Original file line number Diff line number Diff line change @@ -35,12 +35,15 @@ export class Operation extends BaseComponent implements OnInit {
35
35
@HostBinding ( 'attr.operation-id' ) operationId ;
36
36
37
37
operation : OperationInfo ;
38
+ pathInMiddlePanel : boolean ;
38
39
39
40
constructor (
40
41
specMgr :SpecManager ,
41
42
private optionsService : OptionsService ,
42
43
private menu : MenuService ) {
43
44
super ( specMgr ) ;
45
+
46
+ this . pathInMiddlePanel = optionsService . options . pathInMiddlePanel ;
44
47
}
45
48
46
49
init ( ) {
Original file line number Diff line number Diff line change @@ -17,7 +17,8 @@ const OPTION_NAMES = new Set([
17
17
'lazyRendering' ,
18
18
'expandResponses' ,
19
19
'requiredPropsFirst' ,
20
- 'noAutoAuth'
20
+ 'noAutoAuth' ,
21
+ 'pathInMiddlePanel' ,
21
22
] ) ;
22
23
23
24
export interface Options {
@@ -31,6 +32,7 @@ export interface Options {
31
32
$scrollParent ?: HTMLElement | Window ;
32
33
requiredPropsFirst ?: boolean ;
33
34
noAutoAuth ?: boolean ;
35
+ pathInMiddlePanel ?: boolean ;
34
36
spec ?: any ;
35
37
}
36
38
@@ -98,6 +100,7 @@ export class OptionsService {
98
100
if ( isString ( this . _options . lazyRendering ) ) this . _options . lazyRendering = true ;
99
101
if ( isString ( this . _options . requiredPropsFirst ) ) this . _options . requiredPropsFirst = true ;
100
102
if ( isString ( this . _options . noAutoAuth ) ) this . _options . noAutoAuth = true ;
103
+ if ( isString ( this . _options . pathInMiddlePanel ) ) this . _options . pathInMiddlePanel = true ;
101
104
if ( isString ( this . _options . expandResponses ) ) {
102
105
let str = this . _options . expandResponses as string ;
103
106
if ( str === 'all' ) return ;
You can’t perform that action at this time.
0 commit comments