@@ -231,15 +231,24 @@ from the path object.
231
231
responses: {
232
232
' 200' : {
233
233
description: ' Note model instance' ,
234
- content: {' application/json' : {schema: getModelSchemaRef (Note )}},
234
+ content: {
235
+ ' application/json' : {
236
+ schema: getModelSchemaRef (Note , {includeRelations: true }),
237
+ },
238
+ },
235
239
},
236
240
},
237
241
})
238
- async findById (@param .path .string (' id' ) id : string ): Promise < Note > {
239
- return this.noteRepository.findById(id);
242
+ async findById (
243
+ @param .path .string (' id' ) id : string ,
244
+ @param .query .object (' filter' , getFilterSchemaFor (Note )) filter ?: Filter < Note >
245
+ ): Promise < Note > {
246
+ return this.noteRepository.findById(id , filter);
240
247
}
241
248
```
242
249
250
+ (Notice: the filter for ` findById() ` method only supports the ` include ` clause for now.)
251
+
243
252
You can also specify a parameter which is an object value encoded as a JSON
244
253
string or in multiple nested keys. For a JSON string, a sample value would be
245
254
` location={"lang": 23.414, "lat": -98.1515} ` . For the same ` location ` object, it
@@ -378,7 +387,7 @@ details.
378
387
```
379
388
380
389
During development and testing, it may be useful to see all error details in the
381
- HTTP responsed returned by the server. This behavior can be enabled by enabling
390
+ HTTP response returned by the server. This behavior can be enabled by enabling
382
391
the ` debug ` flag in error-handler configuration as shown in the code example
383
392
below. See strong-error-handler
384
393
[ docs] ( https://github.com/strongloop/strong-error-handler#options ) for a list of
0 commit comments