Forum Discussion

noittom's avatar
noittom
New Contributor
5 years ago

Convert OpenAPI object into Json

Hi, I want to publish OpenAPI json via Rest by myself . I managed to get openApi based on my Java code, now I =need to get json - how to do it ?   i.e. OpenAPI oas = new OpenAPI(); Info info = n...
  • noittom's avatar
    5 years ago

    apparently you can do it like this:

    Json.prettyPrint(o);

    so in total there is a nice way to get openAPI for your code in your java program