fix: resolve referenced securitySchemes (via #5028)
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
import { createSelector } from "reselect"
|
||||
import { specJsonWithResolvedSubtrees } from "../../spec/selectors"
|
||||
import { Map } from "immutable"
|
||||
import { isOAS3 as isOAS3Helper, isSwagger2 as isSwagger2Helper } from "../helpers"
|
||||
|
||||
@@ -53,7 +54,7 @@ export const hasHost = onlyOAS3((state) => {
|
||||
})
|
||||
|
||||
export const securityDefinitions = onlyOAS3(createSelector(
|
||||
spec,
|
||||
specJsonWithResolvedSubtrees,
|
||||
spec => spec.getIn(["components", "securitySchemes"]) || null
|
||||
))
|
||||
|
||||
|
||||
@@ -22,6 +22,9 @@ export const updateJsonSpec = (ori, {specActions}) => (...args) => {
|
||||
specActions.requestResolvedSubtree(["paths", k])
|
||||
}
|
||||
})
|
||||
|
||||
// Trigger resolution of any securitySchemes-level $refs.
|
||||
specActions.requestResolvedSubtree(["components", "securitySchemes"])
|
||||
}
|
||||
|
||||
// Log the request ( just for debugging, shouldn't affect prod )
|
||||
|
||||
Reference in New Issue
Block a user