swagger-typescript-api 13.0.2 → 13.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "swagger-typescript-api",
3
- "version": "13.0.2",
3
+ "version": "13.0.3",
4
4
  "description": "Generate typescript/javascript api from swagger schema",
5
5
  "scripts": {
6
6
  "update-deps-to-latest": "npx --yes npm-check-updates && npm i",
@@ -259,9 +259,12 @@ class DiscriminatorSchemaParser extends MonoSchemaParser {
259
259
  const { discriminator, ...noDiscriminatorSchema } = this.schema;
260
260
  const complexSchemaKeys = _.keys(this.schemaParser._complexSchemaParsers);
261
261
  const schema = _.omit(_.clone(noDiscriminatorSchema), complexSchemaKeys);
262
+ const schemaIsAny =
263
+ this.schemaParserFabric.getInlineParseContent(_.cloneDeep(schema)) ===
264
+ this.config.Ts.Keyword.Any;
262
265
  const schemaIsEmpty = !_.keys(schema).length;
263
266
 
264
- if (schemaIsEmpty) return null;
267
+ if (schemaIsEmpty || schemaIsAny) return null;
265
268
 
266
269
  const typeName = this.schemaUtils.resolveTypeName(this.typeName, {
267
270
  prefixes: this.config.extractingOptions.discriminatorAbstractPrefix,