cancel
Showing results for 
Search instead for 
Did you mean: 

PetStore example

SOLVED
Highlighted
Occasional Visitor

PetStore example

I am looking at the petstore-example. I am struggling to understand how annotations in the Pet.java class affect the openapi.yaml file in any way. My ideal goal would be to only need to update the code one place (in the Pet.java-file) and the, based on annotations in this file, automatically generate the openapi.yaml-file (which I understand is needed for swagger-ui). Is this possible? And can you please give me some help/guidance on this?

1 ACCEPTED SOLUTION

Accepted Solutions
Moderator

Re: PetStore example

Hi @hakonruud ,

 

Java annotations are provided by the Swagger Core library. Check out the Quick start guide and Java annotation examples.

 

In Spring apps you would typically use Springfox or springdoc-openapi which are built on top of Swagger Core.


Helen Kosova
SmartBear Documentation Team Lead
________________________
Did my reply answer your question? Give Kudos or Accept it as a Solution to help others. ⬇️⬇️⬇️

View solution in original post

1 REPLY 1
Moderator

Re: PetStore example

Hi @hakonruud ,

 

Java annotations are provided by the Swagger Core library. Check out the Quick start guide and Java annotation examples.

 

In Spring apps you would typically use Springfox or springdoc-openapi which are built on top of Swagger Core.


Helen Kosova
SmartBear Documentation Team Lead
________________________
Did my reply answer your question? Give Kudos or Accept it as a Solution to help others. ⬇️⬇️⬇️

View solution in original post

New Here?
Join us and watch the welcome video:
Announcements
Top Kudoed Authors