Skip to content
This repository was archived by the owner on Jan 19, 2024. It is now read-only.

Conversation

@nestor-diaz
Copy link
Contributor

There is a minor issue that's causing an error executing root resources defined with path params.

Considering this path /{user}, the resulted client is:

class Client {
  ...
  
  user(uriParams) {
    return new User(
      this.client,
      this.path + template('/{user}',
        Object.assign({}, uriParams))
    );
  }
}

Despite user method is defined within Client class, the User class is instantiated with this.client. Such property isn't defined inside Client and in fact, based on the logic, it expects a instance of Client so just providing this fixes the issue.

After applying the fix, that portion of code looks like this:

class Client {
  ...
  
  user(uriParams) {
    return new User(
      this,
      this.path + template('/{user}',
        Object.assign({}, uriParams))
    );
  }
}

}

return `${methodName}`;
}).join('.') + `.${camelCase(method.method)}([${type}, [options]])`;
Copy link
Contributor Author

@nestor-diaz nestor-diaz Oct 27, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I had to make this change because TSLint failed due to this string concatenation, it expects template literals.

}
};

return JSON.stringify(json, null, 2) + '\n';
Copy link
Contributor Author

@nestor-diaz nestor-diaz Oct 27, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I had to make this change because TSLint failed due to this string concatenation, it expects template literals.


if (scheme.type === 'OAuth 2.0') {
this.buffer.return();
this.buffer.line('// eslint-disable-next-line');
Copy link
Contributor Author

@nestor-diaz nestor-diaz Oct 27, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I had to make this change because TSLint failed due to it expects two indentation spaces

@@ -1,3 +1,5 @@
dist: trusty
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Travis CI was failing, after researching a bit I found that dist: trusty is needed if xvfb is used directly.

Doc: https://docs.travis-ci.com/user/gui-and-headless-browsers/#using-xvfb-directly

@nachoesmite nachoesmite merged commit eb7ef4c into mulesoft-labs:master Oct 28, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants