openapi-codegen-typescript
Advanced tools
Comparing version 0.1.2 to 0.1.3
@@ -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; |
@@ -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 { |
{ | ||
"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", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
43514
800