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

Bug fixes and some code formatting #12

Open
wants to merge 13 commits into
base: master
Choose a base branch
from
Open

Conversation

poppa
Copy link
Contributor

@poppa poppa commented Sep 14, 2018

  • Commit d87a439 generates a resolve() response for all HTTP OK statues, not only 200. Before this fix a HTTP 202 would end up in reject(), which is wrong.
  • Commit 25a97a8 is a fix for Issue with in-path parameters #10
  • Commit 06234e8 adds a ? after a property in an interface if the property is optional:
    interface MyInterface {
      myRequiredProp: string;
      myOptionalProp?: number;
    }
  • Commit 0cb70b4 does the same as above but for method arguments:
    export class MyClient {
      public static myMethod(requiredArg: number, optionalArg?: string) {}
    }
  • Commit 1141952 is a fix for Add the property inQuery to parameters #11
  • Commit 25a97a8 should probably have a closer look. My guess is that the "1" is intended to make sure the Mustache template is only iterated once? My guess is that that only worked correctly if the very first parameter was inBody, which isn't always the case. This fix could possibly make it possible for multiple .send() calls to be generated. It hasn't happened for me yet though.

Other than that it's mostly cosmetical changes since I find the code style hard to read.

poppa added 13 commits June 24, 2018 11:18
It seemed like the `"1"` in the filter nade the iteration stop afeter one iteration. That led to the code not running if the body parameter wasn't the first parameter.

I hadn't time to figure out exactly how the filterList helper actually works but for my intents and purposed the fix works. It migh break something else though.
This also contains a lot of code formatting since the original code was next to impossible to read.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant