Skip to content

Commit

Permalink
Merge branch 'develop' of https://github.com/luckymarmot/API-Flow int…
Browse files Browse the repository at this point in the history
…o JonathanMontane-fork
  • Loading branch information
Phil Sturgeon committed Dec 6, 2017
2 parents 897505e + 24cc71a commit 376bcf4
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion configs/node/api-flow-config.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import Environment from '../../src/environments/node/Environment'

import SwaggerLoader from '../../src/loaders/swagger/Loader'
import RAMLLoader from '../../src/loaders/raml/Loader'
import RAMLV1Loader from '../../src/loaders/raml/Loader'
import PostmanCollectionV2Loader from '../../src/loaders/postman/v2.0/Loader'

import SwaggerV2Parser from '../../src/parsers/swagger/v2.0/Parser'
Expand Down
2 changes: 1 addition & 1 deletion configs/web/api-flow-config.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ export const loaders = [
export const parsers = [
SwaggerV2Parser,
RAMLV1Parser,
PostmanCollectionV2Parser
PostmanV2Parser
]

export const serializers = [
Expand Down
6 changes: 3 additions & 3 deletions src/serializers/paw/Serializer.js
Original file line number Diff line number Diff line change
Expand Up @@ -1029,12 +1029,12 @@ methods.getContainerFromRequest = (request) => {
* converts an auth into a DynamicString from a reference.
* @param {Store} store: the store to use to resolve the reference
* @param {Reference} reference: the reference to an EnvironmentVariable representing an Auth.
* @returns {DynamicString} the corresponding DynamicString
* @returns {{ variable: DynamicString, auth: Auth }} the corresponding DynamicString
*/
methods.convertAuthFromReference = (store, reference) => {
const variable = store.getIn([ 'auth', reference.get('uuid') ])
const { variable, auth } = store.getIn([ 'auth', reference.get('uuid') ])
const ds = variable.createDynamicString()
return ds
return { variable: ds, auth: auth }
}

/**
Expand Down
4 changes: 2 additions & 2 deletions src/serializers/paw/__tests__/Serializer.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -2010,12 +2010,12 @@ describe('serializers/paw/Serializer.js', () => {
spyOn(variable, 'createDynamicString').andReturn(123)

const store = new Store({
auth: OrderedMap({ a: variable })
auth: OrderedMap({ a: { variable: variable, auth: 'my-auth' } })
})

const ref = new Reference({ uuid: 'a' })

const expected = 123
const expected = { auth: 'my-auth', variable: 123 }
const actual = __internals__.convertAuthFromReference(store, ref)

expect(actual).toEqual(expected)
Expand Down

0 comments on commit 376bcf4

Please sign in to comment.