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

open-api-to-schema

Package Overview
Dependencies
Maintainers
1
Versions
13
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

open-api-to-schema - npm Package Compare versions

Comparing version 1.0.2 to 1.0.3

dist/index.d.ts

6

dist/index.js

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

let required = Required.RESPECT;
const schema = { definitions: {}, paths: {} };
let schema = { definitions: {}, paths: {} };
function getRequiredObj(definition) {

@@ -82,2 +82,6 @@ switch (required) {

function convert(filePath, config) {
definitions = {};
fields = {};
required = Required.RESPECT;
schema = { definitions: {}, paths: {} };
if (!fs_1.default.existsSync(filePath)) {

@@ -84,0 +88,0 @@ throw Error(`Could not find swagger file at: ${path_1.default.resolve(filePath)}`);

8

package.json
{
"name": "open-api-to-schema",
"version": "1.0.2",
"version": "1.0.3",
"description": "Open API / Swagger file to JSON Schema Converter",

@@ -8,6 +8,6 @@ "main": "dist/index.js",

"start": "ts-node-dev --inspect src/index.ts",
"build": "tsc -p .",
"build": "tsc --declaration -p .",
"test": "jest"
},
"keywords": [ "open-api", "swagger", "json-schema" ],
"keywords": [ "open-api", "swagger", "json-schema", "converter", "validation" ],
"author": "Dominic Ginger",

@@ -28,4 +28,4 @@ "license": "MIT",

"files": [
"dist/index.js"
"dist/"
]
}

@@ -56,3 +56,11 @@ # Open api schema converter

```
## Features
- [X] Allof
- [ ] Oneof
- [ ] Anyof
- [X] Expose definitions
- [X] Expose paths
- [X] Override requiring
## Example Response

@@ -210,1 +218,2 @@ ```json

```
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