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

Improve Spring support #438

Merged
merged 4 commits into from
Nov 13, 2019
Merged

Conversation

RobbinBaauw
Copy link
Contributor

This will improve Spring support a lot. Closes #437.

The following cases are improved:

  • Generics resolving in both the return type and method arguments. I did this by switching from the Spring resolver to Typescript Generator's own generic resolver. This also fixed the fact that enum mapping didn't yet work (Map from enum #421)
  • PathVariable being string when used without value. In Spring it is possible to use PathVariable without a value if the URI part is the same as the variable name. Now this wasn't checked, leading to PathVariables which were string (default) instead of the required type
  • Inheritance giving double methods (could be useful for JAX-Rs too), I did this by looking in the inheritance chain and looking which methods override other methods and add a RequestMapping annotation. If they do that, use it, else use the method of the child type.

Fixed the following:
- Generics resolving in both the return type and method arguments
- PathVariable being string when used without value
- Inheritance giving double methods (could be useful for JAX-Rs too)
@vojtechhabarta
Copy link
Owner

Thank you very much for this pull request and description of changes.
I went briefly through changes and it looks very useful, Spring support in typescript-generator will be more consistent with Spring behavior.

@vojtechhabarta vojtechhabarta merged commit c1d2f8b into vojtechhabarta:master Nov 13, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Merging JAX-Rs and Spring functionality
2 participants