Skip to content

Commit 371d3f0

Browse files
committed
fix sample generation
1 parent 8cb0baa commit 371d3f0

9 files changed

Lines changed: 15 additions & 161 deletions

File tree

  • modules/openapi-generator/src/main/resources/kotlin-spring/libraries/spring-declarative-http-interface
  • samples/server/petstore
    • kotlin-spring-declarative-interface-reactive-coroutines
    • kotlin-spring-declarative-interface-reactive-reactor-wrapped
    • kotlin-spring-declarative-interface-wrapped
    • kotlin-spring-declarative-interface
Lines changed: 3 additions & 77 deletions
Original file line numberDiff line numberDiff line change
@@ -1,83 +1,9 @@
1-
{{^interfaceOnly}}
2-
# {{artifactId}}
3-
4-
## Requirements
5-
6-
Building the API client library requires [Maven](https://maven.apache.org/) to be installed.
7-
8-
## Installation
9-
10-
To install the API client library to your local Maven repository, simply execute:
11-
12-
```shell
13-
mvn install
14-
```
15-
16-
To deploy it to a remote Maven repository instead, configure the settings of the repository and execute:
17-
18-
```shell
19-
mvn deploy
20-
```
21-
22-
Refer to the [official documentation](https://maven.apache.org/plugins/maven-deploy-plugin/usage.html) for more information.
23-
24-
### Maven users
25-
26-
Add this dependency to your project's POM:
27-
28-
```xml
29-
<dependency>
30-
<groupId>{{{groupId}}}</groupId>
31-
<artifactId>{{{artifactId}}}</artifactId>
32-
<version>{{{artifactVersion}}}</version>
33-
<scope>compile</scope>
34-
</dependency>
35-
```
36-
37-
### Gradle users
38-
39-
Add this dependency to your project's build file:
40-
41-
```groovy
42-
compile "{{{groupId}}}:{{{artifactId}}}:{{{artifactVersion}}}"
43-
```
44-
45-
### Others
46-
47-
At first generate the JAR by executing:
48-
49-
mvn package
50-
51-
Then manually install the following JARs:
52-
53-
* target/{{{artifactId}}}-{{{artifactVersion}}}.jar
54-
* target/lib/*.jar
55-
{{/interfaceOnly}}
56-
{{#interfaceOnly}}
571
# OpenAPI generated API stub
582

593
Spring Framework stub
604

61-
625
## Overview
636
This code was generated by the [OpenAPI Generator](https://openapi-generator.tech) project.
64-
By using the [OpenAPI-Spec](https://openapis.org), you can easily generate an API stub.
65-
This is an example of building API stub interfaces in Java using the Spring framework.
66-
67-
The stubs generated can be used in your existing Spring-MVC or Spring-Boot application to create controller endpoints
68-
by adding ```@Controller``` classes that implement the interface. Eg:
69-
```java
70-
@Controller
71-
public class PetController implements PetApi {
72-
// implement all PetApi methods
73-
}
74-
```
75-
76-
You can also use the interface to create [Spring-Cloud Feign clients](http://projects.spring.io/spring-cloud/spring-cloud.html#spring-cloud-feign-inheritance).Eg:
77-
```java
78-
@FeignClient(name="pet", url="http://petstore.swagger.io/v2")
79-
public interface PetClient extends PetApi {
80-
81-
}
82-
```
83-
{{/interfaceOnly}}
7+
By using the [OpenAPI-Spec](https://openapis.org).
8+
This generates Spring 6+ declarative HTTP interfaces that can be used to easily instantiate a http client.
9+
```

samples/server/petstore/kotlin-spring-declarative-interface-reactive-coroutines/.openapi-generator/FILES

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
.openapi-generator-ignore
21
README.md
32
build.gradle.kts
43
gradle/wrapper/gradle-wrapper.jar

samples/server/petstore/kotlin-spring-declarative-interface-reactive-coroutines/README.md

Lines changed: 3 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -2,25 +2,8 @@
22

33
Spring Framework stub
44

5-
65
## Overview
76
This code was generated by the [OpenAPI Generator](https://openapi-generator.tech) project.
8-
By using the [OpenAPI-Spec](https://openapis.org), you can easily generate an API stub.
9-
This is an example of building API stub interfaces in Java using the Spring framework.
10-
11-
The stubs generated can be used in your existing Spring-MVC or Spring-Boot application to create controller endpoints
12-
by adding ```@Controller``` classes that implement the interface. Eg:
13-
```java
14-
@Controller
15-
public class PetController implements PetApi {
16-
// implement all PetApi methods
17-
}
18-
```
19-
20-
You can also use the interface to create [Spring-Cloud Feign clients](http://projects.spring.io/spring-cloud/spring-cloud.html#spring-cloud-feign-inheritance).Eg:
21-
```java
22-
@FeignClient(name="pet", url="http://petstore.swagger.io/v2")
23-
public interface PetClient extends PetApi {
24-
25-
}
26-
```
7+
By using the [OpenAPI-Spec](https://openapis.org).
8+
This generates Spring 6+ declarative HTTP interfaces that can be used to easily instantiate a http client.
9+
```

samples/server/petstore/kotlin-spring-declarative-interface-reactive-reactor-wrapped/.openapi-generator/FILES

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
.openapi-generator-ignore
21
README.md
32
build.gradle.kts
43
gradle/wrapper/gradle-wrapper.jar

samples/server/petstore/kotlin-spring-declarative-interface-reactive-reactor-wrapped/README.md

Lines changed: 3 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -2,25 +2,8 @@
22

33
Spring Framework stub
44

5-
65
## Overview
76
This code was generated by the [OpenAPI Generator](https://openapi-generator.tech) project.
8-
By using the [OpenAPI-Spec](https://openapis.org), you can easily generate an API stub.
9-
This is an example of building API stub interfaces in Java using the Spring framework.
10-
11-
The stubs generated can be used in your existing Spring-MVC or Spring-Boot application to create controller endpoints
12-
by adding ```@Controller``` classes that implement the interface. Eg:
13-
```java
14-
@Controller
15-
public class PetController implements PetApi {
16-
// implement all PetApi methods
17-
}
18-
```
19-
20-
You can also use the interface to create [Spring-Cloud Feign clients](http://projects.spring.io/spring-cloud/spring-cloud.html#spring-cloud-feign-inheritance).Eg:
21-
```java
22-
@FeignClient(name="pet", url="http://petstore.swagger.io/v2")
23-
public interface PetClient extends PetApi {
24-
25-
}
26-
```
7+
By using the [OpenAPI-Spec](https://openapis.org).
8+
This generates Spring 6+ declarative HTTP interfaces that can be used to easily instantiate a http client.
9+
```

samples/server/petstore/kotlin-spring-declarative-interface-wrapped/.openapi-generator/FILES

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
.openapi-generator-ignore
21
README.md
32
build.gradle.kts
43
gradle/wrapper/gradle-wrapper.jar

samples/server/petstore/kotlin-spring-declarative-interface-wrapped/README.md

Lines changed: 3 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -2,25 +2,8 @@
22

33
Spring Framework stub
44

5-
65
## Overview
76
This code was generated by the [OpenAPI Generator](https://openapi-generator.tech) project.
8-
By using the [OpenAPI-Spec](https://openapis.org), you can easily generate an API stub.
9-
This is an example of building API stub interfaces in Java using the Spring framework.
10-
11-
The stubs generated can be used in your existing Spring-MVC or Spring-Boot application to create controller endpoints
12-
by adding ```@Controller``` classes that implement the interface. Eg:
13-
```java
14-
@Controller
15-
public class PetController implements PetApi {
16-
// implement all PetApi methods
17-
}
18-
```
19-
20-
You can also use the interface to create [Spring-Cloud Feign clients](http://projects.spring.io/spring-cloud/spring-cloud.html#spring-cloud-feign-inheritance).Eg:
21-
```java
22-
@FeignClient(name="pet", url="http://petstore.swagger.io/v2")
23-
public interface PetClient extends PetApi {
24-
25-
}
26-
```
7+
By using the [OpenAPI-Spec](https://openapis.org).
8+
This generates Spring 6+ declarative HTTP interfaces that can be used to easily instantiate a http client.
9+
```

samples/server/petstore/kotlin-spring-declarative-interface/.openapi-generator/FILES

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
.openapi-generator-ignore
21
README.md
32
build.gradle.kts
43
gradle/wrapper/gradle-wrapper.jar

samples/server/petstore/kotlin-spring-declarative-interface/README.md

Lines changed: 3 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -2,25 +2,8 @@
22

33
Spring Framework stub
44

5-
65
## Overview
76
This code was generated by the [OpenAPI Generator](https://openapi-generator.tech) project.
8-
By using the [OpenAPI-Spec](https://openapis.org), you can easily generate an API stub.
9-
This is an example of building API stub interfaces in Java using the Spring framework.
10-
11-
The stubs generated can be used in your existing Spring-MVC or Spring-Boot application to create controller endpoints
12-
by adding ```@Controller``` classes that implement the interface. Eg:
13-
```java
14-
@Controller
15-
public class PetController implements PetApi {
16-
// implement all PetApi methods
17-
}
18-
```
19-
20-
You can also use the interface to create [Spring-Cloud Feign clients](http://projects.spring.io/spring-cloud/spring-cloud.html#spring-cloud-feign-inheritance).Eg:
21-
```java
22-
@FeignClient(name="pet", url="http://petstore.swagger.io/v2")
23-
public interface PetClient extends PetApi {
24-
25-
}
26-
```
7+
By using the [OpenAPI-Spec](https://openapis.org).
8+
This generates Spring 6+ declarative HTTP interfaces that can be used to easily instantiate a http client.
9+
```

0 commit comments

Comments
 (0)