Well, you can use the tools inside swagger-core (https://github.com/swagger-api/swagger-core <https://github.com/swagger-api/swagger-core>) to turn a POJO into JSON or YAML, but that tool is typically used to convert an entire API into JSON or YAML. To get just a single model converted, take a look at the swagger-core module inside the project, there are tests that convert single POJOs into the swagger format.
Tony > On Jan 15, 2017, at 9:56 PM, sanjeewa malalgoda <[email protected]> wrote: > > Hi All, > I'm working on swagger yaml/json generation for new REST API framework. I > have java object which represent complete service definition including all > annotations. > Now i wanted to generate swagger yaml,json from that model. Can anyone point > me where i can start with. > Do we have swagger writer or swagger bean object which we can use to generate > yaml file. I looked at swagger codegen project and i need to do opposite of > that. > > Thanks, > sanjeewa. > > -- > You received this message because you are subscribed to the Google Groups > "Swagger" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected] > <mailto:[email protected]>. > For more options, visit https://groups.google.com/d/optout > <https://groups.google.com/d/optout>. -- You received this message because you are subscribed to the Google Groups "Swagger" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.
