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

route.entity can not get entity class in Rails 7.1 #380

Open
hsw15192617273 opened this issue Oct 10, 2023 · 0 comments
Open

route.entity can not get entity class in Rails 7.1 #380

hsw15192617273 opened this issue Oct 10, 2023 · 0 comments

Comments

@hsw15192617273
Copy link

I use grape gem version is that:

grape (~> 1.8)
grape-entity (~> 1.0)
grape-middleware-logger (~> 1.12)
grape-swagger (~> 1.6)
grape-swagger-entity (~> 0.5)

When I use rails 7.1.0, the output of route.entity in grape is #<Class:0x000000010bb66910>.
Xnip2023-10-10_21-01-25

However, when using rails 7.0.8, the output of route.entity becomes the normal V1::Entities::Dev::Haha.
Xnip2023-10-10_21-00-14

All other code is the same except for the change in Rails version.

This leads to an incorrect entity name in the definitions when generating swagger json.
I'm not sure if this is an issue with grape or grape-entity, so I've posted the issue here.

@hsw15192617273 hsw15192617273 changed the title route.entity can not get entity class in Rails 7.1 route.entity can not get entity class in Rails 7.1 Oct 10, 2023
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

No branches or pull requests

1 participant