Socket
Socket
Sign inDemoInstall

mgr-swagger-express

Package Overview
Dependencies
176
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 0.0.4 to 0.0.5

57

dist/index.d.ts
import { Express } from 'express';
import { SwaggerEndpoint, SwaggerConfig, Context } from './types';
declare const generateSwagger: (config: SwaggerConfig) => {

@@ -25,1 +24,57 @@ swagger: string;

export declare const addSwaggerDefinition: (name: string, definition: object) => void;
export declare type ID = string;
export declare type Context = {
author: ID;
organization: ID;
roles: string[];
};
export declare type Error = {
code: number;
message: string;
};
export declare type SwaggerURLParameter = {
name: string;
description: string;
type?: string;
};
export declare type SwaggerBodyParameter = {
name: string;
description: string;
required: boolean;
schema?: any;
type: string;
items?: object;
};
export declare type SwaggerQueryField = {
name: string;
type: string;
required?: boolean;
items?: object;
};
export declare type SwaggerQueryParameter = {
name: string;
description: string;
items: SwaggerQueryField[];
};
export declare type SwaggerParameter = {
in?: string;
example?: any;
} & (SwaggerURLParameter | SwaggerBodyParameter | SwaggerQueryParameter);
export declare type SwaggerSuccessResponse = string;
export declare type SwaggerEndpoint = {
path: string;
auth?: string;
description?: string;
tags?: string[];
parameters?: SwaggerURLParameter[];
query?: SwaggerQueryParameter;
body?: SwaggerBodyParameter;
success?: SwaggerSuccessResponse;
};
export declare type SwaggerConfig = {
version: string;
name: string;
description: string;
host: string;
basePath: string;
};

2

dist/utils.d.ts

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

import { Context, SwaggerURLParameter, SwaggerBodyParameter, SwaggerQueryParameter } from './types';
import { Context, SwaggerURLParameter, SwaggerBodyParameter, SwaggerQueryParameter } from '.';
export declare const extractContextFromToken: (token: string) => Context;

@@ -3,0 +3,0 @@ export declare const transformURLParameters2Swagger: (parameters: SwaggerURLParameter[]) => {

{
"name": "mgr-swagger-express",
"version": "0.0.4",
"version": "0.0.5",
"description": "Swagger annotations for your express project",

@@ -31,6 +31,6 @@ "license": "MIT",

"lint": "tslint --project tsconfig.json -t codeFrame 'src/**/*.ts'",
"prepare": "npm build",
"prebuild": "npm lint && rm -rf dist",
"prepare": "npm run build",
"prebuild": "npm run lint && rm -rf dist",
"build": "tsc"
}
}
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc