remove trailing space in ts fetech api, add npm test to ci (#4348)

This commit is contained in:
wing328 2016-12-08 18:09:20 +08:00 committed by GitHub
parent 535b233ff7
commit af2db27a83
7 changed files with 49 additions and 8 deletions

View File

@ -94,8 +94,10 @@ export const {{classname}}FetchParamCreactor = {
let contentTypeHeader: Dictionary<string>; let contentTypeHeader: Dictionary<string>;
{{#hasFormParams}} {{#hasFormParams}}
contentTypeHeader = { "Content-Type": "application/x-www-form-urlencoded" }; contentTypeHeader = { "Content-Type": "application/x-www-form-urlencoded" };
fetchOptions.body = querystring.stringify({ {{#formParams}} fetchOptions.body = querystring.stringify({
"{{baseName}}": params["{{paramName}}"],{{/formParams}} {{#formParams}}
"{{baseName}}": params["{{paramName}}"],
{{/formParams}}
}); });
{{/hasFormParams}} {{/hasFormParams}}
{{#hasBodyParam}} {{#hasBodyParam}}

View File

@ -250,7 +250,7 @@ export const PetApiFetchParamCreactor = {
let contentTypeHeader: Dictionary<string>; let contentTypeHeader: Dictionary<string>;
contentTypeHeader = { "Content-Type": "application/x-www-form-urlencoded" }; contentTypeHeader = { "Content-Type": "application/x-www-form-urlencoded" };
fetchOptions.body = querystring.stringify({ fetchOptions.body = querystring.stringify({
"name": params["name"], "name": params["name"],
"status": params["status"], "status": params["status"],
}); });
@ -281,7 +281,7 @@ export const PetApiFetchParamCreactor = {
let contentTypeHeader: Dictionary<string>; let contentTypeHeader: Dictionary<string>;
contentTypeHeader = { "Content-Type": "application/x-www-form-urlencoded" }; contentTypeHeader = { "Content-Type": "application/x-www-form-urlencoded" };
fetchOptions.body = querystring.stringify({ fetchOptions.body = querystring.stringify({
"additionalMetadata": params["additionalMetadata"], "additionalMetadata": params["additionalMetadata"],
"file": params["file"], "file": params["file"],
}); });

View File

@ -39,6 +39,19 @@
</arguments> </arguments>
</configuration> </configuration>
</execution> </execution>
<execution>
<id>npm-test</id>
<phase>integration-test</phase>
<goals>
<goal>exec</goal>
</goals>
<configuration>
<executable>npm</executable>
<arguments>
<argument>test</argument>
</arguments>
</configuration>
</execution>
</executions> </executions>
</plugin> </plugin>
</plugins> </plugins>

View File

@ -249,7 +249,7 @@ export const PetApiFetchParamCreactor = {
let contentTypeHeader: Dictionary<string>; let contentTypeHeader: Dictionary<string>;
contentTypeHeader = { "Content-Type": "application/x-www-form-urlencoded" }; contentTypeHeader = { "Content-Type": "application/x-www-form-urlencoded" };
fetchOptions.body = querystring.stringify({ fetchOptions.body = querystring.stringify({
"name": params["name"], "name": params["name"],
"status": params["status"], "status": params["status"],
}); });
@ -280,7 +280,7 @@ export const PetApiFetchParamCreactor = {
let contentTypeHeader: Dictionary<string>; let contentTypeHeader: Dictionary<string>;
contentTypeHeader = { "Content-Type": "application/x-www-form-urlencoded" }; contentTypeHeader = { "Content-Type": "application/x-www-form-urlencoded" };
fetchOptions.body = querystring.stringify({ fetchOptions.body = querystring.stringify({
"additionalMetadata": params["additionalMetadata"], "additionalMetadata": params["additionalMetadata"],
"file": params["file"], "file": params["file"],
}); });

View File

@ -39,6 +39,19 @@
</arguments> </arguments>
</configuration> </configuration>
</execution> </execution>
<execution>
<id>npm-test</id>
<phase>integration-test</phase>
<goals>
<goal>exec</goal>
</goals>
<configuration>
<executable>npm</executable>
<arguments>
<argument>test</argument>
</arguments>
</configuration>
</execution>
</executions> </executions>
</plugin> </plugin>
</plugins> </plugins>

View File

@ -250,7 +250,7 @@ export const PetApiFetchParamCreactor = {
let contentTypeHeader: Dictionary<string>; let contentTypeHeader: Dictionary<string>;
contentTypeHeader = { "Content-Type": "application/x-www-form-urlencoded" }; contentTypeHeader = { "Content-Type": "application/x-www-form-urlencoded" };
fetchOptions.body = querystring.stringify({ fetchOptions.body = querystring.stringify({
"name": params["name"], "name": params["name"],
"status": params["status"], "status": params["status"],
}); });
@ -281,7 +281,7 @@ export const PetApiFetchParamCreactor = {
let contentTypeHeader: Dictionary<string>; let contentTypeHeader: Dictionary<string>;
contentTypeHeader = { "Content-Type": "application/x-www-form-urlencoded" }; contentTypeHeader = { "Content-Type": "application/x-www-form-urlencoded" };
fetchOptions.body = querystring.stringify({ fetchOptions.body = querystring.stringify({
"additionalMetadata": params["additionalMetadata"], "additionalMetadata": params["additionalMetadata"],
"file": params["file"], "file": params["file"],
}); });

View File

@ -39,6 +39,19 @@
</arguments> </arguments>
</configuration> </configuration>
</execution> </execution>
<execution>
<id>npm-test</id>
<phase>integration-test</phase>
<goals>
<goal>exec</goal>
</goals>
<configuration>
<executable>npm</executable>
<arguments>
<argument>test</argument>
</arguments>
</configuration>
</execution>
</executions> </executions>
</plugin> </plugin>
</plugins> </plugins>