Skip to content

Commit

Permalink
console: ServiceEditor: fix connectionSpecification.$schema is undefi…
Browse files Browse the repository at this point in the history
…ned error
  • Loading branch information
absorbb committed Feb 9, 2025
1 parent 59fb77c commit 0179928
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion webapps/console/components/ServiceEditor/ServiceEditor.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,9 @@ export const ServiceEditor: React.FC<ServiceEditorProps> = props => {
return;
}
// ajv doesn't expect schema identifiers to use https:// prefix. But such identifiers started to appear in connectors specs
specs.connectionSpecification.$schema = specs.connectionSpecification.$schema.replace("https://", "http://");
if (specs.connectionSpecification.$schema) {
specs.connectionSpecification.$schema = specs.connectionSpecification.$schema.replace("https://", "http://");
}
const validate = ajv.compile(specs.connectionSpecification);
const valid = validate(credentials);
if (!obj.name) {
Expand Down

0 comments on commit 0179928

Please sign in to comment.