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
Describe the bug
Getting error 'validate is not a function' when try to create service instance if for SFPlan definition JSON Schema draft-07 was used.
Expected behavior
As soon as you are using https://ajv.js.org for JSON validation I expect that drafts 04, 06, 07, 2019-09 and 2020-12 are supported.
If by some reason you support only draft-04,-06 I expect do not see runtime error but appropriate message (better during applying SFPlan and not when somebody tries to create service instance)
If you follow method validateSchemaForRequest - there are branches only for schema equal draft-04,-06 and "". So if schema defined as draft-07 and code comes to line 243 validate has undefined value
The text was updated successfully, but these errors were encountered:
Previously we were using an outdated version of ajv library. The older version of ajv uses draft-06 and draft-04 to validate draft-07. So I feel if you use the draft06 schema then the validation should happen fine. You may try this if it is easy.
The latest ajv brought in dedicated support for draft-07. We wanted to upgrade the ajv but did not had enough capacity to test with draft-07.
Thanks a lot for catching this bug. We love to support draft-07 but not finding time to work on it.
Describe the bug
Getting error 'validate is not a function' when try to create service instance if for SFPlan definition JSON Schema draft-07 was used.
To Reproduce
Steps to reproduce the behavior:
Expected behavior
As soon as you are using https://ajv.js.org for JSON validation I expect that drafts 04, 06, 07, 2019-09 and 2020-12 are supported.
If by some reason you support only draft-04,-06 I expect do not see runtime error but appropriate message (better during applying SFPlan and not when somebody tries to create service instance)
Additional context
Error raised from line 243.
Bug was introduced by eb5a282.
If you follow method validateSchemaForRequest - there are branches only for schema equal draft-04,-06 and "". So if schema defined as draft-07 and code comes to line 243 validate has undefined value
The text was updated successfully, but these errors were encountered: