openapi

How to generate, compile, jar, and depend on a gradle module

人走茶凉 提交于 2021-01-03 16:08:03
问题 I have a Java Gradle project that uses an OpenAPI specified API. I've used the org.openapi.generator plugin which generates sources as well as a complete Gradle module. I expect that there's a way to define the generate, compile, jar steps such that I can have other modules depend on the generated module. I.e. # api/build.gradle: plugins { id 'java' id "org.openapi.generator" version "5.0.0" } repositories { mavenCentral() } dependencies { testImplementation group: 'junit', name: 'junit',

How to generate, compile, jar, and depend on a gradle module

做~自己de王妃 提交于 2021-01-03 15:59:50
问题 I have a Java Gradle project that uses an OpenAPI specified API. I've used the org.openapi.generator plugin which generates sources as well as a complete Gradle module. I expect that there's a way to define the generate, compile, jar steps such that I can have other modules depend on the generated module. I.e. # api/build.gradle: plugins { id 'java' id "org.openapi.generator" version "5.0.0" } repositories { mavenCentral() } dependencies { testImplementation group: 'junit', name: 'junit',

How to generate, compile, jar, and depend on a gradle module

瘦欲@ 提交于 2021-01-03 15:58:30
问题 I have a Java Gradle project that uses an OpenAPI specified API. I've used the org.openapi.generator plugin which generates sources as well as a complete Gradle module. I expect that there's a way to define the generate, compile, jar steps such that I can have other modules depend on the generated module. I.e. # api/build.gradle: plugins { id 'java' id "org.openapi.generator" version "5.0.0" } repositories { mavenCentral() } dependencies { testImplementation group: 'junit', name: 'junit',

Open API 3 - add headers on individual content-type in responses

你离开我真会死。 提交于 2021-01-03 06:52:24
问题 I have my spec which have a path with a 200 response code, that response code can access multiple content-types, I want to add the Content-Disposition Header to one of those content-types. Here's a sample: openapi: '3.0.3' info: ... servers: ... paths: /examples: ... get: ... responses: '200': content: application/json: ... application/pdf: encoding: file: headers: Content-Disposition: schema: type: string example: attachment; filename="name.pdf" examples: file: summary: File externalValue:

Open API 3 - add headers on individual content-type in responses

↘锁芯ラ 提交于 2021-01-03 06:50:07
问题 I have my spec which have a path with a 200 response code, that response code can access multiple content-types, I want to add the Content-Disposition Header to one of those content-types. Here's a sample: openapi: '3.0.3' info: ... servers: ... paths: /examples: ... get: ... responses: '200': content: application/json: ... application/pdf: encoding: file: headers: Content-Disposition: schema: type: string example: attachment; filename="name.pdf" examples: file: summary: File externalValue:

Open API 3 - add headers on individual content-type in responses

点点圈 提交于 2021-01-03 06:49:58
问题 I have my spec which have a path with a 200 response code, that response code can access multiple content-types, I want to add the Content-Disposition Header to one of those content-types. Here's a sample: openapi: '3.0.3' info: ... servers: ... paths: /examples: ... get: ... responses: '200': content: application/json: ... application/pdf: encoding: file: headers: Content-Disposition: schema: type: string example: attachment; filename="name.pdf" examples: file: summary: File externalValue:

Open API 3 - add headers on individual content-type in responses

生来就可爱ヽ(ⅴ<●) 提交于 2021-01-03 06:48:01
问题 I have my spec which have a path with a 200 response code, that response code can access multiple content-types, I want to add the Content-Disposition Header to one of those content-types. Here's a sample: openapi: '3.0.3' info: ... servers: ... paths: /examples: ... get: ... responses: '200': content: application/json: ... application/pdf: encoding: file: headers: Content-Disposition: schema: type: string example: attachment; filename="name.pdf" examples: file: summary: File externalValue:

Reference external file (openapi spec) from gradle plugin (openapitools generator)

核能气质少年 提交于 2021-01-01 06:24:52
问题 I am attempting to build an application that references an openapi spec that is already published in artifactory. That means I'll be pulling the foo.yaml in as a dependency, but I can't seem to figure out how to actually reference that file by the openapitools generator plugin. Given that openapi specs can be used to generate both server code and client code, it makes perfect sense that it is published separately and simply pulled in and referenced by implementations. com.company.bar-1.0.10

Migrating from springfox swagger2 to springdoc openapi

雨燕双飞 提交于 2020-12-29 05:41:52
问题 https://www.dariawan.com/tutorials/spring/documenting-spring-boot-rest-api-springdoc-openapi-3/ Trying to follow these How do I deal with annotations like @ApiModel(value = "Response container") @ApiModelProperty(value = "Iventory response", required = true) 回答1: Migrating from SpringFox Remove springfox and swagger 2 dependencies. Add springdoc-openapi-ui dependency instead. <dependency> <groupId>org.springdoc</groupId> <artifactId>springdoc-openapi-ui</artifactId> <version>@springdoc

Migrating from springfox swagger2 to springdoc openapi

走远了吗. 提交于 2020-12-29 05:41:35
问题 https://www.dariawan.com/tutorials/spring/documenting-spring-boot-rest-api-springdoc-openapi-3/ Trying to follow these How do I deal with annotations like @ApiModel(value = "Response container") @ApiModelProperty(value = "Iventory response", required = true) 回答1: Migrating from SpringFox Remove springfox and swagger 2 dependencies. Add springdoc-openapi-ui dependency instead. <dependency> <groupId>org.springdoc</groupId> <artifactId>springdoc-openapi-ui</artifactId> <version>@springdoc