You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: Tests/Fixtures/Etalon/annotated_version_controller.yml
+8-2Lines changed: 8 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -2,10 +2,16 @@ v1_user:
2
2
path: /users/v1.{_format}
3
3
controller: ::v1UserAction
4
4
methods: [GET]
5
-
condition: "request.attributes.get('version') == ('v1' or 'v3')"
5
+
condition: "request.attributes.get('version') in ['v1', 'v3']"
6
6
7
7
conditional_user:
8
8
path: /users/conditional.{_format}
9
9
controller: ::conditionalUserAction
10
10
methods: [GET]
11
-
condition: "(context.getMethod() in ['GET', 'HEAD'] and request.headers.get('User-Agent') matches '/firefox/i') and request.attributes.get('version') == ('v1' or 'v3')"
11
+
condition: "(request.attributes.get('version') in ['v1', 'v3']) and (context.getMethod() in ['GET', 'HEAD'] and request.headers.get('User-Agent') matches '/firefox/i')"
12
+
13
+
v3_user:
14
+
path: /users/v3.{_format}
15
+
controller: ::v3UserAction
16
+
methods: [GET]
17
+
condition: "request.attributes.get('version') in ['v1', 'v3']"
0 commit comments