Change validation input when version is 3.1.x

if the option includeWebhooks is false and there are no paths (only webhooks or componentes) throw error.
This commit is contained in:
Luis Tejeda
2022-02-09 12:46:31 -06:00
parent 02e22e8825
commit 50ba85ce68
8 changed files with 58 additions and 80 deletions

View File

@@ -13,11 +13,12 @@ module.exports = {
/**
* Parses an OAS 3.1.X string/object as a YAML or JSON
* @param {YAML/JSON} openApiSpec - The OAS 3.1.x specification specified in either YAML or JSON
* @param {Object} options computed process options
* @returns {Object} - Contains the parsed JSON-version of the OAS spec, or an error
* @no-unit-test
*/
parseSpec: function (openApiSpec) {
return schemaUtilsCommon.parseSpec(openApiSpec, inputValidation31X);
parseSpec: function (openApiSpec, options) {
return schemaUtilsCommon.parseSpec(openApiSpec, inputValidation31X, options);
},
inputValidation: inputValidation31X,