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

@samchon/openapi

Package Overview
Dependencies
Maintainers
1
Versions
149
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@samchon/openapi - npm Package Compare versions

Comparing version 0.1.2-dev.20240411-7 to 0.1.2-dev.20240411-8

18

lib/internal/SwaggerV2Converter.js

@@ -6,7 +6,21 @@ "use strict";

(function (SwaggerV2Converter) {
SwaggerV2Converter.convert = (input) => (Object.assign(Object.assign({}, input), { components: convertComponents(input), paths: input.paths
SwaggerV2Converter.convert = (input) => ({
openapi: "3.1.0",
info: input.info,
components: convertComponents(input),
paths: input.paths
? Object.fromEntries(Object.entries(input.paths)
.filter(([_, v]) => v !== undefined)
.map(([key, value]) => [key, convertPathItem(input)(value)]))
: undefined, openapi: "3.1.0" }));
: undefined,
servers: input.host
? [
{
url: input.host,
},
]
: undefined,
security: input.security,
tags: input.tags,
});
/* -----------------------------------------------------------

@@ -13,0 +27,0 @@ OPERATORS

2

package.json
{
"name": "@samchon/openapi",
"version": "0.1.2-dev.20240411-7",
"version": "0.1.2-dev.20240411-8",
"description": "",

@@ -5,0 +5,0 @@ "main": "./lib/index.js",

@@ -6,3 +6,4 @@ import { OpenApi } from "../OpenApi";

export const convert = (input: SwaggerV2.IDocument): OpenApi.IDocument => ({
...input,
openapi: "3.1.0",
info: input.info,
components: convertComponents(input),

@@ -18,3 +19,11 @@ paths: input.paths

: undefined,
openapi: "3.1.0",
servers: input.host
? [
{
url: input.host,
},
]
: undefined,
security: input.security,
tags: input.tags,
});

@@ -21,0 +30,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