You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Where the [swaggerConfig.json](#swaggerconfigjson) file, contains settings about the swagger generation. For example:
@@ -42,6 +44,21 @@ Where the [swaggerConfig.json](#swaggerconfigjson) file, contains settings about
42
44
}
43
45
```
44
46
47
+
Where the [tsconfig.json](https://www.typescriptlang.org/docs/handbook/tsconfig-json.html) file contains compilerOptions. For example:
48
+
49
+
```json
50
+
{
51
+
"compilerOptions": {
52
+
"baseUrl": ".",
53
+
"paths": {
54
+
"@/*": ["src/*"]
55
+
}
56
+
}
57
+
}
58
+
```
59
+
60
+
For example above options are required for `swaggerGen` to understand relative imports like `import something from '@/something'`.
61
+
45
62
### Swagger Decorators
46
63
47
64
The documentation will be generated consulting all [typescript-rest](https://github.com/thiagobustamante/typescript-rest) decorators present on your code.
@@ -145,23 +162,6 @@ class PeopleService {
145
162
}
146
163
```
147
164
148
-
#### @Security
149
-
150
-
Add a security constraint to method generated docs, referencing the security name from securityDefinitions.
151
-
`@Security` can be used at the controller and method level; if defined on both, method security overwrites controller security.
152
-
Multiple security schemes may be specified to require all of them.
153
-
154
-
```typescript
155
-
@Path('people')
156
-
classPeopleService {
157
-
@Security('api_key')
158
-
@GET
159
-
getPeople(@Param('name') name:string) {
160
-
// ...
161
-
}
162
-
}
163
-
```
164
-
165
165
166
166
#### @Produces
167
167
@@ -223,7 +223,8 @@ Property | Type | Description
223
223
basePath | string | Base API path; e.g. the 'v1' in https://myapi.com/v1
224
224
consumes | [string] | Default consumes property for the entire API
225
225
description | string | API description; defaults to npm package description
226
-
entryFile | string | The entry point to your API
226
+
entryFile | string or string[] | The entry point to your API (it is possible to use glob patters)
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
227
228
host | string | The hostname to be informed in the generated swagger file
228
229
license | string | API license number; defaults to npm package license
229
230
name | string | API name; defaults to npm package name
0 commit comments