Ask Questions and Find Answers
Important:
Ask is now read-only. You can review any existing questions and answers, but not add anything new.
But - don't panic! While ask is no more, we've replaced it with discuss - the new Liferay Discussion Forum! Read more here here or just visit the site here:
discuss.liferay.com
Open API Profiles for Service Builder generated RESTful services
Hi All,
Do web services generated by the Service builder follow OpenAPI spec?
I can use RestBuilder to generate the services with OpenAPI spec but if I need to create a Restful service using Service builder for my custom entity, can I also get an Open API profile for the same or it's not supported due to Contract Last approach in SB.
Regards,
Ankit
Do web services generated by the Service builder follow OpenAPI spec?
I can use RestBuilder to generate the services with OpenAPI spec but if I need to create a Restful service using Service builder for my custom entity, can I also get an Open API profile for the same or it's not supported due to Contract Last approach in SB.
Regards,
Ankit
No, they are seen as two different things.
SB represents your persistence layer. These should be organized under normalization principles (typically 3NF) to minimize storage requirements and maximize db performance.
However, the OpenAPI implementation is typically not going to be built around the same way you store the data. It's the big reason that there are two separate tools, so you get the chance to decouple how your data is stored from how it is best served from an API perspective.
SB represents your persistence layer. These should be organized under normalization principles (typically 3NF) to minimize storage requirements and maximize db performance.
However, the OpenAPI implementation is typically not going to be built around the same way you store the data. It's the big reason that there are two separate tools, so you get the chance to decouple how your data is stored from how it is best served from an API perspective.
Copyright © 2025 Liferay, Inc
• Privacy Policy
Powered by Liferay™