Skip to content

Commit

Permalink
fix(decorator): remove failing decorator
Browse files Browse the repository at this point in the history
  • Loading branch information
muhammed-abdulkadir committed Oct 16, 2024
1 parent ac04cc8 commit 152ad74
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 72 deletions.
70 changes: 4 additions & 66 deletions test/codegen/__snapshots__/codegen.js.snap
Original file line number Diff line number Diff line change
Expand Up @@ -1159,7 +1159,6 @@ import org.acme.hr.base.State;
import org.acme.hr.base.SSN;
import org.acme.hr.base.Time;
import org.acme.hr.base.EmployeeTShirtSizes;
import org.acme.hr.base.Level;
import org.acme.hr.base.GeneralCategory;
import concerto.Concept;
import concerto.Asset;
Expand Down Expand Up @@ -1257,7 +1256,6 @@ import org.acme.hr.base.State;
import org.acme.hr.base.SSN;
import org.acme.hr.base.Time;
import org.acme.hr.base.EmployeeTShirtSizes;
import org.acme.hr.base.Level;
import org.acme.hr.base.GeneralCategory;
import concerto.Concept;
import concerto.Asset;
Expand Down Expand Up @@ -1314,7 +1312,6 @@ import org.acme.hr.base.State;
import org.acme.hr.base.SSN;
import org.acme.hr.base.Time;
import org.acme.hr.base.EmployeeTShirtSizes;
import org.acme.hr.base.Level;
import org.acme.hr.base.GeneralCategory;
import concerto.Concept;
import concerto.Asset;
Expand Down Expand Up @@ -1355,7 +1352,6 @@ import org.acme.hr.base.State;
import org.acme.hr.base.SSN;
import org.acme.hr.base.Time;
import org.acme.hr.base.EmployeeTShirtSizes;
import org.acme.hr.base.Level;
import org.acme.hr.base.GeneralCategory;
import concerto.Concept;
import concerto.Asset;
Expand Down Expand Up @@ -1454,7 +1450,6 @@ import org.acme.hr.base.State;
import org.acme.hr.base.SSN;
import org.acme.hr.base.Time;
import org.acme.hr.base.EmployeeTShirtSizes;
import org.acme.hr.base.Level;
import org.acme.hr.base.GeneralCategory;
import concerto.Concept;
import concerto.Asset;
Expand Down Expand Up @@ -1544,7 +1539,6 @@ import org.acme.hr.base.State;
import org.acme.hr.base.SSN;
import org.acme.hr.base.Time;
import org.acme.hr.base.EmployeeTShirtSizes;
import org.acme.hr.base.Level;
import org.acme.hr.base.GeneralCategory;
import concerto.Concept;
import concerto.Asset;
Expand Down Expand Up @@ -1592,7 +1586,6 @@ import org.acme.hr.base.State;
import org.acme.hr.base.SSN;
import org.acme.hr.base.Time;
import org.acme.hr.base.EmployeeTShirtSizes;
import org.acme.hr.base.Level;
import org.acme.hr.base.GeneralCategory;
import concerto.Concept;
import concerto.Asset;
Expand Down Expand Up @@ -1633,7 +1626,6 @@ import org.acme.hr.base.State;
import org.acme.hr.base.SSN;
import org.acme.hr.base.Time;
import org.acme.hr.base.EmployeeTShirtSizes;
import org.acme.hr.base.Level;
import org.acme.hr.base.GeneralCategory;
import concerto.Concept;
import concerto.Asset;
Expand All @@ -1659,7 +1651,6 @@ import org.acme.hr.base.State;
import org.acme.hr.base.SSN;
import org.acme.hr.base.Time;
import org.acme.hr.base.EmployeeTShirtSizes;
import org.acme.hr.base.Level;
import org.acme.hr.base.GeneralCategory;
import concerto.Concept;
import concerto.Asset;
Expand Down Expand Up @@ -1692,7 +1683,6 @@ import org.acme.hr.base.State;
import org.acme.hr.base.SSN;
import org.acme.hr.base.Time;
import org.acme.hr.base.EmployeeTShirtSizes;
import org.acme.hr.base.Level;
import org.acme.hr.base.GeneralCategory;
import concerto.Concept;
import concerto.Asset;
Expand Down Expand Up @@ -2211,16 +2201,7 @@ exports[`codegen #formats check we can convert all formats from namespace unvers
},
"manager": {
"type": "string",
"description": "The identifier of an instance of org.acme.hr.Manager",
"$decorators": {
"level": [
{
"type": "Identifier",
"name": "Level",
"array": false
}
]
}
"description": "The identifier of an instance of org.acme.hr.Manager"
},
"email": {
"type": "string",
Expand Down Expand Up @@ -2557,7 +2538,6 @@ class \`org.acme.hr.base.Level\`
- org.acme.hr.base.SSN
- org.acme.hr.base.Time
- org.acme.hr.base.EmployeeTShirtSizes
- org.acme.hr.base.Level
- org.acme.hr.base.GeneralCategory
- [email protected]
- [email protected]
Expand Down Expand Up @@ -3150,8 +3130,6 @@ exports[`codegen #formats check we can convert all formats from namespace unvers
<Property Name="company" Type="org.acme.hr.Company" >
</Property>
<NavigationProperty Name="manager" Type="org.acme.hr.Manager" Nullable="true">
<Annotation Term="level" Bool="true"/>
<Annotation Term="level0" String="Level" />
</NavigationProperty>
</EntityType>
<EntityType Name="Manager" BaseType="org.acme.hr.Employee">
Expand Down Expand Up @@ -3680,16 +3658,7 @@ exports[`codegen #formats check we can convert all formats from namespace unvers
},
"manager": {
"type": "string",
"description": "The identifier of an instance of org.acme.hr.Manager",
"$decorators": {
"level": [
{
"type": "Identifier",
"name": "Level",
"array": false
}
]
}
"description": "The identifier of an instance of org.acme.hr.Manager"
},
"email": {
"type": "string",
Expand Down Expand Up @@ -7659,7 +7628,6 @@ import org.acme.hr.base.State;
import org.acme.hr.base.SSN;
import org.acme.hr.base.Time;
import org.acme.hr.base.EmployeeTShirtSizes;
import org.acme.hr.base.Level;
import org.acme.hr.base.GeneralCategory;
import concerto.Concept;
import concerto.Asset;
Expand Down Expand Up @@ -7757,7 +7725,6 @@ import org.acme.hr.base.State;
import org.acme.hr.base.SSN;
import org.acme.hr.base.Time;
import org.acme.hr.base.EmployeeTShirtSizes;
import org.acme.hr.base.Level;
import org.acme.hr.base.GeneralCategory;
import concerto.Concept;
import concerto.Asset;
Expand Down Expand Up @@ -7814,7 +7781,6 @@ import org.acme.hr.base.State;
import org.acme.hr.base.SSN;
import org.acme.hr.base.Time;
import org.acme.hr.base.EmployeeTShirtSizes;
import org.acme.hr.base.Level;
import org.acme.hr.base.GeneralCategory;
import concerto.Concept;
import concerto.Asset;
Expand Down Expand Up @@ -7855,7 +7821,6 @@ import org.acme.hr.base.State;
import org.acme.hr.base.SSN;
import org.acme.hr.base.Time;
import org.acme.hr.base.EmployeeTShirtSizes;
import org.acme.hr.base.Level;
import org.acme.hr.base.GeneralCategory;
import concerto.Concept;
import concerto.Asset;
Expand Down Expand Up @@ -7954,7 +7919,6 @@ import org.acme.hr.base.State;
import org.acme.hr.base.SSN;
import org.acme.hr.base.Time;
import org.acme.hr.base.EmployeeTShirtSizes;
import org.acme.hr.base.Level;
import org.acme.hr.base.GeneralCategory;
import concerto.Concept;
import concerto.Asset;
Expand Down Expand Up @@ -8044,7 +8008,6 @@ import org.acme.hr.base.State;
import org.acme.hr.base.SSN;
import org.acme.hr.base.Time;
import org.acme.hr.base.EmployeeTShirtSizes;
import org.acme.hr.base.Level;
import org.acme.hr.base.GeneralCategory;
import concerto.Concept;
import concerto.Asset;
Expand Down Expand Up @@ -8092,7 +8055,6 @@ import org.acme.hr.base.State;
import org.acme.hr.base.SSN;
import org.acme.hr.base.Time;
import org.acme.hr.base.EmployeeTShirtSizes;
import org.acme.hr.base.Level;
import org.acme.hr.base.GeneralCategory;
import concerto.Concept;
import concerto.Asset;
Expand Down Expand Up @@ -8133,7 +8095,6 @@ import org.acme.hr.base.State;
import org.acme.hr.base.SSN;
import org.acme.hr.base.Time;
import org.acme.hr.base.EmployeeTShirtSizes;
import org.acme.hr.base.Level;
import org.acme.hr.base.GeneralCategory;
import concerto.Concept;
import concerto.Asset;
Expand All @@ -8159,7 +8120,6 @@ import org.acme.hr.base.State;
import org.acme.hr.base.SSN;
import org.acme.hr.base.Time;
import org.acme.hr.base.EmployeeTShirtSizes;
import org.acme.hr.base.Level;
import org.acme.hr.base.GeneralCategory;
import concerto.Concept;
import concerto.Asset;
Expand Down Expand Up @@ -8192,7 +8152,6 @@ import org.acme.hr.base.State;
import org.acme.hr.base.SSN;
import org.acme.hr.base.Time;
import org.acme.hr.base.EmployeeTShirtSizes;
import org.acme.hr.base.Level;
import org.acme.hr.base.GeneralCategory;
import concerto.Concept;
import concerto.Asset;
Expand Down Expand Up @@ -8711,16 +8670,7 @@ exports[`codegen #formats check we can convert all formats from namespace versio
},
"manager": {
"type": "string",
"description": "The identifier of an instance of [email protected]",
"$decorators": {
"level": [
{
"type": "Identifier",
"name": "Level",
"array": false
}
]
}
"description": "The identifier of an instance of [email protected]"
},
"email": {
"type": "string",
Expand Down Expand Up @@ -9057,7 +9007,6 @@ class \`[email protected]\`
- [email protected]
- [email protected]
- [email protected]
- [email protected]
- [email protected]
- [email protected]
- [email protected]
Expand Down Expand Up @@ -9666,8 +9615,6 @@ exports[`codegen #formats check we can convert all formats from namespace versio
<Property Name="company" Type="org.acme.hr.Company" >
</Property>
<NavigationProperty Name="manager" Type="org.acme.hr.Manager" Nullable="true">
<Annotation Term="level" Bool="true"/>
<Annotation Term="level0" String="Level" />
</NavigationProperty>
</EntityType>
<EntityType Name="Manager" BaseType="org.acme.hr.Employee">
Expand Down Expand Up @@ -10196,16 +10143,7 @@ exports[`codegen #formats check we can convert all formats from namespace versio
},
"manager": {
"type": "string",
"description": "The identifier of an instance of [email protected]",
"$decorators": {
"level": [
{
"type": "Identifier",
"name": "Level",
"array": false
}
]
}
"description": "The identifier of an instance of [email protected]"
},
"email": {
"type": "string",
Expand Down
3 changes: 1 addition & 2 deletions test/codegen/fromcto/data/model/hr.cto
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
@category(GeneralCategory)
namespace [email protected]

import [email protected].{Address, State, SSN, Time, EmployeeTShirtSizes, Level, GeneralCategory}
import [email protected].{Address, State, SSN, Time, EmployeeTShirtSizes, GeneralCategory}

map CompanyProperties {
o String
Expand Down Expand Up @@ -97,7 +97,6 @@ participant Employee extends Person {

participant Contractor extends Person {
o Company company
@level(Level)
--> Manager manager optional
}

Expand Down
4 changes: 0 additions & 4 deletions test/common/__snapshots__/graph.js.snap
Original file line number Diff line number Diff line change
Expand Up @@ -74,8 +74,6 @@ exports[`graph #visitor should visit a model manager 1`] = `
\`[email protected]\` <--> \`[email protected]\`
\`[email protected]\` --> \`[email protected]\`
\`[email protected]\` --> \`[email protected]\`
\`[email protected]\`
\`[email protected]\` --> \`[email protected]\`
\`[email protected]\`
\`[email protected]\` <--> \`[email protected]\`
\`[email protected]\` --> \`[email protected]\`
Expand Down Expand Up @@ -170,8 +168,6 @@ exports[`graph #visitor should visit a model manager and create a dependency gra
\`[email protected]\` --> \`[email protected]\`
\`[email protected]\` --> \`[email protected]\`
\`[email protected]\` --> \`[email protected]\`
\`[email protected]\`
\`[email protected]\` --> \`[email protected]\`
\`[email protected]\`
\`[email protected]\` <--> \`[email protected]\`
\`[email protected]\` --> \`[email protected]\`
Expand Down

0 comments on commit 152ad74

Please sign in to comment.