Skip to content

Commit 9994996

Browse files
authored
Merge pull request #3815 from swagger-api/swagger-ui/feature/add-oas3-wrapper-for-specSelectors-hasHost
add specSelectors.hasHost for OAS3
2 parents 67c925c + 44361d1 commit 9994996

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/core/plugins/oas3/spec-extensions/wrap-selectors.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,10 @@ export const definitions = onlyOAS3(createSelector(
4848
spec => spec.getIn(["components", "schemas"]) || Map()
4949
))
5050

51+
export const hasHost = onlyOAS3((state) => {
52+
return spec(state).hasIn(["servers", 0])
53+
})
54+
5155
export const securityDefinitions = onlyOAS3(createSelector(
5256
spec,
5357
spec => spec.getIn(["components", "securitySchemes"]) || null

0 commit comments

Comments
 (0)