New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

openapi-typescript

Package Overview
Dependencies
Maintainers
1
Versions
144
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

openapi-typescript - npm Package Compare versions

Comparing version 3.0.0-alpha.2 to 3.0.0-alpha.3

12

dist-node/index.js

@@ -339,6 +339,8 @@ 'use strict';

if (response.content) {
if (response.content && Object.keys(response.content).length) {
output += ` content: {\n`;
Object.entries(response.content).forEach(([contentType, contentResponse]) => {
output += ` "${contentType}": ${transformSchemaObj(contentResponse.schema)};\n`;
output += ` "${contentType}": ${transformSchemaObj(contentResponse.schema)};\n`;
});
output += ` }\n`;
} else if (response.schema) {

@@ -368,7 +370,7 @@ output += ` schema: ${transformSchemaObj(response.schema)};\n`;

if (Object.keys(operation.requestBody.content).length) {
output += ` requestBody: {\n`;
output += ` requestBody: {\n content: {\n`;
Object.entries(operation.requestBody.content).forEach(([k, v]) => {
output += ` "${k}": ${transformSchemaObj(v.schema)};\n`;
output += ` "${k}": ${transformSchemaObj(v.schema)};\n`;
});
output += ` }\n`;
output += ` }\n }\n`;
} else {

@@ -375,0 +377,0 @@ output += ` requestBody: unknown;\n`;

@@ -17,7 +17,7 @@ import { comment } from "../utils";

if (Object.keys(operation.requestBody.content).length) {
output += ` requestBody: {\n`;
output += ` requestBody: {\n content: {\n`;
Object.entries(operation.requestBody.content).forEach(([k, v]) => {
output += ` "${k}": ${transformSchemaObj(v.schema)};\n`;
output += ` "${k}": ${transformSchemaObj(v.schema)};\n`;
});
output += ` }\n`;
output += ` }\n }\n`;
}

@@ -24,0 +24,0 @@ else {

@@ -28,6 +28,8 @@ import { comment, transformRef } from "../utils";

}
if (response.content) {
if (response.content && Object.keys(response.content).length) {
output += ` content: {\n`;
Object.entries(response.content).forEach(([contentType, contentResponse]) => {
output += ` "${contentType}": ${transformSchemaObj(contentResponse.schema)};\n`;
output += ` "${contentType}": ${transformSchemaObj(contentResponse.schema)};\n`;
});
output += ` }\n`;
}

@@ -34,0 +36,0 @@ else if (response.schema) {

{
"name": "openapi-typescript",
"description": "Generate TypeScript types from Swagger OpenAPI specs",
"version": "3.0.0-alpha.2",
"version": "3.0.0-alpha.3",
"license": "ISC",

@@ -6,0 +6,0 @@ "bin": {

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