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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user