Skip to content

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

@hsw15192617273

Description

@hsw15192617273

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions