🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
DemoInstallSign in
Socket

openapi-typescript-codegen

Package Overview
Dependencies
Maintainers
1
Versions
107
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

openapi-typescript-codegen - npm Package Compare versions

Comparing version

to
0.1.6

2

package.json
{
"name": "openapi-typescript-codegen",
"version": "0.1.5",
"version": "0.1.6",
"description": "NodeJS library that generates Typescript or Javascript clients based on the OpenAPI specification.",

@@ -5,0 +5,0 @@ "author": "Ferdi Koomen",

@@ -11,8 +11,5 @@ 'use strict';

Dictionary.definition = {
type: 'Dictionary',
item: {
type: 'any',
},
type: 'Dictionary'
};
})(Dictionary || (Dictionary = {}));

@@ -6,5 +6,5 @@ /* istanbul ignore file */

import { Dictionary } from "../models/Dictionary";
import { Dictionary } from '../models/Dictionary';
type FieldDefinition = {
export type FieldDefinition = {
readonly type?: string;

@@ -30,2 +30,14 @@ readonly isReadOnly?: boolean;

type ArrayDefinition<T> = FieldDefinition & {
readonly item: Definition<T>;
}
type DictionaryDefinition<T> = FieldDefinition & {
readonly item: Definition<T>;
}
type ObjectDefinition<T> = FieldDefinition & {
readonly [K in keyof T]: Definition<T[K]>;
}
export type Definition<T> =

@@ -37,8 +49,5 @@ T extends string ? FieldDefinition :

T extends Blob ? FieldDefinition :
T extends Array<infer U> ? FieldDefinition :
T extends Dictionary<infer U> ? FieldDefinition :
T extends Object ? FieldDefinition & {
readonly properties: {
readonly [K in keyof T]: Definition<T[K]>;
};
} : FieldDefinition
T extends Array<infer U> ? ArrayDefinition<U> :
T extends Dictionary<infer U> ? DictionaryDefinition<U> :
T extends Object ? ObjectDefinition<T> :
FieldDefinition

@@ -6,11 +6,3 @@ /* istanbul ignore file */

import { Definition } from '../core/Definition';
export interface Dictionary<T> {
/**
* @internal
*/
readonly __type: T;
export type Dictionary<T> = {
[key: string]: T;

@@ -21,9 +13,6 @@ }

export const definition: Definition<Dictionary<any>> = {
type: 'Dictionary',
item: {
type: 'any',
},
export const definition = {
type: 'Dictionary'
};
}

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet