Nullify Swagger 2.0-specific selectors
This commit is contained in:
@@ -20,6 +20,10 @@ const state = state => {
|
|||||||
return state || Map()
|
return state || Map()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const nullSelector = createSelector(() => null)
|
||||||
|
|
||||||
|
const OAS3NullSelector = onlyOAS3(nullSelector)
|
||||||
|
|
||||||
const specJson = createSelector(
|
const specJson = createSelector(
|
||||||
state,
|
state,
|
||||||
spec => spec.get("json", Map())
|
spec => spec.get("json", Map())
|
||||||
@@ -44,6 +48,11 @@ export const definitions = onlyOAS3(createSelector(
|
|||||||
spec => spec.getIn(["components", "schemas"]) || Map()
|
spec => spec.getIn(["components", "schemas"]) || Map()
|
||||||
))
|
))
|
||||||
|
|
||||||
|
export const host = OAS3NullSelector
|
||||||
|
export const basePath = OAS3NullSelector
|
||||||
|
export const consumes = OAS3NullSelector
|
||||||
|
export const produces = OAS3NullSelector
|
||||||
|
|
||||||
// New selectors
|
// New selectors
|
||||||
|
|
||||||
export const isOAS3 = (ori, system) => () => {
|
export const isOAS3 = (ori, system) => () => {
|
||||||
|
|||||||
Reference in New Issue
Block a user