Skip to content

Commit

Permalink
Fix #1465
Browse files Browse the repository at this point in the history
  • Loading branch information
mgubaidullin committed Dec 6, 2024
1 parent 0d8852d commit 7a06215
Show file tree
Hide file tree
Showing 5 changed files with 1 addition and 18 deletions.
3 changes: 1 addition & 2 deletions karavan-core/src/core/api/CamelDefinitionYaml.ts
Original file line number Diff line number Diff line change
Expand Up @@ -240,10 +240,9 @@ export class CamelDefinitionYaml {
return xValue;
}
} else {
if (value.dslName === 'YAMLDataFormat') { // YAMLDataFormat constructor field
if (value?.dslName === 'YAMLDataFormat') { // YAMLDataFormat constructor field
value.constructor = value._constructor;
delete value._constructor;
return value;
}
delete value?.dslName;
return value;
Expand Down
1 change: 0 additions & 1 deletion karavan-core/test/yamDataFormat.camel.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
- marshal:
id: marshal-7abc
yaml:
dslName: YAMLDataFormat
id: yaml-b347
library: hello
constructor: any-constructor
Expand Down
13 changes: 0 additions & 13 deletions karavan-core/test/yamDataFormat.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,21 +16,8 @@
*/
import {expect} from 'chai';
import 'mocha';
import {
FromDefinition,
LogDefinition,
WhenDefinition,
ChoiceDefinition,
MulticastDefinition,
ExpressionDefinition,
RouteDefinition, TryDefinition,CatchDefinition
} from "../src/core/model/CamelDefinition";
import {CamelDefinitionApiExt} from "../src/core/api/CamelDefinitionApiExt";
import {CamelDefinitionYaml} from "../src/core/api/CamelDefinitionYaml";
import {SimpleExpression} from "../src/core/model/CamelDefinition";
import {Integration} from "../src/core/model/IntegrationDefinition";
import * as fs from 'fs';
import { MarshalDefinition, YAMLDataFormat } from '../lib/model/CamelDefinition';

describe('YAML Data Format', () => {

Expand Down
1 change: 0 additions & 1 deletion karavan-core/test/yamDataFormat1.camel.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,5 @@
- marshal:
id: marshal-7abc
yaml:
dslName: YAMLDataFormat
id: yaml-b347
library: hello
1 change: 0 additions & 1 deletion karavan-core/test/yamDataFormat2.camel.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
- marshal:
id: marshal-7abc
yaml:
dslName: YAMLDataFormat
id: yaml-b347
library: hello
constructor: test

0 comments on commit 7a06215

Please sign in to comment.