Skip to content

Commit 44361d1

Browse files
committed
add specSelectors.hasHost for OAS3
1 parent 67c925c commit 44361d1

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)