Merge branch 'master' into pull-request-template
This commit is contained in:
@@ -50,7 +50,7 @@ export const definitions = onlyOAS3(createSelector(
|
|||||||
|
|
||||||
export const securityDefinitions = onlyOAS3(createSelector(
|
export const securityDefinitions = onlyOAS3(createSelector(
|
||||||
spec,
|
spec,
|
||||||
spec => spec.getIn(["components", "securitySchemes"]) || Map()
|
spec => spec.getIn(["components", "securitySchemes"]) || null
|
||||||
))
|
))
|
||||||
|
|
||||||
export const host = OAS3NullSelector
|
export const host = OAS3NullSelector
|
||||||
|
|||||||
@@ -80,7 +80,12 @@ export const parseToJson = (str) => ({specActions, specSelectors, errActions}) =
|
|||||||
}
|
}
|
||||||
|
|
||||||
export const resolveSpec = (json, url) => ({specActions, specSelectors, errActions, fn: { fetch, resolve, AST }, getConfigs}) => {
|
export const resolveSpec = (json, url) => ({specActions, specSelectors, errActions, fn: { fetch, resolve, AST }, getConfigs}) => {
|
||||||
const { modelPropertyMacro, parameterMacro } = getConfigs()
|
const {
|
||||||
|
modelPropertyMacro,
|
||||||
|
parameterMacro,
|
||||||
|
requestInterceptor,
|
||||||
|
responseInterceptor
|
||||||
|
} = getConfigs()
|
||||||
|
|
||||||
if(typeof(json) === "undefined") {
|
if(typeof(json) === "undefined") {
|
||||||
json = specSelectors.specJson()
|
json = specSelectors.specJson()
|
||||||
@@ -93,8 +98,15 @@ export const resolveSpec = (json, url) => ({specActions, specSelectors, errActio
|
|||||||
|
|
||||||
let specStr = specSelectors.specStr()
|
let specStr = specSelectors.specStr()
|
||||||
|
|
||||||
return resolve({fetch, spec: json, baseDoc: url, modelPropertyMacro, parameterMacro })
|
return resolve({
|
||||||
.then( ({spec, errors}) => {
|
fetch,
|
||||||
|
spec: json,
|
||||||
|
baseDoc: url,
|
||||||
|
modelPropertyMacro,
|
||||||
|
parameterMacro,
|
||||||
|
requestInterceptor,
|
||||||
|
responseInterceptor
|
||||||
|
}).then( ({spec, errors}) => {
|
||||||
errActions.clear({
|
errActions.clear({
|
||||||
type: "thrown"
|
type: "thrown"
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
# Add a plugin
|
# Add a plugin
|
||||||
|
|
||||||
### Swagger-UX relies on plugins for all the good stuff.
|
### Swagger-UI relies on plugins for all the good stuff.
|
||||||
|
|
||||||
Plugins allow you to add
|
Plugins allow you to add
|
||||||
- `statePlugins`
|
- `statePlugins`
|
||||||
|
|||||||
@@ -129,7 +129,7 @@ export default class Topbar extends React.Component {
|
|||||||
<div className="topbar">
|
<div className="topbar">
|
||||||
<div className="wrapper">
|
<div className="wrapper">
|
||||||
<div className="topbar-wrapper">
|
<div className="topbar-wrapper">
|
||||||
<Link href="#" title="Swagger UX">
|
<Link href="#">
|
||||||
<img height="30" width="30" src={ Logo } alt="Swagger UI"/>
|
<img height="30" width="30" src={ Logo } alt="Swagger UI"/>
|
||||||
<span>swagger</span>
|
<span>swagger</span>
|
||||||
</Link>
|
</Link>
|
||||||
|
|||||||
Reference in New Issue
Block a user