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

asyncapi-parser

Package Overview
Dependencies
Maintainers
1
Versions
29
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

asyncapi-parser - npm Package Compare versions

Comparing version 0.9.0 to 0.9.1

9

lib/models/schema.js

@@ -189,2 +189,11 @@ const { addExtensions } = require('../utils');

/**
* @returns {Schema}
*/
additionalItems() {
const ai = this._json.additionalItems;
if (ai === undefined || ai === null) return;
return new Schema(ai);
}
/**
* @returns {Object<string, Schema>}

@@ -191,0 +200,0 @@ */

2

package.json
{
"name": "asyncapi-parser",
"version": "0.9.0",
"version": "0.9.1",
"description": "JavaScript AsyncAPI parser.",

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

@@ -271,2 +271,23 @@ const { expect } = require('chai');

describe('#additionalItems()', function () {
it('should return a Schema object', () => {
const doc = { "additionalItems": { "type": "string" } };
const d = new Schema(doc);
expect(d.additionalItems().constructor.name).to.be.equal('Schema');
expect(d.additionalItems().json()).to.be.equal(doc.additionalItems);
});
it('should return undefined when not defined', () => {
const doc = {};
const d = new Schema(doc);
expect(d.additionalItems()).to.be.equal(undefined);
});
it('should return undefined when null', () => {
const doc = { additionalItems: null };
const d = new Schema(doc);
expect(d.additionalItems()).to.be.equal(undefined);
});
});
describe('#patternProperties()', function () {

@@ -273,0 +294,0 @@ it('should return a map of Schema objects', () => {

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

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