You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have schema that uses the server property. Following is the snippet of the same.
- url: http://localhost:{port}/{version}
description: Local server
variables:
version:
enum: ['v1']
default: 'v1'
port:
default: '3333'
When validating the response against the schema, I want to pass the variables for port and version so that the validator can find the related paths defined in the schema.
Right now the validator fails with the error TypeError: Invalid URL.
TypeError: Invalid URL
at new NodeError (node:internal/errors:388:5)
at URL.onParseError (node:internal/url:564:9)
at new URL (node:internal/url:644:5)
at /node_modules/api-schema-builder/src/index.js:40:75
at Array.map (<anonymous>)
at buildValidations (/node_modules/api-schema-builder/src/index.js:40:32)
at Object.buildSchemaSync (/node_modules/api-schema-builder/src/index.js:31:12)
at /node_modules/api-contract-validator/lib/helpers/schema-utils.js:14:51
at /node_modules/api-contract-validator/lib/helpers/schema-utils.js:22:44
at Array.map (<anonymous>)
The text was updated successfully, but these errors were encountered:
I have schema that uses the
server
property. Following is the snippet of the same.When validating the response against the schema, I want to pass the variables for
port
andversion
so that the validator can find the related paths defined in the schema.Right now the validator fails with the error
TypeError: Invalid URL
.The text was updated successfully, but these errors were encountered: