mirror of
https://github.com/valitydev/openapi-generator.git
synced 2024-11-06 18:45:23 +00:00
fixing sample and typscript compile.
This commit is contained in:
parent
fbbcdab439
commit
db7a56a16f
@ -26,6 +26,6 @@ fi
|
|||||||
|
|
||||||
# if you've executed sbt assembly previously it will use that instead.
|
# if you've executed sbt assembly previously it will use that instead.
|
||||||
export JAVA_OPTS="${JAVA_OPTS} -XX:MaxPermSize=256M -Xmx1024M -DloggerPath=conf/log4j.properties"
|
export JAVA_OPTS="${JAVA_OPTS} -XX:MaxPermSize=256M -Xmx1024M -DloggerPath=conf/log4j.properties"
|
||||||
ags="$@ generate -i modules/swagger-codegen/src/test/resources/2_0/petstore.json -l typescript-node -c bin/typescript-petstore-npm.json -o samples/client/petstore/typescript-node-with-npm"
|
ags="$@ generate -i modules/swagger-codegen/src/test/resources/2_0/petstore.json -l typescript-node -c bin/typescript-petstore-npm.json -o samples/client/petstore/typescript-node/npm"
|
||||||
|
|
||||||
java $JAVA_OPTS -jar $executable $ags
|
java $JAVA_OPTS -jar $executable $ags
|
||||||
|
@ -26,6 +26,6 @@ fi
|
|||||||
|
|
||||||
# if you've executed sbt assembly previously it will use that instead.
|
# if you've executed sbt assembly previously it will use that instead.
|
||||||
export JAVA_OPTS="${JAVA_OPTS} -XX:MaxPermSize=256M -Xmx1024M -DloggerPath=conf/log4j.properties"
|
export JAVA_OPTS="${JAVA_OPTS} -XX:MaxPermSize=256M -Xmx1024M -DloggerPath=conf/log4j.properties"
|
||||||
ags="$@ generate -i modules/swagger-codegen/src/test/resources/2_0/petstore.json -l typescript-node -o samples/client/petstore/typescript-node"
|
ags="$@ generate -i modules/swagger-codegen/src/test/resources/2_0/petstore.json -l typescript-node -o samples/client/petstore/typescript-node/default"
|
||||||
|
|
||||||
java $JAVA_OPTS -jar $executable $ags
|
java $JAVA_OPTS -jar $executable $ags
|
||||||
|
@ -5,6 +5,6 @@ If Not Exist %executable% (
|
|||||||
)
|
)
|
||||||
|
|
||||||
set JAVA_OPTS=%JAVA_OPTS% -XX:MaxPermSize=256M -Xmx1024M -DloggerPath=conf/log4j.properties
|
set JAVA_OPTS=%JAVA_OPTS% -XX:MaxPermSize=256M -Xmx1024M -DloggerPath=conf/log4j.properties
|
||||||
set ags=generate -t modules\swagger-codegen\src\main\resources\typescript-angular -i modules\swagger-codegen\src\test\resources\2_0\petstore.json -l typescript-angular2 -o samples\client\petstore\typescript-angular2\npm
|
set ags=generate -t modules\swagger-codegen\src\main\resources\typescript-angular -i modules\swagger-codegen\src\test\resources\2_0\petstore.json -c bin/typescript-petstore-npm.json -l typescript-angular2 -o samples\client\petstore\typescript-angular2\npm
|
||||||
|
|
||||||
java %JAVA_OPTS% -jar %executable% %ags%
|
java %JAVA_OPTS% -jar %executable% %ags%
|
||||||
|
10
bin/windows/typescript-node-with-npm.bat
Executable file
10
bin/windows/typescript-node-with-npm.bat
Executable file
@ -0,0 +1,10 @@
|
|||||||
|
set executable=.\modules\swagger-codegen-cli\target\swagger-codegen-cli.jar
|
||||||
|
|
||||||
|
If Not Exist %executable% (
|
||||||
|
mvn clean package
|
||||||
|
)
|
||||||
|
|
||||||
|
set JAVA_OPTS=%JAVA_OPTS% -XX:MaxPermSize=256M -Xmx1024M -DloggerPath=conf/log4j.properties
|
||||||
|
set ags=generate -t modules\swagger-codegen\src\main\resources\typescript-node -i modules\swagger-codegen\src\test\resources\2_0\petstore.json -c bin/typescript-petstore-npm.json -l typescript-node -o samples\client\petstore\typescript-node\npm
|
||||||
|
|
||||||
|
java %JAVA_OPTS% -jar %executable% %ags%
|
@ -5,6 +5,6 @@ If Not Exist %executable% (
|
|||||||
)
|
)
|
||||||
|
|
||||||
set JAVA_OPTS=%JAVA_OPTS% -XX:MaxPermSize=256M -Xmx1024M -DloggerPath=conf/log4j.properties
|
set JAVA_OPTS=%JAVA_OPTS% -XX:MaxPermSize=256M -Xmx1024M -DloggerPath=conf/log4j.properties
|
||||||
set ags=generate -t modules\swagger-codegen\src\main\resources\typescript-node -i modules\swagger-codegen\src\test\resources\2_0\petstore.json -l typescript-node -o samples\client\petstore\typescript-node
|
set ags=generate -t modules\swagger-codegen\src\main\resources\typescript-node -i modules\swagger-codegen\src\test\resources\2_0\petstore.json -l typescript-node -o samples\client\petstore\typescript-node\default
|
||||||
|
|
||||||
java %JAVA_OPTS% -jar %executable% %ags%
|
java %JAVA_OPTS% -jar %executable% %ags%
|
||||||
|
@ -40,14 +40,14 @@ export namespace {{classname}} {
|
|||||||
{{/model}}
|
{{/model}}
|
||||||
{{/models}}
|
{{/models}}
|
||||||
|
|
||||||
interface Authentication {
|
export interface Authentication {
|
||||||
/**
|
/**
|
||||||
* Apply authentication settings to header and query params.
|
* Apply authentication settings to header and query params.
|
||||||
*/
|
*/
|
||||||
applyToRequest(requestOptions: request.Options): void;
|
applyToRequest(requestOptions: request.Options): void;
|
||||||
}
|
}
|
||||||
|
|
||||||
class HttpBasicAuth implements Authentication {
|
export class HttpBasicAuth implements Authentication {
|
||||||
public username: string;
|
public username: string;
|
||||||
public password: string;
|
public password: string;
|
||||||
applyToRequest(requestOptions: request.Options): void {
|
applyToRequest(requestOptions: request.Options): void {
|
||||||
@ -57,7 +57,7 @@ class HttpBasicAuth implements Authentication {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
class ApiKeyAuth implements Authentication {
|
export class ApiKeyAuth implements Authentication {
|
||||||
public apiKey: string;
|
public apiKey: string;
|
||||||
|
|
||||||
constructor(private location: string, private paramName: string) {
|
constructor(private location: string, private paramName: string) {
|
||||||
@ -72,7 +72,7 @@ class ApiKeyAuth implements Authentication {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
class OAuth implements Authentication {
|
export class OAuth implements Authentication {
|
||||||
public accessToken: string;
|
public accessToken: string;
|
||||||
|
|
||||||
applyToRequest(requestOptions: request.Options): void {
|
applyToRequest(requestOptions: request.Options): void {
|
||||||
@ -80,7 +80,7 @@ class OAuth implements Authentication {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
class VoidAuth implements Authentication {
|
export class VoidAuth implements Authentication {
|
||||||
public username: string;
|
public username: string;
|
||||||
public password: string;
|
public password: string;
|
||||||
applyToRequest(requestOptions: request.Options): void {
|
applyToRequest(requestOptions: request.Options): void {
|
||||||
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because one or more lines are too long
@ -71,14 +71,14 @@ export class User {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
interface Authentication {
|
export interface Authentication {
|
||||||
/**
|
/**
|
||||||
* Apply authentication settings to header and query params.
|
* Apply authentication settings to header and query params.
|
||||||
*/
|
*/
|
||||||
applyToRequest(requestOptions: request.Options): void;
|
applyToRequest(requestOptions: request.Options): void;
|
||||||
}
|
}
|
||||||
|
|
||||||
class HttpBasicAuth implements Authentication {
|
export class HttpBasicAuth implements Authentication {
|
||||||
public username: string;
|
public username: string;
|
||||||
public password: string;
|
public password: string;
|
||||||
applyToRequest(requestOptions: request.Options): void {
|
applyToRequest(requestOptions: request.Options): void {
|
||||||
@ -88,7 +88,7 @@ class HttpBasicAuth implements Authentication {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
class ApiKeyAuth implements Authentication {
|
export class ApiKeyAuth implements Authentication {
|
||||||
public apiKey: string;
|
public apiKey: string;
|
||||||
|
|
||||||
constructor(private location: string, private paramName: string) {
|
constructor(private location: string, private paramName: string) {
|
||||||
@ -103,7 +103,7 @@ class ApiKeyAuth implements Authentication {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
class OAuth implements Authentication {
|
export class OAuth implements Authentication {
|
||||||
public accessToken: string;
|
public accessToken: string;
|
||||||
|
|
||||||
applyToRequest(requestOptions: request.Options): void {
|
applyToRequest(requestOptions: request.Options): void {
|
||||||
@ -111,7 +111,7 @@ class OAuth implements Authentication {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
class VoidAuth implements Authentication {
|
export class VoidAuth implements Authentication {
|
||||||
public username: string;
|
public username: string;
|
||||||
public password: string;
|
public password: string;
|
||||||
applyToRequest(requestOptions: request.Options): void {
|
applyToRequest(requestOptions: request.Options): void {
|
@ -71,14 +71,14 @@ export class User {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
interface Authentication {
|
export interface Authentication {
|
||||||
/**
|
/**
|
||||||
* Apply authentication settings to header and query params.
|
* Apply authentication settings to header and query params.
|
||||||
*/
|
*/
|
||||||
applyToRequest(requestOptions: request.Options): void;
|
applyToRequest(requestOptions: request.Options): void;
|
||||||
}
|
}
|
||||||
|
|
||||||
class HttpBasicAuth implements Authentication {
|
export class HttpBasicAuth implements Authentication {
|
||||||
public username: string;
|
public username: string;
|
||||||
public password: string;
|
public password: string;
|
||||||
applyToRequest(requestOptions: request.Options): void {
|
applyToRequest(requestOptions: request.Options): void {
|
||||||
@ -88,7 +88,7 @@ class HttpBasicAuth implements Authentication {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
class ApiKeyAuth implements Authentication {
|
export class ApiKeyAuth implements Authentication {
|
||||||
public apiKey: string;
|
public apiKey: string;
|
||||||
|
|
||||||
constructor(private location: string, private paramName: string) {
|
constructor(private location: string, private paramName: string) {
|
||||||
@ -103,7 +103,7 @@ class ApiKeyAuth implements Authentication {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
class OAuth implements Authentication {
|
export class OAuth implements Authentication {
|
||||||
public accessToken: string;
|
public accessToken: string;
|
||||||
|
|
||||||
applyToRequest(requestOptions: request.Options): void {
|
applyToRequest(requestOptions: request.Options): void {
|
||||||
@ -111,7 +111,7 @@ class OAuth implements Authentication {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
class VoidAuth implements Authentication {
|
export class VoidAuth implements Authentication {
|
||||||
public username: string;
|
public username: string;
|
||||||
public password: string;
|
public password: string;
|
||||||
applyToRequest(requestOptions: request.Options): void {
|
applyToRequest(requestOptions: request.Options): void {
|
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@swagger/angular2-typescript-petstore",
|
"name": "@swagger/angular2-typescript-petstore",
|
||||||
"version": "0.0.1-SNAPSHOT.201604272308",
|
"version": "0.0.1-SNAPSHOT.201604282147",
|
||||||
"description": "NodeJS client for @swagger/angular2-typescript-petstore",
|
"description": "NodeJS client for @swagger/angular2-typescript-petstore",
|
||||||
"main": "api.js",
|
"main": "api.js",
|
||||||
"scripts": {
|
"scripts": {
|
Loading…
Reference in New Issue
Block a user