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

@openapi-generator-plus/generator-common

Package Overview
Dependencies
Maintainers
1
Versions
73
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@openapi-generator-plus/generator-common - npm Package Compare versions

Comparing version 0.1.3 to 0.2.0

2

dist/index.d.ts

@@ -6,3 +6,3 @@ import { CodegenGenerator, CodegenServer } from '@openapi-generator-plus/types';

export declare const GroupingStrategies: typeof allGroupingStrategies;
export declare function commonGenerator<O>(): Pick<CodegenGenerator<O>, 'toOperationName'>;
export declare function commonGenerator<O>(): Pick<CodegenGenerator<O>, 'toOperationName' | 'toModelNameFromPropertyName'>;
export declare function apiBasePath(servers: CodegenServer[] | undefined): string;

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

const url_parse_1 = __importDefault(require("url-parse"));
const pluralize_1 = __importDefault(require("pluralize"));
const allGroupingStrategies = __importStar(require("./operation-grouping"));

@@ -33,2 +34,5 @@ exports.GroupingStrategies = allGroupingStrategies;

},
toModelNameFromPropertyName: (name, state) => {
return state.generator.toClassName(pluralize_1.default.singular(name), state);
},
};

@@ -35,0 +39,0 @@ }

{
"name": "@openapi-generator-plus/generator-common",
"version": "0.1.3",
"version": "0.2.0",
"description": "Common utilities for openapi-generator-plus generators",

@@ -24,3 +24,4 @@ "main": "dist/index.js",

"dependencies": {
"@openapi-generator-plus/types": "0.4.0",
"@openapi-generator-plus/types": "^0.4.1",
"pluralize": "^8.0.0",
"url-parse": "^1.4.7"

@@ -31,3 +32,3 @@ },

},
"gitHead": "9a1f42ea78cf09c8b1050d2b8339f006bfe6292d"
"gitHead": "67a4a8f63640dfb802480ce6a41485f3f03a52d0"
}

@@ -6,2 +6,3 @@ import { CodegenGenerator, CodegenServer } from '@openapi-generator-plus/types'

import Url from 'url-parse'
import pluralize from 'pluralize'

@@ -11,3 +12,3 @@ import * as allGroupingStrategies from './operation-grouping'

export function commonGenerator<O>(): Pick<CodegenGenerator<O>, 'toOperationName'> {
export function commonGenerator<O>(): Pick<CodegenGenerator<O>, 'toOperationName' | 'toModelNameFromPropertyName'> {
return {

@@ -23,2 +24,6 @@

},
toModelNameFromPropertyName: (name, state) => {
return state.generator.toClassName(pluralize.singular(name), state)
},

@@ -25,0 +30,0 @@ }

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