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.0.1 to 0.0.2

4

dist/index.d.ts

@@ -1,2 +0,2 @@

/** Create a default operation name for operations that lack an operationId */
export declare function defaultOperationName(path: string, method: string): string;
import { CodegenGenerator, CodegenOptions } from '@openapi-generator-plus/core';
export declare function commonGenerator<O extends CodegenOptions>(): Partial<CodegenGenerator<O>>;
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const core_1 = require("@openapi-generator-plus/core");
/** Create a default operation name for operations that lack an operationId */
function defaultOperationName(path, method) {
/* Remove path variables from the path */
const sanitisedPath = path.replace(/\{[^}]*\}/g, '');
const combined = `${method.toLocaleLowerCase()}_${sanitisedPath}`;
const sanitizedCombined = combined.replace(/[^a-zA-Z0-9]/g, '_').replace(/_+$/, '');
return core_1.camelCase(sanitizedCombined);
// Change to Pick<CodegenGenerator<O>, 'NAME'> when we implement something here
function commonGenerator() {
return {};
}
exports.defaultOperationName = defaultOperationName;
exports.commonGenerator = commonGenerator;
{
"name": "@openapi-generator-plus/generator-common",
"version": "0.0.1",
"version": "0.0.2",
"description": "Common utilities for openapi-generator-plus generators",

@@ -10,3 +10,2 @@ "main": "dist/index.js",

"clean": "../../node_modules/.bin/rimraf dist",
"prepare": "npm run clean && npm run build",
"watch": "../../node_modules/.bin/tsc --watch"

@@ -25,3 +24,3 @@ },

"dependencies": {
"@openapi-generator-plus/core": "0.0.20"
"@openapi-generator-plus/core": "0.0.26"
},

@@ -31,3 +30,3 @@ "publishConfig": {

},
"gitHead": "148678e4b7099adfe33967f651864b79ac60e3cb"
"gitHead": "81bde866345c95e847060532424ce8e22bd0a124"
}

@@ -1,10 +0,8 @@

import { camelCase } from '@openapi-generator-plus/core'
import { CodegenGenerator, CodegenOptions } from '@openapi-generator-plus/core'
/** Create a default operation name for operations that lack an operationId */
export function defaultOperationName(path: string, method: string): string {
/* Remove path variables from the path */
const sanitisedPath = path.replace(/\{[^}]*\}/g, '')
const combined = `${method.toLocaleLowerCase()}_${sanitisedPath}`
const sanitizedCombined = combined.replace(/[^a-zA-Z0-9]/g, '_').replace(/_+$/, '')
return camelCase(sanitizedCombined)
// Change to Pick<CodegenGenerator<O>, 'NAME'> when we implement something here
export function commonGenerator<O extends CodegenOptions>(): Partial<CodegenGenerator<O>> {
return {
}
}
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