You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@brooklyn.apache.org by sj...@apache.org on 2015/12/11 13:39:59 UTC
[09/15] incubator-brooklyn git commit: Generate Swagger API
Specification using a maven plugin
Generate Swagger API Specification using a maven plugin
- combined with https://github.com/swagger-api/swagger-codegen, it can generate rest bindings for multiple languages
Project: http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/commit/812c5bdb
Tree: http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/tree/812c5bdb
Diff: http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/diff/812c5bdb
Branch: refs/heads/master
Commit: 812c5bdbc4d1aeb51d563e74187123932d3a594a
Parents: d58d503
Author: Andrea Turli <an...@gmail.com>
Authored: Thu Dec 10 15:53:32 2015 +0100
Committer: Andrea Turli <an...@gmail.com>
Committed: Fri Dec 11 12:38:53 2015 +0100
----------------------------------------------------------------------
usage/rest-api/pom.xml | 46 +++++++++++++++++++++++++++++++++++++++++++--
1 file changed, 44 insertions(+), 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/blob/812c5bdb/usage/rest-api/pom.xml
----------------------------------------------------------------------
diff --git a/usage/rest-api/pom.xml b/usage/rest-api/pom.xml
index bc54587..81306e5 100644
--- a/usage/rest-api/pom.xml
+++ b/usage/rest-api/pom.xml
@@ -7,9 +7,9 @@
to you under the Apache License, Version 2.0 (the
"License"); you may not use this file except in compliance
with the License. You may obtain a copy of the License at
-
+
http://www.apache.org/licenses/LICENSE-2.0
-
+
Unless required by applicable law or agreed to in writing,
software distributed under the License is distributed on an
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
@@ -98,4 +98,46 @@
</dependency>
</dependencies>
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>com.github.kongchen</groupId>
+ <artifactId>swagger-maven-plugin</artifactId>
+ <version>3.1.0</version>
+ <configuration>
+ <apiSources>
+ <apiSource>
+ <springmvc>false</springmvc>
+ <locations>org.apache.brooklyn.rest.api</locations>
+ <schemes>http,https</schemes>
+ <info>
+ <title>Swagger API Specification for Brooklyn REST server</title>
+ <version>v1</version>
+ <description>
+ Swagger API Specification for Brooklyn REST server
+ </description>
+ <termsOfService>
+ http://www.github.com/apache/incubator-brooklyn
+ </termsOfService>
+ <license>
+ <url>http://www.apache.org/licenses/LICENSE-2.0.html</url>
+ <name>Apache 2.0</name>
+ </license>
+ </info>
+ <swaggerDirectory>${project.build.directory}/generated/swagger-api-spec</swaggerDirectory>
+ </apiSource>
+ </apiSources>
+ </configuration>
+ <executions>
+ <execution>
+ <phase>compile</phase>
+ <goals>
+ <goal>generate</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </build>
+
</project>