Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
jbellmann committed Feb 28, 2017
2 parents 905e6a3 + 60f6bdc commit 7249d00
Show file tree
Hide file tree
Showing 38 changed files with 32 additions and 630 deletions.
37 changes: 4 additions & 33 deletions README.md
Expand Up @@ -7,10 +7,12 @@
[![License](https://img.shields.io/hexpm/l/plug.svg)](https://raw.githubusercontent.com/zalando-stups/swagger-codegen-tooling/master/LICENSE)


The project provides some tooling around Maven and Gradle to generate code from OpenAPI-Specs. It comes with custom-templates to support Spring-MVC/Spring-Boot projects. Instead of generating code only once when a project starts (design phase), code will be generated at every build to make sure your code is in sync with
The project provides some tooling around Maven and Gradle* to generate code from OpenAPI-Specs. It comes with custom-templates to support Spring-MVC/Spring-Boot projects. Instead of generating code only once when a project starts (design phase), code will be generated at every build to make sure your code is in sync with
your spec. So controllers/resources are generated as interfaces developers have to implement then. So changes
in the spec should be reflected immediately on build/compile-step.

* The Gradle plugin moved to its own repository at [zalando-incubator](https://github.com/zalando-incubator/swagger-codegen-gradle-plugin/)

#### Getting started with Maven

To get started in a Maven project just add the following plugin-definition to you pom.xml.
Expand Down Expand Up @@ -41,36 +43,6 @@ According to your OpenAPI-spec (api.yaml) code will be generated in `${basedir}/

More examples how to use the Maven-Plugin can be found in the [integration-test](https://github.com/zalando-stups/swagger-codegen-tooling/tree/master/swagger-codegen-maven-plugin/src/it) section.

#### Getting started with Gradle

To get started in a Gradle project, make sure the following configuration is present in your `build.gradle`

```
apply plugin: 'java'
apply plugin: 'swagger-codegen'
buildscript {
repositories {
mavenCentral()
}
dependencies {
classpath 'org.zalando.stups:swagger-codegen-gradle-plugin:${version}'
}
}
swaggerCodegen {
apiFile 'src/main/swagger-codegen/kio-api.yaml'
language 'jaxrsinterfaces'
apiPackage 'com.example.project.api'
modelPackage 'com.example.project.model'
}
...
```

NOTE: The Swagger-Codegen-Gradle-Plugin is currently in development. So be prepared for changes.

### Development/Contribution


Expand All @@ -86,7 +58,6 @@ The project itself uses Maven:

#### TODO's

* improve robustness for Gradle-Plugin
* improve Templates (what about [Controllers that delegate to an interface](https://github.com/zalando-stups/swagger-codegen-tooling/issues/32))
* improve documentation
* prepare an example that uses [spring-restdocs](https://projects.spring.io/spring-restdocs)
Expand All @@ -101,7 +72,7 @@ Many thanks to [ePaul](https://github.com/ePaul) for reporting issues and code-c

## License

Copyright 2015 Zalando SE
Copyright 2015-2017 Zalando SE

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
Expand Down
5 changes: 1 addition & 4 deletions pom.xml
Expand Up @@ -18,9 +18,6 @@
<module>swagger-codegen-common</module>
<module>swagger-codegen-templates</module>
<module>swagger-codegen-maven-plugin</module>
<!--
<module>swagger-codegen-gradle-plugin</module>
-->
<module>docs</module>
<module>spring-boot-stups-swagger-codegen-ui</module>
</modules>
Expand Down Expand Up @@ -75,4 +72,4 @@
</plugins>
</pluginManagement>
</build>
</project>
</project>
1 change: 0 additions & 1 deletion swagger-codegen-gradle-plugin/README.md

This file was deleted.

Binary file not shown.
Binary file not shown.
84 changes: 0 additions & 84 deletions swagger-codegen-gradle-plugin/pom.xml

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

0 comments on commit 7249d00

Please sign in to comment.