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

@asyncapi/parser

Package Overview
Dependencies
Maintainers
3
Versions
170
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.20.0 to 0.21.0

9

lib/models/schema.js
const { addExtensions } = require('../utils');
const Base = require('./base');
const ExternalDocs = require('./external-docs');

@@ -355,2 +356,10 @@ /**

/**
* @returns {ExternalDocs}
*/
externalDocs() {
if (!this._json.externalDocs) return null;
return new ExternalDocs(this._json.externalDocs);
}
/**
* @returns {boolean}

@@ -357,0 +366,0 @@ */

2

package.json
{
"name": "@asyncapi/parser",
"version": "0.20.0",
"version": "0.21.0",
"description": "JavaScript AsyncAPI parser.",

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

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

describe('#externalDocs()', function() {
it('should return null', function() {
const doc = { type: 'string' };
const d = new Schema(doc);
expect(d.externalDocs()).to.be.equal(null);
});
it('should return a ExternalDocs object', function() {
const doc = { type: 'string', externalDocs: { description: 'someDescription', url: 'someUrl' } };
const d = new Schema(doc);
expect(d.externalDocs().constructor.name).to.be.equal('ExternalDocs');
expect(d.externalDocs().json()).to.be.equal(doc.externalDocs);
});
});
describe('#readOnly()', function() {

@@ -506,0 +520,0 @@ it('should return a boolean', function() {

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