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

json-schema-to-openapi-schema

Package Overview
Dependencies
Maintainers
48
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

json-schema-to-openapi-schema - npm Package Compare versions

Comparing version 0.3.0 to 0.4.0

.github/FUNDING.yml

4

CHANGELOG.md

@@ -7,3 +7,5 @@ # Changelog

## [Unreleased]
## [0.4.0] - 2019-10-04
### Added
- Take the first JSON Schema `example` and put in OpenAPI Schema Object `example`

@@ -10,0 +12,0 @@ ## [0.3.0] - 2018-12-18

@@ -35,3 +35,4 @@ const schemaWalker = require('@cloudflare/json-schema-walker');

schema = rewriteIfThenElse(schema);
schema = rewriteExclusiveMinMax(schema);
schema = rewriteExclusiveMinMax(schema);
schema = convertExamples(schema);

@@ -152,2 +153,11 @@ if (typeof schema['patternProperties'] === 'object') {

function convertExamples(schema) {
if (schema['examples'] && Array.isArray(schema['examples'])) {
schema['example'] = schema['examples'][0];
delete schema['examples'];
}
return schema;
}
function rewriteConst(schema) {

@@ -196,2 +206,1 @@ if (schema.const) {

module.exports = convert;
{
"name": "json-schema-to-openapi-schema",
"version": "0.3.0",
"version": "0.4.0",
"description": "Converts a JSON Schema to OpenAPI Schema Object",

@@ -10,4 +10,4 @@ "main": "index.js",

},
"repository": "github:wework/json-schema-to-openapi-schema",
"author": "Phil Sturgeon <phil.sturgeon@wework.com>",
"repository": "github:openapi-js/json-schema-to-openapi-schema",
"author": "Phil Sturgeon <me@philsturgeon.uk>",
"license": "MIT",

@@ -14,0 +14,0 @@ "devDependencies": {

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