I can use
<dependency> <groupId>io.swagger.codegen.v3</groupId> <artifactId>swagger-codegen-maven-plugin</artifactId> <version>${swagger-codegen-maven-plugin.version}</version> </dependency>to create a UI (TypeScript) and back end (Java) models from the swagger-ui.yml file (manually written) - I do not want Swagger to generate endpoints (I want to write them in Java).
I can also access a new Swagger file at runtime with springfox-swagger2 + springfox-swagger-ui (2.9.2)
<dependency> <groupId>io.springfox</groupId> <artifactId>springfox-swagger2</artifactId> <version>2.9.2</version> </dependency> <dependency> <groupId>io.springfox</groupId> <artifactId>springfox-swagger-ui</artifactId> <version>2.9.2</version> </dependency>
I want to write everything in Java (models and endpoints), and then somehow generate swagger-ui.yml from Java, and then generate TypeScript models from that swagger-ui.yml file (like I can with swagger.codegen), though I was unsuccessful with combining these two approaches. Or is there some other way (other dependencies, etc.) to do this? I also need the Swagger file to include endpoints documentation, like using springfox-swagger-ui. (I am using Maven, spring-boot-starter-web, Java 8, Angular 13.)