SeaORM generated entities named "Model" conflict when added to OpenAPI spec #862
Unanswered
Jawbone999
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
SeaORM can generate entity files for each database table. It can generate the
Model
structs with additional derives, and I've addedpoem_openapi::Object
to them. I am trying to write a simple set of API routes which return data from the database. However, because each struct is namedModel
, it throws an error at runtime:Minimal Example: https://github.com/Jawbone999/poem-sea-orm-name-conflict
I've tried creating a NewType but it made the code a lot messier and didn't seem to work anyway.
Is it possible to customize the method by which the OpenAPI names are generated? Or automatically prepend them with the module name in cases of conflicts?
Beta Was this translation helpful? Give feedback.
All reactions