Skip to content

Commit

Permalink
Ensure typescript samples are up to date (#444)
Browse files Browse the repository at this point in the history
See #80
  • Loading branch information
macjohnny authored and jmini committed Jul 6, 2018
1 parent 804094b commit 3408866
Show file tree
Hide file tree
Showing 32 changed files with 44 additions and 59 deletions.
5 changes: 5 additions & 0 deletions bin/utils/ensure-up-to-date
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,11 @@ sleep 5
./bin/php-slim-petstore-server.sh > /dev/null 2>&1
./bin/php-ze-ph-petstore-server.sh > /dev/null 2>&1
./bin/openapi3/php-petstore.sh > /dev/null 2>&1
./bin/typescript-angular-petstore-all.sh > /dev/null 2>&1
./bin/typescript-fetch-petstore-all.sh > /dev/null 2>&1
./bin/typescript-node-petstore-all.sh > /dev/null 2>&1
./bin/typescript-inversify-petstore.sh > /dev/null 2>&1


# Check:
if [ -n "$(git status --porcelain)" ]; then
Expand Down
2 changes: 1 addition & 1 deletion bin/windows/typescript-angular-v2-interfaces.bat
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,6 @@ If Not Exist %executable% (
)

REM set JAVA_OPTS=%JAVA_OPTS% -Xmx1024M
set ags=generate -i modules\openapi-generator\src\test\resources\2_0\petstore.yaml -c bin\typescript-petstore-npm.json -g typescript-angular -o samples\client\petstore\typescript-angular-v2\with-interfaces -D withInterfaces=true --additional-properties ngVersion=2
set ags=generate -i modules\openapi-generator\src\test\resources\2_0\petstore.yaml -g typescript-angular -o samples\client\petstore\typescript-angular-v2\with-interfaces -D withInterfaces=true --additional-properties ngVersion=2

java %JAVA_OPTS% -jar %executable% %ags%
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,6 @@ If Not Exist %executable% (
mvn clean package
)

REM set JAVA_OPTS=%JAVA_OPTS% -Xmx1024M
set ags=generate -i modules\openapi-generator\src\test\resources\2_0\petstore.yaml -l typescript-angular -o samples\client\petstore\typescript-angular-v6-provided-in-root\default --additional-properties ngVersion=6.0.0
REM it is same like like setting -D providedInRoot=true
REM set ags=generate -i modules\openapi-generator\src\test\resources\2_0\petstore.yaml -l typescript-angular -c bin\typescript-angular-v6-petstore-provided-in-root-with-npm.json -o samples\client\petstore\typescript-angular-v6-provided-in-root\builds\with-npm -D providedInRoot=true --additional-properties ngVersion=6.0.0
set ags=generate -i modules\openapi-generator\src\test\resources\2_0\petstore.yaml -l typescript-angular -c bin/typescript-angular-v6-petstore-provided-in-root-with-npm.json -o samples\client\petstore\typescript-angular-v6-provided-in-root\builds\with-npm --additional-properties ngVersion=6.0.0

java %JAVA_OPTS% -jar %executable% %ags%
5 changes: 1 addition & 4 deletions bin/windows/typescript-angular-v6-provided-in-root.bat
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,6 @@ If Not Exist %executable% (
mvn clean package
)

REM set JAVA_OPTS=%JAVA_OPTS% -Xmx1024M
set ags=generate -i modules\openapi-generator\src\test\resources\2_0\petstore.yaml -l typescript-angular -o samples\client\petstore\typescript-angular-v6-provided-in-root\default --additional-properties ngVersion=6.0.0
REM it is same like like setting -D providedInRoot=true
REM set ags=generate -i modules\openapi-generator\src\test\resources\2_0\petstore.yaml -l typescript-angular -o samples\client\petstore\typescript-angular-v6-provided-in-root\builds\default -D providedInRoot=true --additional-properties ngVersion=6.0.0
set ags=generate -i modules\openapi-generator\src\test\resources\2_0\petstore.yaml -l typescript-angular -o samples\client\petstore\typescript-angular-v6-provided-in-root\builds\default --additional-properties ngVersion=6.0.0

java %JAVA_OPTS% -jar %executable% %ags%
6 changes: 1 addition & 5 deletions bin/windows/typescript-inversify-petstore.bat
Original file line number Diff line number Diff line change
@@ -1,14 +1,10 @@
@ECHO OFF

set executable=.\modules\openapi-generator-cli\target\openapi-generator-cli.jar

If Not Exist %executable% (
mvn clean package
)

REM set JAVA_OPTS=%JAVA_OPTS% -Xmx1024M

echo
set ags=generate -i modules\openapi-generator\src\test\resources\2_0\petstore.yaml -g typescript-inversify -o samples\client\petstore\typescript-inversify\builds\default
set ags=generate -i modules\openapi-generator\src\test\resources\2_0\petstore.yaml -g typescript-inversify -o samples\client\petstore\typescript-inversify

java %JAVA_OPTS% -jar %executable% %ags%
10 changes: 0 additions & 10 deletions bin/windows/typescript-inversify.bat

This file was deleted.

2 changes: 2 additions & 0 deletions bin/windows/typescript-node-petstore-all.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
call .\bin\windows\typescript-node-petstore.bat
call .\bin\windows\typescript-node-petstore-with-npm.bat
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1 +1 @@
3.0.2-SNAPSHOT
3.1.0-SNAPSHOT
Original file line number Diff line number Diff line change
@@ -1 +1 @@
3.0.2-SNAPSHOT
3.1.0-SNAPSHOT
Original file line number Diff line number Diff line change
@@ -1 +1 @@
3.0.2-SNAPSHOT
3.1.0-SNAPSHOT
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
## @swagger/angular2-typescript-petstore@0.0.1
## @

### Building

Expand All @@ -19,7 +19,7 @@ Navigate to the folder of your consuming project and run one of next commands.
_published:_

```
npm install @swagger/[email protected] --save
npm install @ --save
```

_without publishing (not recommended):_
Expand All @@ -37,7 +37,7 @@ npm link

In your project:
```
npm link @swagger/angular2-typescript-petstore
npm link
```

__Note for Windows users:__ The Angular CLI has troubles to use linked npm packages.
Expand All @@ -52,7 +52,7 @@ In your Angular project:

```
// without configuring providers
import { ApiModule } from '@swagger/angular2-typescript-petstore';
import { ApiModule } from '';
import { HttpModule } from '@angular/http';
Expand All @@ -70,7 +70,7 @@ export class AppModule {}

```
// configuring providers
import { ApiModule, Configuration, ConfigurationParameters } from '@swagger/angular2-typescript-petstore';
import { ApiModule, Configuration, ConfigurationParameters } from '';
export function apiConfigFactory (): Configuration => {
const params: ConfigurationParameters = {
Expand All @@ -89,7 +89,7 @@ export class AppModule {}
```

```
import { DefaultApi } from '@swagger/angular2-typescript-petstore';
import { DefaultApi } from '';
export class AppComponent {
constructor(private apiGateway: DefaultApi) { }
Expand Down Expand Up @@ -126,7 +126,7 @@ export class AppModule {
If different than the generated base path, during app bootstrap, you can provide the base path to your service.

```
import { BASE_PATH } from '@swagger/angular2-typescript-petstore';
import { BASE_PATH } from '';
bootstrap(AppComponent, [
{ provide: BASE_PATH, useValue: 'https://your-web-service.com' },
Expand All @@ -135,7 +135,7 @@ bootstrap(AppComponent, [
or

```
import { BASE_PATH } from '@swagger/angular2-typescript-petstore';
import { BASE_PATH } from '';
@NgModule({
imports: [],
Expand All @@ -159,7 +159,7 @@ export const environment = {

In the src/app/app.module.ts:
```
import { BASE_PATH } from '@swagger/angular2-typescript-petstore';
import { BASE_PATH } from '';
import { environment } from '../environments/environment';
@NgModule({
Expand Down
Original file line number Diff line number Diff line change
@@ -1 +1 @@
3.0.2-SNAPSHOT
3.1.0-SNAPSHOT
Original file line number Diff line number Diff line change
@@ -1 +1 @@
3.0.2-SNAPSHOT
3.1.0-SNAPSHOT
Original file line number Diff line number Diff line change
@@ -1 +1 @@
3.0.2-SNAPSHOT
3.1.0-SNAPSHOT
Original file line number Diff line number Diff line change
@@ -1 +1 @@
3.0.2-SNAPSHOT
3.1.0-SNAPSHOT

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1 +1 @@
3.0.2-SNAPSHOT
3.1.0-SNAPSHOT
Original file line number Diff line number Diff line change
@@ -1 +1 @@
3.0.2-SNAPSHOT
3.1.0-SNAPSHOT

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1 +1 @@
3.0.0-SNAPSHOT
3.1.0-SNAPSHOT
Original file line number Diff line number Diff line change
@@ -1 +1 @@
3.0.0-SNAPSHOT
3.1.0-SNAPSHOT
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ It can be used in both TypeScript and JavaScript. In TypeScript, the definition

### Building

To build an compile the typescript sources to javascript use:
To build and compile the typescript sources to javascript use:
```
npm install
npm run build
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"license": "Unlicense",
"main": "./dist/index.js",
"typings": "./dist/index.d.ts",
"scripts": {
"scripts" : {
"build": "tsc --outDir dist/",
"prepublishOnly": "npm run build"
},
Expand All @@ -24,7 +24,7 @@
"@types/node": "^8.0.9",
"typescript": "^2.0"
},
"publishConfig": {
"registry": "https://skimdb.npmjs.com/registry"
"publishConfig":{
"registry":"https://skimdb.npmjs.com/registry"
}
}
Original file line number Diff line number Diff line change
@@ -1 +1 @@
3.0.0-SNAPSHOT
3.1.0-SNAPSHOT
Original file line number Diff line number Diff line change
@@ -1 +1 @@
3.0.0-SNAPSHOT
3.1.0-SNAPSHOT
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ It can be used in both TypeScript and JavaScript. In TypeScript, the definition

### Building

To build an compile the typescript sources to javascript use:
To build and compile the typescript sources to javascript use:
```
npm install
npm run build
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"license": "Unlicense",
"main": "./dist/index.js",
"typings": "./dist/index.d.ts",
"scripts": {
"scripts" : {
"build": "tsc --outDir dist/",
"prepublishOnly": "npm run build"
},
Expand All @@ -24,7 +24,7 @@
"@types/node": "^8.0.9",
"typescript": "^2.0"
},
"publishConfig": {
"registry": "https://skimdb.npmjs.com/registry"
"publishConfig":{
"registry":"https://skimdb.npmjs.com/registry"
}
}
Original file line number Diff line number Diff line change
@@ -1 +1 @@
3.0.0-SNAPSHOT
3.1.0-SNAPSHOT
Original file line number Diff line number Diff line change
@@ -1 +1 @@
3.0.3-SNAPSHOT
3.1.0-SNAPSHOT
Original file line number Diff line number Diff line change
@@ -1 +1 @@
3.0.3-SNAPSHOT
3.1.0-SNAPSHOT

0 comments on commit 3408866

Please sign in to comment.