Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

openapi-codegen-typescript

Package Overview
Dependencies
Maintainers
1
Versions
29
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

openapi-codegen-typescript - npm Package Compare versions

Comparing version 0.1.11 to 0.1.12

12

CHANGELOG.md

@@ -0,1 +1,13 @@

# v0.1.12 (Thu Sep 03 2020)
#### 🐛 Bug Fix
- fix(dictionary): fix codegen for object "dictionary" [#15](https://github.com/LandrAudio/openapi-codegen-typescript/pull/15) ([@nemrosim](https://github.com/nemrosim))
#### Authors: 1
- Artem Diashkin ([@nemrosim](https://github.com/nemrosim))
---
# v0.1.11 (Thu Sep 03 2020)

@@ -2,0 +14,0 @@

@@ -157,2 +157,3 @@ "use strict";

var additionalSchema = DTOs[additionalRef];
// Enum key AND Enum value
if (dicSchema && dicSchema.enum && additionalSchema && additionalSchema.enum) {

@@ -166,2 +167,13 @@ var value_1 = "{ ";

}
// Enum key and Object value
if (dicSchema && dicSchema.enum && additionalProperties) {
var additionalRef_1 = MockGenerateHelper.parseRefType(additionalProperties[types_1.SwaggerProps.$ref].split('/'));
var aOrAn_1 = indefinite_1.default(additionalRef_1, { articleOnly: true });
var value_2 = "{ ";
dicSchema.enum.forEach(function (el) {
value_2 += "\n\"" + el + "\": " + aOrAn_1 + additionalRef_1 + "API(),";
});
value_2 += "\n}";
return { propertyName: propertyName, value: value_2 };
}
else {

@@ -168,0 +180,0 @@ return { propertyName: propertyName, value: ' // TODO: Wrong dictionary type' };

2

dist/typesConverter.js

@@ -155,3 +155,3 @@ "use strict";

var additionalRef = parseRefType(additionalProperties[types_1.SwaggerProps.$ref].split('/'));
result += " " + propertyName + ": {\n[key in " + dictionaryRef + "]: " + additionalRef + "; \n }\n";
result += " " + propertyName + ": {\n[key in " + dictionaryRef + "]: " + additionalRef + "; \n }; \n";
}

@@ -158,0 +158,0 @@ });

{
"name": "openapi-codegen-typescript",
"version": "0.1.11",
"version": "0.1.12",
"description": "OpenApi codegen for generating types an mocks from swagger json file",

@@ -5,0 +5,0 @@ "main": "dist/index.js",

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc