forked from loafle/openapi-generator-original
updating versions of package.json + ignoring build files + adding basePath to ConfigurationObject and giving de ConfigurationObject an easy constructor
This commit is contained in:
parent
68bda09cd8
commit
24c23d748c
@ -35,6 +35,7 @@ export class {{classname}} {
|
||||
}
|
||||
if (configuration) {
|
||||
this.configuration = configuration;
|
||||
this.basePath = basePath || configuration.basePath || this.basePath;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1,6 +1,24 @@
|
||||
export interface ConfigurationParameters {
|
||||
apiKey?: string;
|
||||
username?: string;
|
||||
password?: string;
|
||||
accessToken?: string;
|
||||
basePath?: string;
|
||||
}
|
||||
|
||||
export class Configuration {
|
||||
apiKey: string;
|
||||
username: string;
|
||||
password: string;
|
||||
accessToken: string;
|
||||
basePath: string;
|
||||
|
||||
|
||||
constructor(configurationParameters: ConfigurationParameters = {}) {
|
||||
this.apiKey = configurationParameters.apiKey;
|
||||
this.username = configurationParameters.username;
|
||||
this.password = configurationParameters.password;
|
||||
this.accessToken = configurationParameters.accessToken;
|
||||
this.basePath = configurationParameters.basePath;
|
||||
}
|
||||
}
|
@ -20,7 +20,7 @@
|
||||
"@angular/compiler": "^2.0.0",
|
||||
"core-js": "^2.4.0",
|
||||
"reflect-metadata": "^0.1.3",
|
||||
"rxjs": "5.0.0-beta.6",
|
||||
"rxjs": "5.0.0-beta.12",
|
||||
"zone.js": "^0.6.17"
|
||||
},
|
||||
"devDependencies": {
|
||||
@ -31,9 +31,9 @@
|
||||
"@angular/platform-browser": "^2.0.0",
|
||||
"core-js": "^2.4.0",
|
||||
"reflect-metadata": "^0.1.3",
|
||||
"rxjs": "5.0.0-beta.6",
|
||||
"rxjs": "5.0.0-beta.12",
|
||||
"zone.js": "^0.6.17",
|
||||
"typescript": "^1.8.10",
|
||||
"typescript": "^2.0.0",
|
||||
"typings": "^1.3.2"
|
||||
}{{#npmRepository}},{{/npmRepository}}
|
||||
{{#npmRepository}}
|
||||
|
@ -17,7 +17,8 @@
|
||||
"node_modules",
|
||||
"typings/main.d.ts",
|
||||
"typings/main",
|
||||
"lib"
|
||||
"lib",
|
||||
"dist"
|
||||
],
|
||||
"filesGlob": [
|
||||
"./model/*.ts",
|
||||
|
@ -1,17 +1,17 @@
|
||||
package io.swagger.codegen;
|
||||
|
||||
import org.testng.annotations.Test;
|
||||
import org.testng.reporters.Files;
|
||||
import static io.swagger.codegen.testutils.AssertFile.assertPathEqualsRecursively;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.util.Map;
|
||||
|
||||
import org.testng.annotations.Test;
|
||||
import org.testng.reporters.Files;
|
||||
|
||||
import io.swagger.codegen.testutils.IntegrationTestPathsConfig;
|
||||
import io.swagger.models.Swagger;
|
||||
import io.swagger.parser.SwaggerParser;
|
||||
|
||||
import static io.swagger.codegen.testutils.AssertFile.assertPathEqualsRecursively;
|
||||
|
||||
public abstract class AbstractIntegrationTest {
|
||||
|
||||
protected abstract IntegrationTestPathsConfig getIntegrationTestPathsConfig();
|
||||
@ -21,7 +21,7 @@ public abstract class AbstractIntegrationTest {
|
||||
protected abstract Map<String, String> configProperties();
|
||||
|
||||
// @wing328: ignore for the time being until we fix the error with the integration test
|
||||
@Test(enabled = false)
|
||||
@Test(enabled = true)
|
||||
public void generatesCorrectDirectoryStructure() throws IOException {
|
||||
DefaultGenerator codeGen = new DefaultGenerator();
|
||||
IntegrationTestPathsConfig integrationTestPathsConfig = getIntegrationTestPathsConfig();
|
||||
|
@ -50,6 +50,7 @@ export class UserService {
|
||||
}
|
||||
if (configuration) {
|
||||
this.configuration = configuration;
|
||||
this.basePath = basePath || configuration.basePath || this.basePath;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1,6 +1,24 @@
|
||||
export interface ConfigurationParameters {
|
||||
apiKey?: string;
|
||||
username?: string;
|
||||
password?: string;
|
||||
accessToken?: string;
|
||||
basePath?: string;
|
||||
}
|
||||
|
||||
export class Configuration {
|
||||
apiKey: string;
|
||||
username: string;
|
||||
password: string;
|
||||
accessToken: string;
|
||||
basePath: string;
|
||||
|
||||
|
||||
constructor(configurationParameters: ConfigurationParameters = {}) {
|
||||
this.apiKey = configurationParameters.apiKey;
|
||||
this.username = configurationParameters.username;
|
||||
this.password = configurationParameters.password;
|
||||
this.accessToken = configurationParameters.accessToken;
|
||||
this.basePath = configurationParameters.basePath;
|
||||
}
|
||||
}
|
@ -20,7 +20,7 @@
|
||||
"@angular/compiler": "^2.0.0",
|
||||
"core-js": "^2.4.0",
|
||||
"reflect-metadata": "^0.1.3",
|
||||
"rxjs": "5.0.0-beta.6",
|
||||
"rxjs": "5.0.0-beta.12",
|
||||
"zone.js": "^0.6.17"
|
||||
},
|
||||
"devDependencies": {
|
||||
@ -31,9 +31,9 @@
|
||||
"@angular/platform-browser": "^2.0.0",
|
||||
"core-js": "^2.4.0",
|
||||
"reflect-metadata": "^0.1.3",
|
||||
"rxjs": "5.0.0-beta.6",
|
||||
"rxjs": "5.0.0-beta.12",
|
||||
"zone.js": "^0.6.17",
|
||||
"typescript": "^1.8.10",
|
||||
"typescript": "^2.0.0",
|
||||
"typings": "^1.3.2"
|
||||
}
|
||||
}
|
||||
|
@ -17,7 +17,8 @@
|
||||
"node_modules",
|
||||
"typings/main.d.ts",
|
||||
"typings/main",
|
||||
"lib"
|
||||
"lib",
|
||||
"dist"
|
||||
],
|
||||
"filesGlob": [
|
||||
"./model/*.ts",
|
||||
|
@ -51,6 +51,7 @@ export class ProjectService {
|
||||
}
|
||||
if (configuration) {
|
||||
this.configuration = configuration;
|
||||
this.basePath = basePath || configuration.basePath || this.basePath;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1,6 +1,24 @@
|
||||
export interface ConfigurationParameters {
|
||||
apiKey?: string;
|
||||
username?: string;
|
||||
password?: string;
|
||||
accessToken?: string;
|
||||
basePath?: string;
|
||||
}
|
||||
|
||||
export class Configuration {
|
||||
apiKey: string;
|
||||
username: string;
|
||||
password: string;
|
||||
accessToken: string;
|
||||
basePath: string;
|
||||
|
||||
|
||||
constructor(configurationParameters: ConfigurationParameters = {}) {
|
||||
this.apiKey = configurationParameters.apiKey;
|
||||
this.username = configurationParameters.username;
|
||||
this.password = configurationParameters.password;
|
||||
this.accessToken = configurationParameters.accessToken;
|
||||
this.basePath = configurationParameters.basePath;
|
||||
}
|
||||
}
|
@ -20,7 +20,7 @@
|
||||
"@angular/compiler": "^2.0.0",
|
||||
"core-js": "^2.4.0",
|
||||
"reflect-metadata": "^0.1.3",
|
||||
"rxjs": "5.0.0-beta.6",
|
||||
"rxjs": "5.0.0-beta.12",
|
||||
"zone.js": "^0.6.17"
|
||||
},
|
||||
"devDependencies": {
|
||||
@ -31,9 +31,9 @@
|
||||
"@angular/platform-browser": "^2.0.0",
|
||||
"core-js": "^2.4.0",
|
||||
"reflect-metadata": "^0.1.3",
|
||||
"rxjs": "5.0.0-beta.6",
|
||||
"rxjs": "5.0.0-beta.12",
|
||||
"zone.js": "^0.6.17",
|
||||
"typescript": "^1.8.10",
|
||||
"typescript": "^2.0.0",
|
||||
"typings": "^1.3.2"
|
||||
}
|
||||
}
|
||||
|
@ -17,7 +17,8 @@
|
||||
"node_modules",
|
||||
"typings/main.d.ts",
|
||||
"typings/main",
|
||||
"lib"
|
||||
"lib",
|
||||
"dist"
|
||||
],
|
||||
"filesGlob": [
|
||||
"./model/*.ts",
|
||||
|
@ -51,6 +51,7 @@ export class PetService {
|
||||
}
|
||||
if (configuration) {
|
||||
this.configuration = configuration;
|
||||
this.basePath = basePath || configuration.basePath || this.basePath;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -50,6 +50,7 @@ export class StoreService {
|
||||
}
|
||||
if (configuration) {
|
||||
this.configuration = configuration;
|
||||
this.basePath = basePath || configuration.basePath || this.basePath;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -50,6 +50,7 @@ export class UserService {
|
||||
}
|
||||
if (configuration) {
|
||||
this.configuration = configuration;
|
||||
this.basePath = basePath || configuration.basePath || this.basePath;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1,6 +1,24 @@
|
||||
export interface ConfigurationParameters {
|
||||
apiKey?: string;
|
||||
username?: string;
|
||||
password?: string;
|
||||
accessToken?: string;
|
||||
basePath?: string;
|
||||
}
|
||||
|
||||
export class Configuration {
|
||||
apiKey: string;
|
||||
username: string;
|
||||
password: string;
|
||||
accessToken: string;
|
||||
basePath: string;
|
||||
|
||||
|
||||
constructor(configurationParameters: ConfigurationParameters = {}) {
|
||||
this.apiKey = configurationParameters.apiKey;
|
||||
this.username = configurationParameters.username;
|
||||
this.password = configurationParameters.password;
|
||||
this.accessToken = configurationParameters.accessToken;
|
||||
this.basePath = configurationParameters.basePath;
|
||||
}
|
||||
}
|
@ -20,7 +20,7 @@
|
||||
"@angular/compiler": "^2.0.0",
|
||||
"core-js": "^2.4.0",
|
||||
"reflect-metadata": "^0.1.3",
|
||||
"rxjs": "5.0.0-beta.6",
|
||||
"rxjs": "5.0.0-beta.12",
|
||||
"zone.js": "^0.6.17"
|
||||
},
|
||||
"devDependencies": {
|
||||
@ -31,9 +31,9 @@
|
||||
"@angular/platform-browser": "^2.0.0",
|
||||
"core-js": "^2.4.0",
|
||||
"reflect-metadata": "^0.1.3",
|
||||
"rxjs": "5.0.0-beta.6",
|
||||
"rxjs": "5.0.0-beta.12",
|
||||
"zone.js": "^0.6.17",
|
||||
"typescript": "^1.8.10",
|
||||
"typescript": "^2.0.0",
|
||||
"typings": "^1.3.2"
|
||||
}
|
||||
}
|
||||
|
@ -17,7 +17,8 @@
|
||||
"node_modules",
|
||||
"typings/main.d.ts",
|
||||
"typings/main",
|
||||
"lib"
|
||||
"lib",
|
||||
"dist"
|
||||
],
|
||||
"filesGlob": [
|
||||
"./model/*.ts",
|
||||
|
Loading…
x
Reference in New Issue
Block a user