mirror of
https://github.com/postmanlabs/openapi-to-postman.git
synced 2022-11-29 22:05:00 +03:00
Handling parameters with a missing schema property
This commit is contained in:
@@ -1851,6 +1851,10 @@ module.exports = {
|
||||
}
|
||||
|
||||
setTimeout(() => {
|
||||
if (!schemaPathVar.schema) {
|
||||
// no errors to show if there's no schema present in the spec
|
||||
return cb(null, []);
|
||||
}
|
||||
this.checkValueAgainstSchema(mismatchProperty,
|
||||
transactionPathPrefix,
|
||||
pathVar.value,
|
||||
@@ -1931,6 +1935,10 @@ module.exports = {
|
||||
|
||||
// query found in spec. check query's schema
|
||||
setTimeout(() => {
|
||||
if (!schemaParam.schema) {
|
||||
// no errors to show if there's no schema present in the spec
|
||||
return cb(null, []);
|
||||
}
|
||||
this.checkValueAgainstSchema(mismatchProperty,
|
||||
transactionPathPrefix + '[?(@.key==\'' + pQuery.key + '\')]',
|
||||
pQuery.value,
|
||||
@@ -1985,6 +1993,10 @@ module.exports = {
|
||||
|
||||
// header found in spec. check header's schema
|
||||
setTimeout(() => {
|
||||
if (!schemaHeader.schema) {
|
||||
// no errors to show if there's no schema present in the spec
|
||||
return cb(null, []);
|
||||
}
|
||||
this.checkValueAgainstSchema(mismatchProperty,
|
||||
transactionPathPrefix + '[?(@.key==\'' + pHeader.key + '\')]',
|
||||
pHeader.value,
|
||||
@@ -2048,6 +2060,10 @@ module.exports = {
|
||||
|
||||
// header found in spec. check header's schema
|
||||
setTimeout(() => {
|
||||
if (!schemaHeader.schema) {
|
||||
// no errors to show if there's no schema present in the spec
|
||||
return cb(null, []);
|
||||
}
|
||||
return this.checkValueAgainstSchema(mismatchProperty,
|
||||
transactionPathPrefix + '/' + pHeader.key,
|
||||
pHeader.value,
|
||||
|
||||
Reference in New Issue
Block a user