Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Getting your fork up to date #11

Open
wants to merge 10 commits into
base: develop
Choose a base branch
from
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