@asyncapi/parser
Advanced tools
Comparing version 0.18.2 to 0.18.3
@@ -343,2 +343,9 @@ const { addExtensions } = require('../utils'); | ||
*/ | ||
deprecated() { | ||
return this._json.deprecated; | ||
} | ||
/** | ||
* @returns {boolean} | ||
*/ | ||
readOnly() { | ||
@@ -345,0 +352,0 @@ return !!this._json.readOnly; |
{ | ||
"name": "@asyncapi/parser", | ||
"version": "0.18.2", | ||
"version": "0.18.3", | ||
"description": "JavaScript AsyncAPI parser.", | ||
@@ -5,0 +5,0 @@ "main": "lib/index.js", |
@@ -486,2 +486,11 @@ const { expect } = require('chai'); | ||
describe('#deprecated()', function () { | ||
it('should return a boolean', () => { | ||
const doc = { "type": "string", "deprecated": true }; | ||
const d = new Schema(doc); | ||
expect(typeof d.deprecated()).to.be.equal('boolean'); | ||
expect(d.deprecated()).to.be.equal(doc.deprecated); | ||
}); | ||
}); | ||
describe('#readOnly()', function () { | ||
@@ -488,0 +497,0 @@ it('should return a boolean', () => { |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
995554
7586