code: function addLocation (state) {
    state.results.forEach(endpoint => {
      const isQueryRequest = ['GET', 'HEAD'].includes(endpoint.method)
      const urlParameterNames = (endpoint.path.match(/:\w+/g) || []).map(name => name.substr(1))
      endpoint.params.forEach(result => {
        if (urlParameterNames.includes(result.name)) {
          result.location = 'url'
          return
        }
  
        // Only few endpoints define request headers
        // - https://developer.github.com/v3/repos/releases/#upload-a-release-asset (Content-Type, Content-Length)
        // - https://developer.github.com/v3/markdown/#render-a-markdown-document-in-raw-mode (Content-Type)
        if (['Content-Type', 'Content-Length'].includes(result.name)) {
          result.location = 'headers'
          return
        }
  
        // Some endpoints have incorrect pagination headers, this is being worked on by GitHub.
        // e.g. if https://developer.github.com/v3/projects/#create-a-repository-project no longer
        // shows Link: <https://api.github.com/resource?page=2>; rel="next", in theresponse,
        // this can be removed
        if (['page', 'per_page'].includes(result.name)) {
          result.location = 'query'
          return
        }
  
        result.location = isQueryRequest ? 'query' : 'body'
      })
    })
  }
docs: parameters can be sent in 4 different locations 1. URL (when path contains ":<parameter name>") 2. Query parameter (GET or HEAD) 3. Request body (not GET or HEAD) 4. Header