Merge pull request #3815 from swagger-api/swagger-ui/feature/add-oas3-wrapper-for-specSelectors-hasHost

add specSelectors.hasHost for OAS3
This commit is contained in:
kyle
2017-11-03 14:25:55 -07:00
committed by GitHub

View File

@@ -48,6 +48,10 @@ export const definitions = onlyOAS3(createSelector(
spec => spec.getIn(["components", "schemas"]) || Map()
))
export const hasHost = onlyOAS3((state) => {
return spec(state).hasIn(["servers", 0])
})
export const securityDefinitions = onlyOAS3(createSelector(
spec,
spec => spec.getIn(["components", "securitySchemes"]) || null