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

@elysiajs/swagger

Package Overview
Dependencies
Maintainers
1
Versions
59
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@elysiajs/swagger - npm Package Compare versions

Comparing version 0.1.0-rc.3 to 0.1.0-rc.4

5

dist/index.d.ts
import { type Elysia } from 'elysia';
import type { ElysiaSwaggerConfig } from './types';
/**
* Plugin for [elysia](https://github.com/elysiajs/elysia) that auto-generate Swagger page.
*
* @see https://github.com/elysiajs/elysia-swagger
*/
export declare const swagger: ({ swagger, excludeStaticFile, path, exclude }?: ElysiaSwaggerConfig) => (app: Elysia) => Elysia<import("elysia").ElysiaInstance<{

@@ -9,0 +4,0 @@ store: {};

@@ -11,7 +11,2 @@ import { SCHEMA } from 'elysia';

};
/**
* Plugin for [elysia](https://github.com/elysiajs/elysia) that auto-generate Swagger page.
*
* @see https://github.com/elysiajs/elysia-swagger
*/
export const swagger = ({ swagger = {}, excludeStaticFile = true, path = '/swagger', exclude = [] } = {

@@ -42,3 +37,2 @@ swagger: {},

},
// @ts-ignore
paths: filterPaths(context.store[SCHEMA], {

@@ -45,0 +39,0 @@ excludeStaticFile,

import type { OpenAPIV2 } from "openapi-types";
export interface ElysiaSwaggerConfig {
/**
* Customize Swagger config, refers to Swagger 2.0 config
*
* @see https://swagger.io/specification/v2/
*/
swagger?: Partial<OpenAPIV2.Document>;
/**
* Determine if Swagger should exclude static files.
*
* @default true
*/
excludeStaticFile?: boolean;
/**
* The endpoint to expose Swagger
*
* @default '/swagger'
*/
path?: string;
/**
* Paths to exclude from Swagger endpoint
*
* @default []
*/
exclude?: string | RegExp | (string | RegExp)[];
}

8

package.json
{
"name": "@elysiajs/swagger",
"version": "0.1.0-rc.3",
"version": "0.1.0-rc.4",
"description": "Plugin for Elysia to auto-generate Swagger page",

@@ -12,3 +12,3 @@ "author": {

"exports": {
"require": "./dist/cjs/index.js",
"require": "./dist/index.js",
"import": "./dist/index.js",

@@ -33,5 +33,3 @@ "node": "./dist/index.js",

"test": "bun wiptest",
"build": "rimraf dist && npm run build:cjs && npm run build:esm",
"build:cjs": "tsc --project tsconfig.cjs.json",
"build:esm": "tsc --project tsconfig.esm.json",
"build": "rimraf dist && tsc --project tsconfig.esm.json",
"release": "npm run build && npm run test && npm publish --access public"

@@ -38,0 +36,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