OpenApi 3.0.3 code gen for Java Backend question

I have recently started to look at OpenApi code generator and I have a few questions that I couldn’t find an answer to with the usual resources (google and documentation mostly).

What I want to generate via the components.yaml and the code generator:

  1. An interface with a couple of methods (lets just say getters and setters for example)
  2. Have several model like classes that implement this interface

After several hours of trying to accomplish this I have the following questions:

  • For item 1: Is this even possible with the code generator? If so can I do it without custom mustache templates and how?
  • Still for item 1: If mustache template is the only way to go, how can I make sure the object that I defined in components.yaml can point to that specific custom template.
  • For item 2: How do I make sure that the generated code for the model-like class implements the previously generated interface? Is there a specific key for components.yaml that allows me to do this?

Any help would be greatly appreciated!

Read more here: Source link