Skip to content

Commit 0574b47

Browse files
committed
feat(test): add schema tests
1 parent 413fe0d commit 0574b47

19 files changed

+83
-1
lines changed
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
overlay: 1.0.0
2+
info:
3+
title: Invalid `target`, must begin with `$`
4+
version: 1.0.0
5+
actions:
6+
- target: info.description
7+
update: An updated description
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
overlay: 1.0.0
2+
info:
3+
title: Minimal actions
4+
version: 1.0.0
5+
actions: []
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
overlay: 1.0.0
2+
info:
3+
title: Missing actions `target`
4+
version: 1.0.0
5+
actions:
6+
- update: my description
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
overlay: 1.0.0
2+
info:
3+
title: Missing `actions`
4+
version: 1.0.0
5+
extends: '/openapi.yaml'
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
overlay: 1.0.0
2+
info:
3+
title: No `update` with `remove`
4+
version: 1.0.0
5+
actions:
6+
- target: $.info
7+
update:
8+
description: An updated description
9+
remove: true
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
overlay: 1.0.0
2+
info:
3+
title: Actions not unique
4+
version: 1.0.0
5+
actions:
6+
- target: '$.info.title'
7+
update: 'My New title'
8+
- target: '$.info.title'
9+
update: 'My New title'
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
overlay: 1.0.0
2+
info:
3+
title: Invalid `extends` type
4+
version: 1.0.0
5+
extends: {}
6+
actions: []
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
overlay: 1.0.0
2+
info:
3+
version: 1.0.0
4+
actions: []
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
overlay: 1.0.0
2+
info:
3+
title: Missing Info version
4+
actions: []
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
overlay: 2
2+
info:
3+
title: Invalid Overlay version
4+
version: 1.0.0
5+
actions: []

0 commit comments

Comments
 (0)