Skip to content

Commit ca1c70f

Browse files
authored
Merge pull request #8 from Anshukumar123975/main
Add semantic validations under enums, imports, maps, namespaces and scalars specification
2 parents b9c9d67 + 8744232 commit ca1c70f

File tree

74 files changed

+548
-1
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

74 files changed

+548
-1
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
"description": "",
55
"main": "index.js",
66
"scripts": {
7-
"test": "npx vitest semantic/specifications/concepts/tests/concepts.test.js"
7+
"test": "npx vitest semantic/specifications/"
88
},
99
"keywords": [],
1010
"author": "",
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
namespace org.example.enums.invalid
2+
3+
enum Status {
4+
o ACTIVE
5+
o INACTIVE
6+
}
7+
8+
enum Status {
9+
o ENABLED
10+
o DISABLED
11+
}
12+
13+
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
namespace org.example.enums.valid
2+
3+
enum Status {
4+
o ACTIVE
5+
o INACTIVE
6+
}
7+
8+
enum Priority {
9+
o HIGH
10+
o MEDIUM
11+
o LOW
12+
}
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
namespace org.example.invalid
2+
3+
import org.external.imported.ConflictEnum
4+
5+
enum ConflictEnum {
6+
o LOCAL
7+
o GLOBAL
8+
}
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
namespace org.example.valid
2+
3+
import org.external.imported.ConflictEnum
4+
5+
enum LocalEnum {
6+
o VALUE1
7+
o VALUE2
8+
}
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
namespace org.external.imported
2+
3+
enum ConflictEnum {
4+
o GOOD
5+
}
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
namespace org.example.invalid
2+
3+
enum 123InvalidName {
4+
o OK
5+
o FAIL
6+
}
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
namespace org.example.valid
2+
3+
enum Status {
4+
o PENDING
5+
o APPROVED
6+
}

semantic/specifications/enums/models/invalid/declaration_001_duplicate_enum_names.cto

Whitespace-only changes.

semantic/specifications/enums/models/invalid/declaration_002_name_conflict_with_import.cto

Whitespace-only changes.

0 commit comments

Comments
 (0)