@travetto/openapi 6.0.1 → 6.0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -2
- package/package.json +7 -7
- package/support/bin/help.ts +1 -1
package/README.md
CHANGED
|
@@ -13,9 +13,9 @@ npm install @travetto/openapi
|
|
|
13
13
|
yarn add @travetto/openapi
|
|
14
14
|
```
|
|
15
15
|
|
|
16
|
-
In the [Web API](https://github.com/travetto/travetto/tree/main/module/web#readme "Declarative
|
|
16
|
+
In the [Web API](https://github.com/travetto/travetto/tree/main/module/web#readme "Declarative support for creating Web Applications") module, the controllers and endpoints can be described via decorators, comments, or typings. This only provides the general metadata internally. This is not sufficient to generate a usable API doc, and so this module exists to bridge that gap.
|
|
17
17
|
|
|
18
|
-
The module is provides an [OpenAPI](https://github.com/OAI/OpenAPI-Specification) v3.x representation of the API metadata provided via the [Web API](https://github.com/travetto/travetto/tree/main/module/web#readme "Declarative
|
|
18
|
+
The module is provides an [OpenAPI](https://github.com/OAI/OpenAPI-Specification) v3.x representation of the API metadata provided via the [Web API](https://github.com/travetto/travetto/tree/main/module/web#readme "Declarative support for creating Web Applications") and [Schema](https://github.com/travetto/travetto/tree/main/module/schema#readme "Data type registry for runtime validation, reflection and binding.") modules.
|
|
19
19
|
|
|
20
20
|
## Configuration
|
|
21
21
|
By installing the dependency, the [OpenAPI](https://github.com/OAI/OpenAPI-Specification) endpoint is automatically generated and exposed at the root of the application as `/openapi.yml` or `/openapi.json` (by default).
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@travetto/openapi",
|
|
3
|
-
"version": "6.0.
|
|
3
|
+
"version": "6.0.3",
|
|
4
4
|
"description": "OpenAPI integration support for the Travetto framework",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"web",
|
|
@@ -26,14 +26,14 @@
|
|
|
26
26
|
"directory": "module/openapi"
|
|
27
27
|
},
|
|
28
28
|
"dependencies": {
|
|
29
|
-
"@travetto/config": "^6.0.
|
|
30
|
-
"@travetto/schema": "^6.0.
|
|
31
|
-
"@travetto/web": "^6.0.
|
|
32
|
-
"openapi3-ts": "^4.
|
|
33
|
-
"yaml": "^2.
|
|
29
|
+
"@travetto/config": "^6.0.1",
|
|
30
|
+
"@travetto/schema": "^6.0.1",
|
|
31
|
+
"@travetto/web": "^6.0.3",
|
|
32
|
+
"openapi3-ts": "^4.5.0",
|
|
33
|
+
"yaml": "^2.8.1"
|
|
34
34
|
},
|
|
35
35
|
"peerDependencies": {
|
|
36
|
-
"@travetto/cli": "^6.0.
|
|
36
|
+
"@travetto/cli": "^6.0.1"
|
|
37
37
|
},
|
|
38
38
|
"peerDependenciesMeta": {
|
|
39
39
|
"@travetto/cli": {
|
package/support/bin/help.ts
CHANGED
|
@@ -13,7 +13,7 @@ export class OpenApiClientHelp {
|
|
|
13
13
|
static async getListOfFormats(dockerImage: string): Promise<string[]> {
|
|
14
14
|
const formatCache = Runtime.toolPath('openapi-formats.json');
|
|
15
15
|
if (!await fs.stat(formatCache).catch(() => false)) {
|
|
16
|
-
const { stdout } = await ExecUtil.getResult(spawn('docker', ['run', '--rm', dockerImage, 'list']
|
|
16
|
+
const { stdout } = await ExecUtil.getResult(spawn('docker', ['run', '--rm', dockerImage, 'list']));
|
|
17
17
|
const lines = stdout
|
|
18
18
|
.split('DOCUMENTATION')[0]
|
|
19
19
|
.trim()
|