File tree Expand file tree Collapse file tree 2 files changed +15
-1
lines changed Expand file tree Collapse file tree 2 files changed +15
-1
lines changed Original file line number Diff line number Diff line change @@ -188,7 +188,7 @@ paths:
188188 get :
189189 description : >-
190190 Get all resource roles. If isActive parameter is provided, filter the
191- results by isActive property .
191+ results by the set properties .
192192 tags :
193193 - Resource Roles
194194 security :
@@ -202,6 +202,18 @@ paths:
202202 type : string
203203 in : query
204204 description : Filters the results based on the `name` property
205+ - name : legacyId
206+ type : number
207+ in : query
208+ description : Filters the results based on the `legacyId` property
209+ - name : selfObtainable
210+ type : boolean
211+ in : query
212+ description : Filters the results based on the `selfObtainable` property
213+ - name : fullAccess
214+ type : boolean
215+ in : query
216+ description : Filters the results based on the `fullAccess` property
205217 responses :
206218 ' 200 ' :
207219 description : OK - the request was successful
Original file line number Diff line number Diff line change @@ -20,6 +20,7 @@ async function getResourceRoles (criteria) {
2020 let records = await helper . scan ( 'ResourceRole' )
2121 if ( criteria . name ) records = _ . filter ( records , e => ( criteria . name === e . name ) )
2222 if ( criteria . id ) records = _ . filter ( records , e => ( criteria . id === e . id ) )
23+ if ( criteria . legacyId ) records = _ . filter ( records , e => ( criteria . legacyId === e . legacyId ) )
2324 if ( ! _ . isUndefined ( criteria . isActive ) ) records = _ . filter ( records , e => ( e . isActive === ( criteria . isActive === 'true' ) ) )
2425 if ( ! _ . isUndefined ( criteria . selfObtainable ) ) records = _ . filter ( records , e => ( e . selfObtainable === ( criteria . selfObtainable === 'true' ) ) )
2526 if ( ! _ . isUndefined ( criteria . fullAccess ) ) records = _ . filter ( records , e => ( e . fullAccess === ( criteria . fullAccess === 'true' ) ) )
@@ -33,6 +34,7 @@ getResourceRoles.schema = {
3334 selfObtainable : Joi . boolean ( ) ,
3435 fullAccess : Joi . boolean ( ) ,
3536 id : Joi . id ( ) ,
37+ legacyId : Joi . number ( ) ,
3638 name : Joi . string ( )
3739 } ) . required ( )
3840}
You can’t perform that action at this time.
0 commit comments