@@ -15,7 +15,13 @@ void describe('RestApiConstruct Lambda Handling', () => {
15
15
apiProps : [
16
16
{
17
17
path : 'items' ,
18
- methods : [ 'GET' ] ,
18
+ defaultAuthorizer : { type : 'none' } ,
19
+ methods : [
20
+ {
21
+ method : 'GET' ,
22
+ authorizer : { type : 'none' } ,
23
+ } ,
24
+ ] ,
19
25
lambdaEntry : {
20
26
runtime : lambda . Runtime . NODEJS_18_X ,
21
27
source : { path : 'packages/rest-api-construct/lib/test-assets' } ,
@@ -37,7 +43,13 @@ void describe('RestApiConstruct Lambda Handling', () => {
37
43
apiProps : [
38
44
{
39
45
path : 'items' ,
40
- methods : [ 'GET' ] ,
46
+ defaultAuthorizer : { type : 'none' } ,
47
+ methods : [
48
+ {
49
+ method : 'GET' ,
50
+ authorizer : { type : 'none' } ,
51
+ } ,
52
+ ] ,
41
53
lambdaEntry : {
42
54
runtime : lambda . Runtime . NODEJS_22_X ,
43
55
source : {
@@ -151,7 +163,12 @@ void describe('RestApiConstruct', () => {
151
163
apiProps : [
152
164
{
153
165
path : '/test' ,
154
- methods : [ 'GET' , 'POST' ] ,
166
+ methods : [
167
+ {
168
+ method : 'GET' ,
169
+ authorizer : { type : 'none' } ,
170
+ } ,
171
+ ] ,
155
172
lambdaEntry : {
156
173
runtime : lambda . Runtime . NODEJS_18_X ,
157
174
source : {
@@ -161,7 +178,17 @@ void describe('RestApiConstruct', () => {
161
178
} ,
162
179
{
163
180
path : '/blog' ,
164
- methods : [ 'GET' , 'POST' , 'PUT' ] ,
181
+ methods : [
182
+ {
183
+ method : 'POST' ,
184
+ authorizer : { type : 'userPool' , groups : [ 'Admins' ] } ,
185
+ } ,
186
+ {
187
+ method : 'GET' ,
188
+ authorizer : { type : 'userPool' } ,
189
+ } ,
190
+ ] ,
191
+ defaultAuthorizer : { type : 'userPool' } ,
165
192
lambdaEntry : {
166
193
runtime : lambda . Runtime . NODEJS_18_X ,
167
194
source : {
0 commit comments