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.35 to 0.0.36

8

dist/config.d.ts

@@ -15,3 +15,3 @@ export interface Config {

*/
operationNameMethodOnly: boolean;
operationNameMethodOnly?: boolean;
/**

@@ -92,2 +92,8 @@ * Generated SwaggerConfig.json will output here

/**
* Shorten qualified type names to their rightmost identity.
* i.e.
* "Module.Type" -> "Type"
*/
shortTypeNames?: boolean;
/**
* Default collectionFormat property for query parameters of array type.

@@ -94,0 +100,0 @@ * Possible values are `csv`, `ssv`, `tsv`, `pipes`, `multi`. If not specified, Swagger defaults to `csv`.

@@ -17,2 +17,5 @@ "use strict";

var _this = this;
//TODO: bit of a hack
if (this.config.shortTypeNames)
global.shortTypeNames = this.config.shortTypeNames;
this.program.getSourceFiles().forEach(function (sf) {

@@ -19,0 +22,0 @@ ts.forEachChild(sf, function (node) {

@@ -260,3 +260,9 @@ "use strict";

var qualifiedType = type;
return resolveFqTypeName(qualifiedType.left) + '.' + qualifiedType.right.text;
if (global.shortTypeNames) //TODO: bit of a hack
{
return qualifiedType.right.text;
}
else {
return resolveFqTypeName(qualifiedType.left) + '.' + qualifiedType.right.text;
}
}

@@ -263,0 +269,0 @@ function resolveSimpleTypeName(type) {

2

package.json
{
"name": "typescript-rest-swagger-plural",
"version": "0.0.35",
"version": "0.0.36",
"description": "Generate Swagger files from a typescript-rest project",

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

@@ -19,3 +19,3 @@ 'use strict';

*/
operationNameMethodOnly: boolean;
operationNameMethodOnly?: boolean;

@@ -109,2 +109,9 @@ /**

/**
* Shorten qualified type names to their rightmost identity.
* i.e.
* "Module.Type" -> "Type"
*/
shortTypeNames?: boolean;
/**
* Default collectionFormat property for query parameters of array type.

@@ -111,0 +118,0 @@ * Possible values are `csv`, `ssv`, `tsv`, `pipes`, `multi`. If not specified, Swagger defaults to `csv`.

@@ -20,2 +20,6 @@ import * as ts from 'typescript';

public generate(): Metadata {
//TODO: bit of a hack
if (this.config.shortTypeNames)
(<any>global).shortTypeNames = this.config.shortTypeNames;
this.program.getSourceFiles().forEach(sf => {

@@ -22,0 +26,0 @@ ts.forEachChild(sf, node => {

@@ -277,3 +277,10 @@ import * as ts from 'typescript';

const qualifiedType = type as ts.QualifiedName;
return resolveFqTypeName(qualifiedType.left) + '.' + (qualifiedType.right as ts.Identifier).text;
if ((<any>global).shortTypeNames) //TODO: bit of a hack
{
return (qualifiedType.right as ts.Identifier).text;
}
else
{
return resolveFqTypeName(qualifiedType.left) + '.' + (qualifiedType.right as ts.Identifier).text;
}
}

@@ -280,0 +287,0 @@

Sorry, the diff of this file is not supported yet

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