Skip to content

Commit

Permalink
Attach opId helper to instance
Browse files Browse the repository at this point in the history
  • Loading branch information
shockey committed May 13, 2017
1 parent 7f6bde9 commit 2f9380e
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import Resolver, {clearCache} from './resolver'
import url from 'url'
import {makeApisTagOperation} from './interfaces'
import {execute, buildRequest, PARAMETER_BUILDERS} from './execute'
import {opId} from './helpers'

Swagger.http = Http
Swagger.makeHttp = makeHttp.bind(null, Swagger.http)
Expand All @@ -16,6 +17,7 @@ Swagger.clearCache = clearCache
Swagger.parameterBuilders = PARAMETER_BUILDERS // Add this to the execute call
Swagger.makeApisTagOperation = makeApisTagOperation
Swagger.buildRequest = buildRequest
Swagger.helpers = {opId}

function Swagger(url, opts = {}) {
// Allow url as a separate argument
Expand Down Expand Up @@ -91,4 +93,4 @@ Swagger.prototype.applyDefaults = function() {
spec.basePath = '/'
}
}
}
}

0 comments on commit 2f9380e

Please sign in to comment.