@@ -13,7 +13,13 @@ void describe('RestApiConstruct Lambda Handling', () => {
13
13
apiProps : [
14
14
{
15
15
path : 'items' ,
16
- methods : [ 'GET' ] ,
16
+ defaultAuthorizer : { type : 'none' } ,
17
+ methods : [
18
+ {
19
+ method : 'GET' ,
20
+ authorizer : { type : 'none' } ,
21
+ } ,
22
+ ] ,
17
23
lambdaEntry : {
18
24
runtime : lambda . Runtime . NODEJS_18_X ,
19
25
source : { path : 'packages/rest-api-construct/lib/test-assets' } ,
@@ -35,7 +41,13 @@ void describe('RestApiConstruct Lambda Handling', () => {
35
41
apiProps : [
36
42
{
37
43
path : 'items' ,
38
- methods : [ 'GET' ] ,
44
+ defaultAuthorizer : { type : 'none' } ,
45
+ methods : [
46
+ {
47
+ method : 'GET' ,
48
+ authorizer : { type : 'none' } ,
49
+ } ,
50
+ ] ,
39
51
lambdaEntry : {
40
52
runtime : lambda . Runtime . NODEJS_22_X ,
41
53
source : {
@@ -61,7 +73,12 @@ void describe('RestApiConstruct', () => {
61
73
apiProps : [
62
74
{
63
75
path : '/test' ,
64
- methods : [ 'GET' , 'POST' ] ,
76
+ methods : [
77
+ {
78
+ method : 'GET' ,
79
+ authorizer : { type : 'none' } ,
80
+ } ,
81
+ ] ,
65
82
lambdaEntry : {
66
83
runtime : lambda . Runtime . NODEJS_18_X ,
67
84
source : {
@@ -71,7 +88,17 @@ void describe('RestApiConstruct', () => {
71
88
} ,
72
89
{
73
90
path : '/blog' ,
74
- methods : [ 'GET' , 'POST' , 'PUT' ] ,
91
+ methods : [
92
+ {
93
+ method : 'POST' ,
94
+ authorizer : { type : 'userPool' , groups : [ 'Admins' ] } ,
95
+ } ,
96
+ {
97
+ method : 'GET' ,
98
+ authorizer : { type : 'userPool' } ,
99
+ } ,
100
+ ] ,
101
+ defaultAuthorizer : { type : 'userPool' } ,
75
102
lambdaEntry : {
76
103
runtime : lambda . Runtime . NODEJS_18_X ,
77
104
source : {
0 commit comments