File tree Expand file tree Collapse file tree 4 files changed +56
-1
lines changed Expand file tree Collapse file tree 4 files changed +56
-1
lines changed Original file line number Diff line number Diff line change @@ -118,7 +118,11 @@ export default {
118118 let operationPath = [ "paths" , ...path ]
119119 let metaPath = [ "meta" , "paths" , ...path ]
120120
121- if ( ! state . getIn ( [ "json" , ...operationPath ] ) && ! state . getIn ( [ "resolved" , ...operationPath ] ) ) {
121+ if (
122+ ! state . getIn ( [ "json" , ...operationPath ] )
123+ && ! state . getIn ( [ "resolved" , ...operationPath ] )
124+ && ! state . getIn ( [ "resolvedSubtrees" , ...operationPath ] )
125+ ) {
122126 // do nothing if the operation does not exist
123127 return state
124128 }
Original file line number Diff line number Diff line change 1+ describe ( "bug #4485: operation metadata storage when referenced via path item $ref" , function ( ) {
2+ let mainPage
3+ beforeEach ( function ( client , done ) {
4+ mainPage = client
5+ . url ( "localhost:3230" )
6+ . page . main ( )
7+
8+ client . waitForElementVisible ( ".download-url-input" , 5000 )
9+ . pause ( 2000 )
10+ . clearValue ( ".download-url-input" )
11+ . setValue ( ".download-url-input" , "http://localhost:3230/test-specs/bugs/4485/main.yaml" )
12+ . click ( "button.download-url-button" )
13+ . pause ( 1000 )
14+
15+ done ( )
16+ } )
17+ afterEach ( function ( client , done ) {
18+ done ( )
19+ } )
20+ it ( "sets a consumes value for a body parameter correctly" , function ( client ) {
21+ client . waitForElementVisible ( ".opblock-tag-section" , 10000 )
22+ . click ( ".opblock" )
23+ . waitForElementVisible ( ".opblock-body" , 5000 )
24+ . click ( "button.btn.try-out__btn" )
25+ . click ( "select.content-type [value=\"application/xml\"]" )
26+ . pause ( 500 )
27+ . assert . value ( "select.content-type" , "application/xml" )
28+
29+ client . end ( )
30+ } )
31+ } )
Original file line number Diff line number Diff line change 1+ ---
2+ post :
3+ description : Book
4+ operationId : buy
5+ summary : Buy a book
6+ tags :
7+ - Book
8+ consumes :
9+ - application/json
10+ - application/xml
11+ parameters :
12+ - name : requestBody
13+ in : body
14+ description : Buy a Book
15+ required : true
Original file line number Diff line number Diff line change 1+ ---
2+ swagger : ' 2.0'
3+ paths :
4+ " /v1/book " :
5+ " $ref " : " ./book.yaml"
You can’t perform that action at this time.
0 commit comments