ContributionsMost RecentMost LikesSolutionsRe: How to set default values into Swagger form Hi Frank. I think you need to use the example property. parameters: - in: query name: status schema: type: string enum: [approved, pending, closed, new] example: approved You can find more information in this link: https://swagger.io/docs/specification/adding-examples/ Have a nice day. Re: Swagger: How to stub REST service with Java code/annotations Thispice of code might be helpful for your question. @GET @Path("/findByStatus") @ApiOperation(value = "Finds Pets by status", notes = "Multiple status values can be provided with comma seperated strings", response = Pet.class, responseContainer = "List") public Response findPetsByStatus(...) { ... } In the response parameter you can put a class, in your case: MyObject.class. You can also add metadata to your model, with the@ApiModelProperty annotation,in class and parameters level. @ApiModel(value="DifferentModel", description="Sample model for the documentation") class OriginalModel {...} @ApiModelProperty(value = "pet status in the store", allowableValues = "available,pending,sold") public String getStatus() { return status; } You can see other useful annotations in this link:Wiki Annotations I hope this info can help you to solve your doubts and don't hesitate in ask again if this doesn't work for you. Have a nice day! Re: Creating OpenAPI definition from Java code Hello. You can add annotations to your java classes,and thenyou will be able to generate the OpenAPI Specification. In this wiki address you will find some samples: https://github.com/swagger-api/swagger-core/wiki/Swagger-2.X---Annotations If you haven't integrated Swagger to your project you need to do it, but it will depend on the Api Implementation you are using, you can see this samples: Resteasy:https://github.com/swagger-api/swagger-core/wiki/Swagger-Core-RESTEasy-2.X-Project-Setup-1.5 Jersey:https://github.com/swagger-api/swagger-core/wiki/Swagger-Core-RESTEasy-2.X-Project-Setup-1.5 Spring:https://github.com/ralphdoe/opentech If you have any questions, don't hesitate to contact us. Have a nice day!