Skip to content

Commit a1bac4a

Browse files
author
Thiago Bustamante
committed
fix type in outputFormat property
1 parent a32ea1f commit a1bac4a

File tree

6 files changed

+7
-7
lines changed

6 files changed

+7
-7
lines changed

README.MD

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -224,7 +224,7 @@ basePath | string | Base API path; e.g. the 'v1' in https://myapi.com/v1
224224
consumes | [string] | Default consumes property for the entire API
225225
description | string | API description; defaults to npm package description
226226
entryFile | string or string[] | The entry point to your API (it is possible to use glob patters)
227-
ouptupFormat | 'Swagger_2' or 'OpenApi_3' | Inform if the generated spec will be in swagger 2.0 format or i open api 3.0
227+
outputFormat | 'Swagger_2' or 'OpenApi_3' | Inform if the generated spec will be in swagger 2.0 format or i open api 3.0
228228
host | string | The hostname to be informed in the generated swagger file
229229
license | string | API license number; defaults to npm package license
230230
name | string | API name; defaults to npm package name

package-lock.json

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "typescript-rest-swagger",
3-
"version": "1.0.2",
3+
"version": "1.0.3",
44
"description": "Generate Swagger files from a typescript-rest project",
55
"keywords": [
66
"typescript",
@@ -96,4 +96,4 @@
9696
"node": ">=6.0.0"
9797
},
9898
"engineStrict": true
99-
}
99+
}

src/cli.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ function validateSwaggerConfig(conf: SwaggerConfig): SwaggerConfig {
9898
conf.description = conf.description || descriptionDefault;
9999
conf.license = conf.license || licenseDefault;
100100
conf.yaml = conf.yaml === false ? false : true;
101-
conf.ouptupFormat = conf.ouptupFormat ? Specification[conf.ouptupFormat] : Specification.Swagger_2;
101+
conf.outputFormat = conf.outputFormat ? Specification[conf.outputFormat] : Specification.Swagger_2;
102102

103103
return conf;
104104
}

src/config.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ export interface SwaggerConfig {
3131
/**
3232
* Inform if the generated spec will be in swagger 2.0 format or i open api 3.0
3333
*/
34-
ouptupFormat?: Specification;
34+
outputFormat?: Specification;
3535

3636
/**
3737
* API host, expressTemplate.g. localhost:3000 or https://myapi.com

src/swagger/generator.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ export class SpecGenerator {
2121
this.debugger('Swagger Config: %j', this.config);
2222
this.debugger('Services Metadata: %j', this.metadata);
2323
let spec: any = this.getSwaggerSpec();
24-
if (this.config.ouptupFormat === Specification.OpenApi_3) {
24+
if (this.config.outputFormat === Specification.OpenApi_3) {
2525
spec = await this.convertToOpenApiSpec(spec);
2626
}
2727
return new Promise<void>((resolve, reject) => {

0 commit comments

Comments
 (0)