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

typescript-rest-swagger-plural

Package Overview
Dependencies
Maintainers
1
Versions
19
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

typescript-rest-swagger-plural - npm Package Compare versions

Comparing version 0.0.31 to 0.0.32

4

dist/config.d.ts

@@ -13,2 +13,6 @@ export interface Config {

/**
* Flag to name operation exactly as the method name.
*/
operationNameMethodOnly: boolean;
/**
* Generated SwaggerConfig.json will output here

@@ -15,0 +19,0 @@ */

9

dist/swagger/generator.js

@@ -296,4 +296,9 @@ "use strict";

SpecGenerator.prototype.getOperationId = function (controllerName, methodName) {
var controllerNameWithoutSuffix = controllerName.replace(new RegExp('Controller$'), '');
return "" + controllerNameWithoutSuffix + (methodName.charAt(0).toUpperCase() + methodName.substr(1));
if (this.config.operationNameMethodOnly) {
return methodName;
}
else {
var controllerNameWithoutSuffix = controllerName.replace(new RegExp('Controller$'), '');
return "" + controllerNameWithoutSuffix + (methodName.charAt(0).toUpperCase() + methodName.substr(1));
}
};

@@ -300,0 +305,0 @@ SpecGenerator.prototype.getSwaggerType = function (type) {

{
"name": "typescript-rest-swagger-plural",
"version": "0.0.31",
"version": "0.0.32",
"description": "Generate Swagger files from a typescript-rest project",

@@ -5,0 +5,0 @@ "keywords": [

@@ -17,2 +17,7 @@ 'use strict';

/**
* Flag to name operation exactly as the method name.
*/
operationNameMethodOnly: boolean;
/**
* Generated SwaggerConfig.json will output here

@@ -19,0 +24,0 @@ */

@@ -295,4 +295,11 @@ import { SwaggerConfig } from '../config';

private getOperationId(controllerName: string, methodName: string) {
const controllerNameWithoutSuffix = controllerName.replace(new RegExp('Controller$'), '');
return `${controllerNameWithoutSuffix}${methodName.charAt(0).toUpperCase() + methodName.substr(1)}`;
if (this.config.operationNameMethodOnly)
{
return methodName;
}
else
{
const controllerNameWithoutSuffix = controllerName.replace(new RegExp('Controller$'), '');
return `${controllerNameWithoutSuffix}${methodName.charAt(0).toUpperCase() + methodName.substr(1)}`;
}
}

@@ -299,0 +306,0 @@

Sorry, the diff of this file is not supported yet

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