-
Notifications
You must be signed in to change notification settings - Fork 472
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
Id equal to model name when root is used in Entity #251
Conversation
With my fix, the schema in Swagger-UI would show with the class name from the entity. |
So this was a misunderstanding of the spec? Fix the build please (rubocop), update changelog. |
Yes, it looks like a misunderstanding of the specs, at least for the case in which root is defined in the entities. |
Merged via tim-vandecasteele@834ee01. |
This now breaks my entity references because Should |
I see what you mean, I can put the root logic inside the |
@iangreenleaf and @aitortomas Can you please help resolve this? Lets make sure we don't break backward compatibility or have a way out documented in UPGRADING? |
Looks like #254 is a good fix if we're keeping the root logic. I'm still on the side of removing it, though. @dblock @aitortomas do either of you know why it was added in the first place? I found the commit that introduced it (2747bb2) but I don't know if there's an associated issue and discussion. It seems like the kind of behavior that might be convenient for some apps, but not everyone in general. The fact that I want my output wrapped as Removing this would break backwards compatibility with anyone depending on it, but I think we could work out a simple upgrade path. For example, people who wanted this behavior could redefine def entity_name
super || @root
end |
To answer your question, honestly I don't know the background for this. |
See issue #250