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

Propagate type arguments #461

Merged
merged 5 commits into from
Sep 5, 2019
Merged

Propagate type arguments #461

merged 5 commits into from
Sep 5, 2019

Conversation

WoH
Copy link
Collaborator

@WoH WoH commented Sep 4, 2019

All Submissions:

  • Have you followed the guidelines in our Contributing document?
  • Have you checked to ensure there aren't other open Pull Requests for the same update/change?
  • Have you written unit tests?
  • Have you written unit tests that cover the negative cases (i.e.: if bad data is submitted, does the library respond properly)?
  • This PR is associated with an existing issue?

Closing issues

If this is a new feature submission:

  • Has the issue had a maintainer respond to the issue and clarify that the feature is something that aligns with the goals and philosophy of the project?

Please comment if handling Models with multiple type parameters is not something you want to support and I'll throw on that :)

Potential Problems With The Approach

This PR assumes the scope of the type arguments has been checked by typescript (which is reasonable I think).

Edit: I don't like the implementation, but it's a lot less bad :/

Test plan

I'm sure there are millions of possible scenarios we want to spec here, I have no clue what to cover yet, I intend to keep this a draft until this section is less depressing to read.

@dgreene1
Copy link
Collaborator

dgreene1 commented Sep 5, 2019

Looks good to me @WoH. I think the only thing that's confusing is that I can't find the line where this.context is set for the first time.

As far as tests cases go, I'm fine if we just copy the examples from the two issues you referenced.

@ryankeener
Copy link
Contributor

@WoH this fixes the issue I was seeing, thanks!

@dgreene1 it's getting initialized in the constructor, no?

@dgreene1
Copy link
Collaborator

dgreene1 commented Sep 5, 2019

I see that it's initialized in the constructor but I was wondering if the consuming module sends in the context. I don’t think it does. I think it's the TypeResolver itself when it constructs another TypeResolver.

@WoH WoH marked this pull request as ready for review September 5, 2019 17:49
@dgreene1 dgreene1 merged commit 13d856e into lukeautry:master Sep 5, 2019
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.

Swagger not showing intersection model properly Support generic type parameter and return type
3 participants