@goast/typescript 0.2.17 → 0.2.18

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.
@@ -272,6 +272,10 @@ class DefaultTypeScriptModelGenerator extends file_generator_1.TypeScriptFileGen
272
272
  schema.kind !== 'oneOf') {
273
273
  return false;
274
274
  }
275
+ // Dynamically generated schemas do not have its own type declaration
276
+ if (!ctx.data.schemas.some((x) => x.id === schema.id)) {
277
+ return false;
278
+ }
275
279
  // For all other types, check if the user has enabled inline unnamed schemas
276
280
  return !ctx.config.inlineUnnamedSchemas;
277
281
  }
@@ -269,6 +269,10 @@ export class DefaultTypeScriptModelGenerator extends TypeScriptFileGenerator {
269
269
  schema.kind !== 'oneOf') {
270
270
  return false;
271
271
  }
272
+ // Dynamically generated schemas do not have its own type declaration
273
+ if (!ctx.data.schemas.some((x) => x.id === schema.id)) {
274
+ return false;
275
+ }
272
276
  // For all other types, check if the user has enabled inline unnamed schemas
273
277
  return !ctx.config.inlineUnnamedSchemas;
274
278
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@goast/typescript",
3
- "version": "0.2.17",
3
+ "version": "0.2.18",
4
4
  "repository": "https://github.com/MaSch0212/goast.git",
5
5
  "author": {
6
6
  "name": "Marc Schmidt (MaSch0212)",
@@ -12,7 +12,7 @@
12
12
  "fs-extra": "^11.2.0",
13
13
  "node-fetch": "^2.7.0",
14
14
  "yaml": "^2.4.1",
15
- "@goast/core": "0.2.1",
15
+ "@goast/core": "0.2.2",
16
16
  "tslib": "2.6.2"
17
17
  },
18
18
  "module": "./esm/index.js",