Skip to content
This repository was archived by the owner on May 29, 2025. It is now read-only.

Commit e06f0fc

Browse files
committed
updates to support angular 2.0.0
yay... angular2 official release day!
1 parent 0058dc6 commit e06f0fc

File tree

7 files changed

+20
-21
lines changed

7 files changed

+20
-21
lines changed

README.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# swangular-components ![alt text](https://api.travis-ci.org/gislikonrad/swangular-components.svg "build status")
2-
swangular-components is a component library for angular 2.0.0-rc.5 to render swagger 2.0 documentation.
2+
swangular-components is a component library for angular 2.0.0 to render swagger 2.0 documentation.
33

44
## TODO
55
- [x] Create CI pipeline using Travis CI
@@ -12,6 +12,10 @@ swangular-components is a component library for angular 2.0.0-rc.5 to render swa
1212
- [ ] Make scheme selectable for the request if there are more than one
1313
- [ ] Clean up auth service. It's not pretty.
1414
- [x] Show enumerations of enums.
15+
- [ ] Add support for arrays in dynamic forms
16+
- [ ] Add unit tests
17+
- [ ] Refactor into better components
18+
- [ ] Document more components and have more in depth documentation
1519

1620
## Usage
1721
```

components/api-method-form-control/select-control.component.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ export class SelectControlComponent implements OnInit, IApiMethodFormComponent {
2626
ngOnInit() {
2727
if(this.parameter.required) {
2828
let control = <FormControl>this.form.controls[this.parameter.name];
29-
control.updateValue(this.enum[0]);
29+
control.setValue(this.enum[0]);
3030
}
3131
}
3232

components/api-method-form/api-method-form.component.ts

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ import { RequestBuilder } from '../../services/request.builder';
44
import { HttpService } from '../../services/http.service';
55
import { TemplateProvider } from '../../services/template.provider';
66
import { Http, Headers } from '@angular/http';
7-
import { Validators } from '@angular/common';
87
import { FormGroup, FormControl, FormBuilder } from '@angular/forms';
98
import { Parameter, Type, Types } from '../../schema/2.0/swagger.schema';
109

@@ -65,7 +64,6 @@ export class ApiMethodFormComponent implements OnInit {
6564
private _httpService: HttpService,
6665
private _formBuilder: FormBuilder,
6766
private _errorService: ErrorService) {
68-
6967
}
7068

7169
ngOnInit() {
@@ -77,7 +75,6 @@ export class ApiMethodFormComponent implements OnInit {
7775
}
7876
}
7977
this.requestForm = this._formBuilder.group(definition);
80-
console.log(this.requestForm);
8178
}
8279

8380
performRequest() {

components/api-swagger/api-swagger.component.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@ import { Swagger } from '../../schema/2.0/swagger.schema';
2222
<api-request-modal></api-request-modal>
2323
</div>
2424
`,
25-
directives: [ ApiMethodComponent ],
2625
providers: [ SwaggerService, RequestBuilder ]
2726
})
2827

index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import { BrowserModule } from '@angular/platform-browser';
22
import { HttpModule } from '@angular/http';
33
import { FormsModule, ReactiveFormsModule } from '@angular/forms';
4-
import { ModuleWithProviders, provide, NgModule } from '@angular/core';
4+
import { ModuleWithProviders, NgModule } from '@angular/core';
55

66
import { ApiSwaggerComponent } from './components/api-swagger/api-swagger.component';
77
export { ApiSwaggerComponent } from './components/api-swagger/api-swagger.component';

package.json

Lines changed: 12 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,12 @@
11
{
22
"name": "swangular-components",
3-
"version": "0.2.9",
3+
"version": "0.3.0",
44
"description": "Swagger UI components written in angular 2",
55
"main": "index.js",
66
"scripts": {
77
"start": "npm run ensureversion && ntsc && npm run copyhtml && concurrently \"npm run ntsc:w\" \"npm run copyhtml:w\"",
88
"ensureversion": "node .scripts/version.js",
99
"build": "ntsc",
10-
"reportbuild": "node .scripts/report-build.js",
1110
"postinstall": "typings install",
1211
"ntsc": "ntsc",
1312
"ntsc:w": "ntsc -w",
@@ -30,17 +29,17 @@
3029
},
3130
"homepage": "https://github.com/gislikonrad/swangular-components#readme",
3231
"dependencies": {
33-
"@angular/common": "2.0.0-rc.5",
34-
"@angular/compiler": "2.0.0-rc.5",
35-
"@angular/core": "2.0.0-rc.5",
36-
"@angular/forms": "0.3.0",
37-
"@angular/http": "2.0.0-rc.5",
38-
"@angular/platform-browser": "2.0.0-rc.5",
39-
"@angular/platform-browser-dynamic": "2.0.0-rc.5",
40-
"@angular/router": "3.0.0-rc.1",
32+
"@angular/common": "2.0.0",
33+
"@angular/compiler": "2.0.0",
34+
"@angular/core": "2.0.0",
35+
"@angular/forms": "2.0.0",
36+
"@angular/http": "2.0.0",
37+
"@angular/platform-browser": "2.0.0",
38+
"@angular/platform-browser-dynamic": "2.0.0",
39+
"@angular/router": "3.0.0",
4140
"@types/core-js": "0.9.32",
42-
"rxjs": "5.0.0-beta.6",
43-
"zone.js": "0.6.6"
41+
"rxjs": "5.0.0-beta.12",
42+
"zone.js": "0.6.21"
4443
},
4544
"devDependencies": {
4645
"concurrently": "^2.0.0",
@@ -49,4 +48,4 @@
4948
"shelljs": "^0.7.3",
5049
"typings": "^0.7.12"
5150
}
52-
}
51+
}

tsconfig.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
"suppressImplicitAnyIndexErrors": true,
1212
"declaration": true,
1313
"diagnostics": true,
14-
"listFiles": true
14+
"listFiles": false
1515
},
1616
"exclude": [
1717
"node_modules",

0 commit comments

Comments
 (0)