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.2 to 0.1.3

12

CHANGELOG.md

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

# v0.1.3 (Wed Feb 26 2020)
#### 🐛 Bug Fix
- fix(openapi-codegen): fix property "main" in package json file [#3](https://github.com/LandrAudio/openapi-codegen-typescript/pull/3) ([@nemrosim](https://github.com/nemrosim))
#### Authors: 1
- Artem Diashkin ([@nemrosim](https://github.com/nemrosim))
---
# v0.1.2 (Tue Feb 25 2020)

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

import { ConvertToMocksProps, GetSchemasProps } from './types';
export declare const getSchemaInterfaces: (schema: any) => string[] | undefined;
export declare const combineProperties: ({ schema, schemas, interfaces }: any) => any;
export declare const convertRefType: ({ propertyName, ref, isArray, }: {
propertyName: string;
ref: any;
isArray?: boolean | undefined;
}) => {
propertyName: string;
value: string;
};
export declare const parseSchema: ({ schema, name, DTOs }: {

@@ -5,0 +13,0 @@ schema: any;

18

dist/mockConverter.js

@@ -72,2 +72,14 @@ "use strict";

};
exports.convertRefType = function (_a) {
var propertyName = _a.propertyName, ref = _a.ref, _b = _a.isArray, isArray = _b === void 0 ? false : _b;
if (isArray) {
return { propertyName: propertyName, value: ownPropString(propertyName, "[" + isAn(ref) + ref + "API()]") };
}
else {
return { propertyName: propertyName, value: ownPropString(propertyName, "" + isAn(ref) + ref + "API()") };
}
};
var ownPropString = function (propName, result) {
return "overrides?.hasOwnProperty('" + propName + "') ? overrides?." + propName + " : " + result;
};
exports.parseSchema = function (_a) {

@@ -108,3 +120,3 @@ var schema = _a.schema, name = _a.name, DTOs = _a.DTOs;

else {
mocks.push({ propertyName: propertyName, value: "[" + isAn(ref) + ref + "API()]" });
mocks.push(exports.convertRefType({ propertyName: propertyName, ref: ref, isArray: true }));
}

@@ -135,3 +147,3 @@ }

else {
mocks.push({ propertyName: propertyName, value: "" + isAn(ref) + ref + "API()" });
mocks.push(exports.convertRefType({ propertyName: propertyName, ref: ref }));
}

@@ -147,3 +159,3 @@ }

else if (schema_4) {
mocks.push({ propertyName: propertyName, value: "" + isAn(ref) + ref + "API()" });
mocks.push(exports.convertRefType({ propertyName: propertyName, ref: ref }));
}

@@ -150,0 +162,0 @@ else {

4

package.json
{
"name": "openapi-codegen-typescript",
"version": "0.1.2",
"version": "0.1.3",
"description": "OpenApi codegen for generating types an mocks from swagger json file",
"main": "dist/index.ts",
"main": "dist/index.js",
"types": "dist/index.d.ts",

@@ -7,0 +7,0 @@ "repository": "LandrAudio/openapi-codegen-typescript",

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