Merge pull request #4051 from shockey/bug/4040-default-tag
Don't parse non-method path keys as operations
This commit is contained in:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user