Ask Your Question
2

Can JPA annotations for fields that refer to entities be specified through openapi-generator in Spring?

asked 2023-06-28 20:05:57 +0000

ladyg gravatar image

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
2

answered 2023-06-28 20:27:01 +0000

david gravatar image

No, JPA annotations cannot be specified through openapi-generator in Spring as they are specific to the Java Persistence API (JPA) and are used for mapping Java objects to relational database tables. OpenAPI is a specification for building and describing RESTful APIs, while JPA is a specification for managing relational databases in Java. However, you can use openapi-generator to generate code from an OpenAPI specification and then manually add JPA annotations to the generated code as needed.

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account. This space is reserved only for answers. If you would like to engage in a discussion, please instead post a comment under the question or an answer that you would like to discuss

Add Answer


Question Tools

Stats

Asked: 2023-06-28 20:05:57 +0000

Seen: 10 times

Last updated: Jun 28 '23