forked from loafle/openapi-generator-original
name rebuilds, tests
This commit is contained in:
parent
e114875f02
commit
ba2ccf788c
@ -253,7 +253,14 @@ public class DefaultGenerator extends AbstractGenerator implements Generator {
|
||||
writeToFile(outputFilename, tmpl.execute(bundle));
|
||||
files.add(new File(outputFilename));
|
||||
} else {
|
||||
InputStream in = new FileInputStream(config.templateDir() + File.separator + support.templateFile);
|
||||
InputStream in = null;
|
||||
|
||||
try {
|
||||
in = new FileInputStream(config.templateDir() + File.separator + support.templateFile);
|
||||
}
|
||||
catch (Exception e) {
|
||||
// continue
|
||||
}
|
||||
if(in == null) {
|
||||
in = this.getClass().getClassLoader().getResourceAsStream(config.templateDir() + File.separator + support.templateFile);
|
||||
}
|
||||
|
@ -9,7 +9,7 @@ import java.io.File;
|
||||
public class AndroidClientCodegen extends DefaultCodegen implements CodegenConfig {
|
||||
protected String invokerPackage = "io.swagger.client";
|
||||
protected String groupId = "io.swagger";
|
||||
protected String artifactId = "swagger-client";
|
||||
protected String artifactId = "swagger-android-client";
|
||||
protected String artifactVersion = "1.0.0";
|
||||
protected String sourceFolder = "src/main/java";
|
||||
|
||||
|
@ -9,7 +9,7 @@ import java.io.File;
|
||||
public class AsyncScalaClientCodegen extends DefaultCodegen implements CodegenConfig {
|
||||
protected String invokerPackage = "io.swagger.client";
|
||||
protected String groupId = "com.wordnik";
|
||||
protected String artifactId = "swagger-client";
|
||||
protected String artifactId = "swagger-async-scala-client";
|
||||
protected String artifactVersion = "1.0.0";
|
||||
protected String sourceFolder = "src/main/scala";
|
||||
protected String clientName = "SwaggerClient";
|
||||
|
@ -9,7 +9,7 @@ import java.io.File;
|
||||
public class CSharpClientCodegen extends DefaultCodegen implements CodegenConfig {
|
||||
protected String invokerPackage = "io.swagger.client";
|
||||
protected String groupId = "io.swagger";
|
||||
protected String artifactId = "swagger-client";
|
||||
protected String artifactId = "swagger-csharp-client";
|
||||
protected String artifactVersion = "1.0.0";
|
||||
protected String sourceFolder = "src/main/csharp";
|
||||
|
||||
|
@ -9,7 +9,7 @@ import java.io.File;
|
||||
public class JavaClientCodegen extends DefaultCodegen implements CodegenConfig {
|
||||
protected String invokerPackage = "io.swagger.client";
|
||||
protected String groupId = "io.swagger";
|
||||
protected String artifactId = "swagger-client";
|
||||
protected String artifactId = "swagger-java-client";
|
||||
protected String artifactVersion = "1.0.0";
|
||||
protected String sourceFolder = "src/main/java";
|
||||
|
||||
|
@ -12,7 +12,7 @@ import java.io.File;
|
||||
public class JaxRSServerCodegen extends JavaClientCodegen implements CodegenConfig {
|
||||
protected String invokerPackage = "io.swagger.api";
|
||||
protected String groupId = "io.swagger";
|
||||
protected String artifactId = "swagger-server";
|
||||
protected String artifactId = "swagger-jaxrs-server";
|
||||
protected String artifactVersion = "1.0.0";
|
||||
protected String sourceFolder = "src/main/java";
|
||||
protected String title = "Swagger Server";
|
||||
|
@ -9,7 +9,7 @@ import java.io.File;
|
||||
public class ScalaClientCodegen extends DefaultCodegen implements CodegenConfig {
|
||||
protected String invokerPackage = "io.swagger.client";
|
||||
protected String groupId = "com.wordnik";
|
||||
protected String artifactId = "swagger-client";
|
||||
protected String artifactId = "swagger-scala-client";
|
||||
protected String artifactVersion = "1.0.0";
|
||||
protected String sourceFolder = "src/main/scala";
|
||||
protected String authScheme = "";
|
||||
|
@ -129,7 +129,7 @@
|
||||
</repository>
|
||||
</repositories>
|
||||
<properties>
|
||||
<swagger-core-version>1.5.3-M1-SNAPSHOT</swagger-core-version>
|
||||
<swagger-core-version>1.5.0-M2</swagger-core-version>
|
||||
<jetty-version>9.2.9.v20150224</jetty-version>
|
||||
<jersey-version>1.13</jersey-version>
|
||||
<slf4j-version>1.6.3</slf4j-version>
|
||||
|
@ -95,7 +95,7 @@
|
||||
<stopPort>8079</stopPort>
|
||||
<stopKey>stopit</stopKey>
|
||||
<httpConnector>
|
||||
<port>8002</port>
|
||||
<port>8001</port>
|
||||
<idleTimeout>60000</idleTimeout>
|
||||
</httpConnector>
|
||||
</configuration>
|
||||
|
@ -2,9 +2,9 @@
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<groupId>io.swagger</groupId>
|
||||
<artifactId>swagger-client</artifactId>
|
||||
<artifactId>swagger-android-client</artifactId>
|
||||
<packaging>jar</packaging>
|
||||
<name>swagger-client</name>
|
||||
<name>swagger-android-client</name>
|
||||
<version>1.0.0</version>
|
||||
<scm>
|
||||
<connection>scm:git:git@github.com:wordnik/swagger-mustache.git</connection>
|
||||
|
@ -59,7 +59,7 @@ public class PetApi {
|
||||
|
||||
|
||||
String[] contentTypes = {
|
||||
"application/json","application/xml"
|
||||
"application/json","application/xml",
|
||||
};
|
||||
String contentType = contentTypes.length > 0 ? contentTypes[0] : "application/json";
|
||||
|
||||
@ -114,7 +114,7 @@ public class PetApi {
|
||||
|
||||
|
||||
String[] contentTypes = {
|
||||
"application/json","application/xml"
|
||||
"application/json","application/xml",
|
||||
};
|
||||
String contentType = contentTypes.length > 0 ? contentTypes[0] : "application/json";
|
||||
|
||||
@ -338,7 +338,7 @@ public class PetApi {
|
||||
|
||||
|
||||
String[] contentTypes = {
|
||||
"application/x-www-form-urlencoded"
|
||||
"application/x-www-form-urlencoded",
|
||||
};
|
||||
String contentType = contentTypes.length > 0 ? contentTypes[0] : "application/json";
|
||||
|
||||
@ -459,7 +459,7 @@ public class PetApi {
|
||||
|
||||
|
||||
String[] contentTypes = {
|
||||
"multipart/form-data"
|
||||
"multipart/form-data",
|
||||
};
|
||||
String contentType = contentTypes.length > 0 ? contentTypes[0] : "application/json";
|
||||
|
||||
|
@ -2,9 +2,9 @@
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<groupId>io.swagger</groupId>
|
||||
<artifactId>swagger-client</artifactId>
|
||||
<artifactId>swagger-java-client</artifactId>
|
||||
<packaging>jar</packaging>
|
||||
<name>swagger-client</name>
|
||||
<name>swagger-java-client</name>
|
||||
<version>1.0.0</version>
|
||||
<scm>
|
||||
<connection>scm:git:git@github.com:wordnik/swagger-mustache.git</connection>
|
||||
|
@ -57,7 +57,7 @@ public class PetApi {
|
||||
|
||||
|
||||
String[] contentTypes = {
|
||||
"application/json","application/xml"
|
||||
"application/json","application/xml",
|
||||
};
|
||||
|
||||
String contentType = contentTypes.length > 0 ? contentTypes[0] : "application/json";
|
||||
@ -107,7 +107,7 @@ public class PetApi {
|
||||
|
||||
|
||||
String[] contentTypes = {
|
||||
"application/json","application/xml"
|
||||
"application/json","application/xml",
|
||||
};
|
||||
|
||||
String contentType = contentTypes.length > 0 ? contentTypes[0] : "application/json";
|
||||
@ -315,7 +315,7 @@ public class PetApi {
|
||||
|
||||
|
||||
String[] contentTypes = {
|
||||
"application/x-www-form-urlencoded"
|
||||
"application/x-www-form-urlencoded",
|
||||
};
|
||||
|
||||
String contentType = contentTypes.length > 0 ? contentTypes[0] : "application/json";
|
||||
@ -429,7 +429,7 @@ public class PetApi {
|
||||
|
||||
|
||||
String[] contentTypes = {
|
||||
"multipart/form-data"
|
||||
"multipart/form-data",
|
||||
};
|
||||
|
||||
String contentType = contentTypes.length > 0 ? contentTypes[0] : "application/json";
|
||||
|
@ -47,7 +47,7 @@ class PetApi {
|
||||
if ($_header_accept !== '') {
|
||||
$headerParams['Accept'] = $_header_accept;
|
||||
}
|
||||
$_header_content_type = array('application/json','application/xml');
|
||||
$_header_content_type = array('application/json','application/xml',);
|
||||
$headerParams['Content-Type'] = count($_header_content_type) > 0 ? $_header_content_type[0] : 'application/json';
|
||||
|
||||
|
||||
@ -96,7 +96,7 @@ class PetApi {
|
||||
if ($_header_accept !== '') {
|
||||
$headerParams['Accept'] = $_header_accept;
|
||||
}
|
||||
$_header_content_type = array('application/json','application/xml');
|
||||
$_header_content_type = array('application/json','application/xml',);
|
||||
$headerParams['Content-Type'] = count($_header_content_type) > 0 ? $_header_content_type[0] : 'application/json';
|
||||
|
||||
|
||||
@ -310,7 +310,7 @@ class PetApi {
|
||||
if ($_header_accept !== '') {
|
||||
$headerParams['Accept'] = $_header_accept;
|
||||
}
|
||||
$_header_content_type = array('application/x-www-form-urlencoded');
|
||||
$_header_content_type = array('application/x-www-form-urlencoded',);
|
||||
$headerParams['Content-Type'] = count($_header_content_type) > 0 ? $_header_content_type[0] : 'application/json';
|
||||
|
||||
|
||||
@ -420,7 +420,7 @@ class PetApi {
|
||||
if ($_header_accept !== '') {
|
||||
$headerParams['Accept'] = $_header_accept;
|
||||
}
|
||||
$_header_content_type = array('multipart/form-data');
|
||||
$_header_content_type = array('multipart/form-data',);
|
||||
$headerParams['Content-Type'] = count($_header_content_type) > 0 ? $_header_content_type[0] : 'application/json';
|
||||
|
||||
|
||||
|
@ -2,9 +2,9 @@
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<groupId>com.wordnik</groupId>
|
||||
<artifactId>swagger-client</artifactId>
|
||||
<artifactId>swagger-scala-client</artifactId>
|
||||
<packaging>jar</packaging>
|
||||
<name>swagger-client</name>
|
||||
<name>swagger-scala-client</name>
|
||||
<version>1.0.0</version>
|
||||
<prerequisites>
|
||||
<maven>2.2.0</maven>
|
||||
|
Binary file not shown.
Before Width: | Height: | Size: 25 KiB After Width: | Height: | Size: 14 KiB |
@ -6,14 +6,14 @@
|
||||
</head>
|
||||
<body>
|
||||
<h1>Swagger Petstore</h1>
|
||||
<div class="app-desc">This is a sample server Petstore server. You can find out more about Swagger at <a href="http://swagger.io">http://swagger.io</a> or on irc.freenode.net, #swagger. For this sample, you can use the api key "special-key" to test the authorization filters for our Partner</div>
|
||||
<div class="app-desc">This is a sample server Petstore server. You can find out more about Swagger at <a href=\"http://swagger.io\">http://swagger.io</a> or on irc.freenode.net, #swagger. For this sample, you can use the api key \"special-key\" to test the authorization filters for </div>
|
||||
|
||||
<div class="app-desc">Contact Info: <a href="apiteam@wordnik.com">apiteam@wordnik.com</a></div>
|
||||
<div class="app-desc">Version: 1.0.0</div>
|
||||
<div class="license-info">Apache 2.0</div>
|
||||
<div class="license-url">http://www.apache.org/licenses/LICENSE-2.0.html</div>
|
||||
<h2>Access</h2>
|
||||
<div class="method-summary">Access to the API requires an api key to be provided by our Partner for all requests. The api key is passed as a header with the name `api_key` and the value provided by Reverb Technologies, Inc. Unless otherwise agreed upon, access to the Reverb API is intended solely for usage by our Partner and not third parties.</div>
|
||||
<div class="method-summary">Customize this message as you see fit!</div>
|
||||
<h2>Methods</h2>
|
||||
|
||||
|
||||
@ -420,7 +420,7 @@
|
||||
|
||||
<h3 class="field-label">Example data</h3>
|
||||
<div class="example-data-content-type">Content-Type: application/xml</div>
|
||||
<pre class="example"><code>not implemented com.wordnik.swagger.models.properties.MapProperty@12e335ef</code></pre>
|
||||
<pre class="example"><code>not implemented com.wordnik.swagger.models.properties.MapProperty@61797eca</code></pre>
|
||||
|
||||
</div> <!-- method -->
|
||||
<hr>
|
||||
@ -444,11 +444,11 @@
|
||||
|
||||
<h3 class="field-label">Example data</h3>
|
||||
<div class="example-data-content-type">Content-Type: application/json</div>
|
||||
<pre class="example"><code>{\n "id" : 123456789,\n "petId" : 123456789,\n "complete" : true,\n "status" : "aeiou",\n "quantity" : 123,\n "shipDate" : "2015-03-31T23:09:59.239+0000"\n}</code></pre>
|
||||
<pre class="example"><code>{\n "id" : 123456789,\n "petId" : 123456789,\n "complete" : true,\n "status" : "aeiou",\n "quantity" : 123,\n "shipDate" : "2015-04-04T23:36:32.265+0000"\n}</code></pre>
|
||||
|
||||
<h3 class="field-label">Example data</h3>
|
||||
<div class="example-data-content-type">Content-Type: application/xml</div>
|
||||
<pre class="example"><code><Order>\n <id>123456</id>\n <petId>123456</petId>\n <quantity>0</quantity>\n <shipDate>2015-03-31T16:09:59.242Z</shipDate>\n <status>string</status>\n <complete>true</complete>\n</Order></code></pre>
|
||||
<pre class="example"><code><Order>\n <id>123456</id>\n <petId>123456</petId>\n <quantity>0</quantity>\n <shipDate>2015-04-04T16:36:32.268Z</shipDate>\n <status>string</status>\n <complete>true</complete>\n</Order></code></pre>
|
||||
|
||||
</div> <!-- method -->
|
||||
<hr>
|
||||
@ -472,11 +472,11 @@
|
||||
|
||||
<h3 class="field-label">Example data</h3>
|
||||
<div class="example-data-content-type">Content-Type: application/json</div>
|
||||
<pre class="example"><code>{\n "id" : 123456789,\n "petId" : 123456789,\n "complete" : true,\n "status" : "aeiou",\n "quantity" : 123,\n "shipDate" : "2015-03-31T23:09:59.243+0000"\n}</code></pre>
|
||||
<pre class="example"><code>{\n "id" : 123456789,\n "petId" : 123456789,\n "complete" : true,\n "status" : "aeiou",\n "quantity" : 123,\n "shipDate" : "2015-04-04T23:36:32.269+0000"\n}</code></pre>
|
||||
|
||||
<h3 class="field-label">Example data</h3>
|
||||
<div class="example-data-content-type">Content-Type: application/xml</div>
|
||||
<pre class="example"><code><Order>\n <id>123456</id>\n <petId>123456</petId>\n <quantity>0</quantity>\n <shipDate>2015-03-31T16:09:59.243Z</shipDate>\n <status>string</status>\n <complete>true</complete>\n</Order></code></pre>
|
||||
<pre class="example"><code><Order>\n <id>123456</id>\n <petId>123456</petId>\n <quantity>0</quantity>\n <shipDate>2015-04-04T16:36:32.270Z</shipDate>\n <status>string</status>\n <complete>true</complete>\n</Order></code></pre>
|
||||
|
||||
</div> <!-- method -->
|
||||
<hr>
|
||||
|
@ -1,9 +1,9 @@
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<groupId>io.swagger</groupId>
|
||||
<artifactId>swagger-server</artifactId>
|
||||
<artifactId>swagger-jaxrs-server</artifactId>
|
||||
<packaging>jar</packaging>
|
||||
<name>swagger-server</name>
|
||||
<name>swagger-jaxrs-server</name>
|
||||
<version>1.0.0</version>
|
||||
<build>
|
||||
<sourceDirectory>src/main/java</sourceDirectory>
|
||||
@ -129,7 +129,7 @@
|
||||
</repository>
|
||||
</repositories>
|
||||
<properties>
|
||||
<swagger-core-version>1.5.3-M1-SNAPSHOT</swagger-core-version>
|
||||
<swagger-core-version>1.5.0-M2</swagger-core-version>
|
||||
<jetty-version>9.2.9.v20150224</jetty-version>
|
||||
<jersey-version>1.13</jersey-version>
|
||||
<slf4j-version>1.6.3</slf4j-version>
|
||||
|
@ -26,7 +26,7 @@ public class PetApi {
|
||||
|
||||
@PUT
|
||||
|
||||
@Consumes({ "application/json", "application/xml" })
|
||||
@Consumes({ "application/json", "application/xml", })
|
||||
@Produces({ "application/json", "application/xml" })
|
||||
@com.wordnik.swagger.annotations.ApiOperation(value = "Update an existing pet", notes = "", response = Void.class)
|
||||
@com.wordnik.swagger.annotations.ApiResponses(value = {
|
||||
@ -45,7 +45,7 @@ public class PetApi {
|
||||
|
||||
@POST
|
||||
|
||||
@Consumes({ "application/json", "application/xml" })
|
||||
@Consumes({ "application/json", "application/xml", })
|
||||
@Produces({ "application/json", "application/xml" })
|
||||
@com.wordnik.swagger.annotations.ApiOperation(value = "Add a new pet to the store", notes = "", response = Void.class)
|
||||
@com.wordnik.swagger.annotations.ApiResponses(value = {
|
||||
@ -113,7 +113,7 @@ public class PetApi {
|
||||
|
||||
@POST
|
||||
@Path("/{petId}")
|
||||
@Consumes({ "application/x-www-form-urlencoded" })
|
||||
@Consumes({ "application/x-www-form-urlencoded", })
|
||||
@Produces({ "application/json", "application/xml" })
|
||||
@com.wordnik.swagger.annotations.ApiOperation(value = "Updates a pet in the store with form data", notes = "", response = Void.class)
|
||||
@com.wordnik.swagger.annotations.ApiResponses(value = {
|
||||
@ -146,7 +146,7 @@ public class PetApi {
|
||||
|
||||
@POST
|
||||
@Path("/{petId}/uploadImage")
|
||||
@Consumes({ "multipart/form-data" })
|
||||
@Consumes({ "multipart/form-data", })
|
||||
@Produces({ "application/json", "application/xml" })
|
||||
@com.wordnik.swagger.annotations.ApiOperation(value = "uploads an image", notes = "", response = Void.class)
|
||||
@com.wordnik.swagger.annotations.ApiResponses(value = {
|
||||
|
Loading…
x
Reference in New Issue
Block a user