Merge pull request #4051 from shockey/bug/4040-default-tag

Don't parse non-method path keys as operations
This commit is contained in:
kyle
2017-12-22 23:39:38 -06:00
committed by GitHub

View File

@@ -4,6 +4,10 @@ import { fromJS, Set, Map, OrderedMap, List } from "immutable"
const DEFAULT_TAG = "default"
const OPERATION_METHODS = [
"get", "put", "post", "delete", "options", "head", "patch", "trace"
]
const state = state => {
return state || Map()
}
@@ -95,6 +99,9 @@ export const operations = createSelector(
return {}
}
path.forEach((operation, method) => {
if(OPERATION_METHODS.indexOf(method) < 0) {
return
}
list = list.push(fromJS({
path: pathName,
method,