Skip to content

Commit

Permalink
feat(dcs): downgrade dcs to version 0.2.0
Browse files Browse the repository at this point in the history
Signed-off-by: Jonathan Casey <[email protected]>
  • Loading branch information
jonathan-casey committed Oct 6, 2023
1 parent a83bffa commit b25603b
Show file tree
Hide file tree
Showing 14 changed files with 108 additions and 108 deletions.
2 changes: 1 addition & 1 deletion packages/concerto-core/lib/decoratormanager.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ const ModelUtil = require('./modelutil');
const { MetaModelNamespace } = require('@accordproject/concerto-metamodel');

const DCS_MODEL = `concerto version "^3.0.0"
namespace org.accordproject.decoratorcommands@0.4.0
namespace org.accordproject.decoratorcommands@0.2.0
import [email protected]
Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
{
"$class" : "org.accordproject.decoratorcommands@0.4.0.DecoratorCommandSet",
"$class" : "org.accordproject.decoratorcommands@0.2.0.DecoratorCommandSet",
"name" : "invalid-command",
"version": "1.0.0",
"commands" : [
{
"$class" : "org.accordproject.decoratorcommands@0.4.0.Command",
"$class" : "org.accordproject.decoratorcommands@0.2.0.Command",
"type" : "INVALID",
"target" : {
"$class" : "org.accordproject.decoratorcommands@0.4.0.CommandTarget",
"$class" : "org.accordproject.decoratorcommands@0.2.0.CommandTarget",
"type" : "[email protected]"
},
"decorator" : {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
{
"$class" : "org.accordproject.decoratorcommands@0.4.0.Invalid",
"$class" : "org.accordproject.decoratorcommands@0.2.0.Invalid",
"name" : "invalid-type",
"version": "1.0.0",
"commands" : [
{
"$class" : "org.accordproject.decoratorcommands@0.4.0.Command",
"$class" : "org.accordproject.decoratorcommands@0.2.0.Command",
"type" : "UPSERT",
"target" : {
"$class" : "org.accordproject.decoratorcommands@0.4.0.CommandTarget",
"$class" : "org.accordproject.decoratorcommands@0.2.0.CommandTarget",
"type" : "[email protected]"
},
"decorator" : {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
{
"$class" : "org.accordproject.decoratorcommands@0.4.0.DecoratorCommandSet",
"$class" : "org.accordproject.decoratorcommands@0.2.0.DecoratorCommandSet",
"name" : "invalid-target-namespace",
"version": "1.0.0",
"commands" : [
{
"$class" : "org.accordproject.decoratorcommands@0.4.0.Command",
"$class" : "org.accordproject.decoratorcommands@0.2.0.Command",
"type" : "UPSERT",
"target" : {
"$class" : "org.accordproject.decoratorcommands@0.4.0.CommandTarget",
"$class" : "org.accordproject.decoratorcommands@0.2.0.CommandTarget",
"namespace" : "[email protected]",
"declaration" : "Missing"
},
Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
{
"$class" : "org.accordproject.decoratorcommands@0.4.0.DecoratorCommandSet",
"$class" : "org.accordproject.decoratorcommands@0.2.0.DecoratorCommandSet",
"name" : "invalid-target-namespace",
"version": "1.0.0",
"commands" : [
{
"$class" : "org.accordproject.decoratorcommands@0.4.0.Command",
"$class" : "org.accordproject.decoratorcommands@0.2.0.Command",
"type" : "UPSERT",
"target" : {
"$class" : "org.accordproject.decoratorcommands@0.4.0.CommandTarget",
"$class" : "org.accordproject.decoratorcommands@0.2.0.CommandTarget",
"namespace" : "[email protected]"
},
"decorator" : {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
{
"$class" : "org.accordproject.decoratorcommands@0.4.0.DecoratorCommandSet",
"$class" : "org.accordproject.decoratorcommands@0.2.0.DecoratorCommandSet",
"name" : "invalid-target-properties",
"version": "1.0.0",
"commands" : [
{
"$class" : "org.accordproject.decoratorcommands@0.4.0.Command",
"$class" : "org.accordproject.decoratorcommands@0.2.0.Command",
"type" : "UPSERT",
"target" : {
"$class" : "org.accordproject.decoratorcommands@0.4.0.CommandTarget",
"$class" : "org.accordproject.decoratorcommands@0.2.0.CommandTarget",
"namespace" : "[email protected]",
"declaration" : "Person",
"properties" : ["missing"]
Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
{
"$class" : "org.accordproject.decoratorcommands@0.4.0.DecoratorCommandSet",
"$class" : "org.accordproject.decoratorcommands@0.2.0.DecoratorCommandSet",
"name" : "invalid-target-property-properties",
"version": "1.0.0",
"commands" : [
{
"$class" : "org.accordproject.decoratorcommands@0.4.0.Command",
"$class" : "org.accordproject.decoratorcommands@0.2.0.Command",
"type" : "UPSERT",
"target" : {
"$class" : "org.accordproject.decoratorcommands@0.4.0.CommandTarget",
"$class" : "org.accordproject.decoratorcommands@0.2.0.CommandTarget",
"namespace" : "[email protected]",
"declaration" : "Person",
"property" : "firstName",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
{
"$class" : "org.accordproject.decoratorcommands@0.4.0.DecoratorCommandSet",
"$class" : "org.accordproject.decoratorcommands@0.2.0.DecoratorCommandSet",
"name" : "invalid-target-property",
"version": "1.0.0",
"commands" : [
{
"$class" : "org.accordproject.decoratorcommands@0.4.0.Command",
"$class" : "org.accordproject.decoratorcommands@0.2.0.Command",
"type" : "UPSERT",
"target" : {
"$class" : "org.accordproject.decoratorcommands@0.4.0.CommandTarget",
"$class" : "org.accordproject.decoratorcommands@0.2.0.CommandTarget",
"namespace" : "[email protected]",
"declaration" : "Person",
"property" : "missing"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
{
"$class" : "org.accordproject.decoratorcommands@0.4.0.DecoratorCommandSet",
"$class" : "org.accordproject.decoratorcommands@0.2.0.DecoratorCommandSet",
"name" : "invalid-type",
"version": "1.0.0",
"commands" : [
{
"$class" : "org.accordproject.decoratorcommands@0.4.0.Command",
"$class" : "org.accordproject.decoratorcommands@0.2.0.Command",
"type" : "UPSERT",
"target" : {
"$class" : "org.accordproject.decoratorcommands@0.4.0.CommandTarget",
"$class" : "org.accordproject.decoratorcommands@0.2.0.CommandTarget",
"type" : "[email protected]"
},
"decorator" : {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
{
"$class" : "org.accordproject.decoratorcommands@0.4.0.DecoratorCommandSet",
"$class" : "org.accordproject.decoratorcommands@0.2.0.DecoratorCommandSet",
"name" : "web",
"version": "1.0.0",
"commands" : [
{
"$class" : "org.accordproject.decoratorcommands@0.4.0.Command",
"$class" : "org.accordproject.decoratorcommands@0.2.0.Command",
"type" : "APPEND",
"target" : {
"$class" : "org.accordproject.decoratorcommands@0.4.0.CommandTarget",
"$class" : "org.accordproject.decoratorcommands@0.2.0.CommandTarget",
"namespace" : "[email protected]",
"type" : "[email protected]",
"declaration" : "Dictionary",
Expand All @@ -20,10 +20,10 @@
}
},
{
"$class" : "org.accordproject.decoratorcommands@0.4.0.Command",
"$class" : "org.accordproject.decoratorcommands@0.2.0.Command",
"type" : "UPSERT",
"target" : {
"$class" : "org.accordproject.decoratorcommands@0.4.0.CommandTarget",
"$class" : "org.accordproject.decoratorcommands@0.2.0.CommandTarget",
"namespace" : "[email protected]",
"declaration" : "Dictionary",
"type" : "[email protected]",
Expand All @@ -36,10 +36,10 @@
}
},
{
"$class" : "org.accordproject.decoratorcommands@0.4.0.Command",
"$class" : "org.accordproject.decoratorcommands@0.2.0.Command",
"type" : "UPSERT",
"target" : {
"$class" : "org.accordproject.decoratorcommands@0.4.0.CommandTarget",
"$class" : "org.accordproject.decoratorcommands@0.2.0.CommandTarget",
"namespace" : "[email protected]",
"declaration" : "Dictionary",
"mapElement": "KEY"
Expand All @@ -51,10 +51,10 @@
}
},
{
"$class" : "org.accordproject.decoratorcommands@0.4.0.Command",
"$class" : "org.accordproject.decoratorcommands@0.2.0.Command",
"type" : "UPSERT",
"target" : {
"$class" : "org.accordproject.decoratorcommands@0.4.0.CommandTarget",
"$class" : "org.accordproject.decoratorcommands@0.2.0.CommandTarget",
"namespace" : "[email protected]",
"declaration" : "Dictionary",
"type" : "[email protected]",
Expand All @@ -67,10 +67,10 @@
}
},
{
"$class" : "org.accordproject.decoratorcommands@0.4.0.Command",
"$class" : "org.accordproject.decoratorcommands@0.2.0.Command",
"type" : "UPSERT",
"target" : {
"$class" : "org.accordproject.decoratorcommands@0.4.0.CommandTarget",
"$class" : "org.accordproject.decoratorcommands@0.2.0.CommandTarget",
"namespace" : "[email protected]",
"declaration" : "Dictionary",
"mapElement": "VALUE"
Expand All @@ -82,10 +82,10 @@
}
},
{
"$class" : "org.accordproject.decoratorcommands@0.4.0.Command",
"$class" : "org.accordproject.decoratorcommands@0.2.0.Command",
"type" : "UPSERT",
"target" : {
"$class" : "org.accordproject.decoratorcommands@0.4.0.CommandTarget",
"$class" : "org.accordproject.decoratorcommands@0.2.0.CommandTarget",
"namespace" : "[email protected]",
"declaration" : "Dictionary",
"mapElement": "KEY_VALUE"
Expand All @@ -98,10 +98,10 @@
},

{
"$class" : "org.accordproject.decoratorcommands@0.4.0.Command",
"$class" : "org.accordproject.decoratorcommands@0.2.0.Command",
"type" : "UPSERT",
"target" : {
"$class" : "org.accordproject.decoratorcommands@0.4.0.CommandTarget",
"$class" : "org.accordproject.decoratorcommands@0.2.0.CommandTarget",
"namespace" : "[email protected]",
"type" : "[email protected]",
"mapElement": "KEY_VALUE"
Expand All @@ -113,10 +113,10 @@
}
},
{
"$class" : "org.accordproject.decoratorcommands@0.4.0.Command",
"$class" : "org.accordproject.decoratorcommands@0.2.0.Command",
"type" : "UPSERT",
"target" : {
"$class" : "org.accordproject.decoratorcommands@0.4.0.CommandTarget",
"$class" : "org.accordproject.decoratorcommands@0.2.0.CommandTarget",
"namespace" : "[email protected]",
"type" : "[email protected]",
"mapElement": "KEY_VALUE"
Expand All @@ -128,10 +128,10 @@
}
},
{
"$class" : "org.accordproject.decoratorcommands@0.4.0.Command",
"$class" : "org.accordproject.decoratorcommands@0.2.0.Command",
"type" : "UPSERT",
"target" : {
"$class" : "org.accordproject.decoratorcommands@0.4.0.CommandTarget",
"$class" : "org.accordproject.decoratorcommands@0.2.0.CommandTarget",
"namespace" : "[email protected]",
"declaration" : "Dictionary",
"type" : "[email protected]"
Expand All @@ -143,10 +143,10 @@
}
},
{
"$class" : "org.accordproject.decoratorcommands@0.4.0.Command",
"$class" : "org.accordproject.decoratorcommands@0.2.0.Command",
"type" : "UPSERT",
"target" : {
"$class" : "org.accordproject.decoratorcommands@0.4.0.CommandTarget",
"$class" : "org.accordproject.decoratorcommands@0.2.0.CommandTarget",
"namespace" : "[email protected]",
"declaration" : "Dictionary",
"type" : "[email protected]"
Expand All @@ -158,10 +158,10 @@
}
},
{
"$class" : "org.accordproject.decoratorcommands@0.4.0.Command",
"$class" : "org.accordproject.decoratorcommands@0.2.0.Command",
"type" : "UPSERT",
"target" : {
"$class" : "org.accordproject.decoratorcommands@0.4.0.CommandTarget",
"$class" : "org.accordproject.decoratorcommands@0.2.0.CommandTarget",
"namespace" : "[email protected]",
"type" : "[email protected]"
},
Expand All @@ -172,10 +172,10 @@
}
},
{
"$class" : "org.accordproject.decoratorcommands@0.4.0.Command",
"$class" : "org.accordproject.decoratorcommands@0.2.0.Command",
"type" : "UPSERT",
"target" : {
"$class" : "org.accordproject.decoratorcommands@0.4.0.CommandTarget",
"$class" : "org.accordproject.decoratorcommands@0.2.0.CommandTarget",
"namespace" : "[email protected]",
"type" : "[email protected]"
},
Expand Down
26 changes: 13 additions & 13 deletions packages/concerto-core/test/data/decoratorcommands/web.json
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
{
"$class" : "org.accordproject.decoratorcommands@0.4.0.DecoratorCommandSet",
"$class" : "org.accordproject.decoratorcommands@0.2.0.DecoratorCommandSet",
"name" : "web",
"version": "1.0.0",
"commands" : [
{
"$class" : "org.accordproject.decoratorcommands@0.4.0.Command",
"$class" : "org.accordproject.decoratorcommands@0.2.0.Command",
"type" : "UPSERT",
"target" : {
"$class" : "org.accordproject.decoratorcommands@0.4.0.CommandTarget",
"$class" : "org.accordproject.decoratorcommands@0.2.0.CommandTarget",
"type" : "[email protected]"
},
"decorator" : {
Expand All @@ -26,10 +26,10 @@
}
},
{
"$class" : "org.accordproject.decoratorcommands@0.4.0.Command",
"$class" : "org.accordproject.decoratorcommands@0.2.0.Command",
"type" : "APPEND",
"target" : {
"$class" : "org.accordproject.decoratorcommands@0.4.0.CommandTarget",
"$class" : "org.accordproject.decoratorcommands@0.2.0.CommandTarget",
"type" : "[email protected]"
},
"decorator" : {
Expand All @@ -39,10 +39,10 @@
}
},
{
"$class" : "org.accordproject.decoratorcommands@0.4.0.Command",
"$class" : "org.accordproject.decoratorcommands@0.2.0.Command",
"type" : "UPSERT",
"target" : {
"$class" : "org.accordproject.decoratorcommands@0.4.0.CommandTarget",
"$class" : "org.accordproject.decoratorcommands@0.2.0.CommandTarget",
"namespace" : "[email protected]",
"declaration" : "Person",
"property" : "bio"
Expand All @@ -63,10 +63,10 @@
}
},
{
"$class" : "org.accordproject.decoratorcommands@0.4.0.Command",
"$class" : "org.accordproject.decoratorcommands@0.2.0.Command",
"type" : "UPSERT",
"target" : {
"$class" : "org.accordproject.decoratorcommands@0.4.0.CommandTarget",
"$class" : "org.accordproject.decoratorcommands@0.2.0.CommandTarget",
"namespace" : "test",
"declaration" : "Person",
"property" : "bio"
Expand All @@ -78,10 +78,10 @@
}
},
{
"$class" : "org.accordproject.decoratorcommands@0.4.0.Command",
"$class" : "org.accordproject.decoratorcommands@0.2.0.Command",
"type" : "UPSERT",
"target" : {
"$class" : "org.accordproject.decoratorcommands@0.4.0.CommandTarget",
"$class" : "org.accordproject.decoratorcommands@0.2.0.CommandTarget",
"namespace" : "[email protected]",
"declaration" : "SSN"
},
Expand All @@ -93,10 +93,10 @@
}
},
{
"$class" : "org.accordproject.decoratorcommands@0.4.0.Command",
"$class" : "org.accordproject.decoratorcommands@0.2.0.Command",
"type" : "UPSERT",
"target" : {
"$class" : "org.accordproject.decoratorcommands@0.4.0.CommandTarget",
"$class" : "org.accordproject.decoratorcommands@0.2.0.CommandTarget",
"namespace" : "test",
"declaration" : "Person",
"type" : "[email protected]",
Expand Down
2 changes: 1 addition & 1 deletion packages/concerto-core/test/decoratormanager.js
Original file line number Diff line number Diff line change
Expand Up @@ -378,7 +378,7 @@ describe('DecoratorManager', () => {
(() => {
DecoratorManager.decorateModels( testModelManager, JSON.parse(dcs),
{validate: true});
}).should.throw(/Type "Invalid" is not defined in namespace "org.accordproject.decoratorcommands@0.4.0"/);
}).should.throw(/Type "Invalid" is not defined in namespace "org.accordproject.decoratorcommands@0.2.0"/);
});

it('should detect decorator command set with an invalid command type', async function() {
Expand Down
Loading

0 comments on commit b25603b

Please sign in to comment.