@travetto/openapi 3.1.1 → 3.1.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@travetto/openapi",
3
- "version": "3.1.1",
3
+ "version": "3.1.3",
4
4
  "description": "OpenAPI integration support for the Travetto framework",
5
5
  "keywords": [
6
6
  "rest",
@@ -26,14 +26,14 @@
26
26
  "directory": "module/openapi"
27
27
  },
28
28
  "dependencies": {
29
- "@travetto/config": "^3.1.0",
30
- "@travetto/rest": "^3.1.0",
31
- "@travetto/schema": "^3.1.0",
32
- "@travetto/yaml": "^3.1.0",
29
+ "@travetto/config": "^3.1.1",
30
+ "@travetto/rest": "^3.1.1",
31
+ "@travetto/schema": "^3.1.1",
32
+ "@travetto/yaml": "^3.1.1",
33
33
  "openapi3-ts": "^3.1.2"
34
34
  },
35
35
  "peerDependencies": {
36
- "@travetto/cli": "^3.1.0"
36
+ "@travetto/cli": "^3.1.1"
37
37
  },
38
38
  "peerDependenciesMeta": {
39
39
  "@travetto/cli": {
package/src/config.ts CHANGED
@@ -43,7 +43,7 @@ export class ApiHostConfig {
43
43
  /**
44
44
  * OpenAPI Version
45
45
  */
46
- openapi = '3.1.0';
46
+ openapi = '3.0.0';
47
47
  }
48
48
 
49
49
  /**
@@ -69,10 +69,10 @@ export class ApiSpecConfig {
69
69
  exposeAllSchemas: boolean = false;
70
70
 
71
71
  async postConstruct(): Promise<void> {
72
- this.output = path.resolve(this.output);
73
72
  if (!this.output || this.output === '-') {
74
73
  this.persist = false;
75
74
  } else {
75
+ this.output = path.resolve(RootIndex.mainModule.sourcePath, this.output);
76
76
  this.persist ??= GlobalEnv.dynamic;
77
77
  }
78
78
  if (this.persist) {
package/src/service.ts CHANGED
@@ -83,7 +83,7 @@ export class OpenApiService {
83
83
 
84
84
  // TODO: Should use file abstraction
85
85
  await fs.mkdir(path.dirname(this.apiSpecConfig.output), { recursive: true });
86
- const tempFile = path.resolve(os.tmpdir(), `${Util.uuid()}.yml`)
86
+ const tempFile = path.resolve(os.tmpdir(), `${Util.uuid()}.yml`);
87
87
  await fs.writeFile(tempFile, output);
88
88
  await fs.copyFile(tempFile, this.apiSpecConfig.output);
89
89
  await fs.unlink(tempFile);
@@ -30,6 +30,9 @@ export class OpenApiClientCommand implements CliCommandShape {
30
30
  }
31
31
 
32
32
  async main(format: string): Promise<void> {
33
+ this.output = path.resolve(this.output);
34
+ this.input = path.resolve(this.input);
35
+
33
36
  // Ensure its there
34
37
  await fs.mkdir(this.output, { recursive: true });
35
38
 
@@ -1,26 +1,26 @@
1
1
  {
2
- "angular12": [
2
+ "angular15": [
3
3
  "typescript-angular",
4
4
  {
5
5
  "supportsES6": true,
6
- "ngVersion": "11.0"
6
+ "stringEnums": true,
7
+ "ngVersion": "15.0",
8
+ "fileNaming": "kebab-case"
7
9
  }
8
10
  ],
9
- "angular11": [
11
+ "angular14": [
10
12
  "typescript-angular",
11
13
  {
12
14
  "supportsES6": true,
13
- "ngVersion": "11.0"
15
+ "stringEnums": true,
16
+ "ngVersion": "14.0",
17
+ "fileNaming": "kebab-case"
14
18
  }
15
19
  ],
16
- "angular10": [
17
- "typescript-angular",
20
+ "fetch": [
21
+ "typescript-fetch",
18
22
  {
19
- "supportsES6": true,
20
- "ngVersion": "10.0"
23
+ "stringEnums": true
21
24
  }
22
- ],
23
- "fetch": [
24
- "typescript-fetch"
25
25
  ]
26
26
  }