-
Notifications
You must be signed in to change notification settings - Fork 462
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
ApiModelProperty decorator on a ManyToOne relationship looses type on one side #63
Comments
+1 |
+1
On Thu, Apr 12, 2018 at 5:46 PM, pokkia <notifications@github.com> wrote:
+1
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub [#63 (comment)] , or mute the thread [https://github.com/notifications/unsubscribe-auth/AALr5Ns9vOussq0ifIxH-FchEU1JOrfTks5tnyJqgaJpZM4SkyWv] .
|
this is still present in 5.0.2, also this also affects @OnetoOne type relations as well. Manually specifying a type such as |
I hope this issue can be improved. |
+1 |
This happens because when you have two models that depend on each other, e.g. AccesToken -> User, User -> AccesToken, one of imports will be undefined when the file first runs. In order the resolve this you need to use a function in the same way the This illustrates the problem:
A proposed fix is to wrap the related Model in a callback, the same way that
I already requested a merge on this pull request: #179 (labibramadhan#1) |
Fixed in the Steps to migrate: #355 (comment) |
4.0.0 has been published |
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
I'm submitting a...
Current behavior
When defining a
@ManyToOne
with@ApiModelProperty
the relation type gets lost in swagger definition and is set astype: ''
Expected behavior
Swagger definition contains right type on both ends of relation
Minimal reproduction of the problem with instructions
ends up with swagger definition
What is the motivation / use case for changing the behavior?
@ManyToOne
/@OneToMany
should create correct definitionEnvironment
The text was updated successfully, but these errors were encountered: