Skip to content

Commit b3aeb90

Browse files
committed
- added fullClassification query parameter to profile api call
1 parent 5fc1b51 commit b3aeb90

File tree

1 file changed

+11
-2
lines changed

1 file changed

+11
-2
lines changed

grails-app/controllers/au/org/ala/profile/api/ApiController.groovy

+11-2
Original file line numberDiff line numberDiff line change
@@ -331,12 +331,21 @@ class ApiController extends BaseController {
331331
@Parameter(name = "onlyContent",
332332
in = ParameterIn.QUERY,
333333
required = false,
334-
description = "if true, only return the species description and not additional information like opus metadata etc.",
334+
description = "if true, only return the species description and not additional information like opus metadata, map configuration etc.",
335335
schema = @Schema(
336336
name = "onlyContent",
337337
type = "boolean",
338338
defaultValue = "false"
339339
)),
340+
@Parameter(name = "fullClassification",
341+
in = ParameterIn.QUERY,
342+
required = false,
343+
description = "if true, annotate classification with links to its profile page. Response will be slow.",
344+
schema = @Schema(
345+
name = "fullClassification",
346+
type = "boolean",
347+
defaultValue = "true"
348+
)),
340349
@Parameter(name = "Access-Token",
341350
in = ParameterIn.HEADER,
342351
required = false,
@@ -361,7 +370,7 @@ class ApiController extends BaseController {
361370
} else {
362371
response.setContentType(CONTENT_TYPE_JSON)
363372
boolean latest = false
364-
final fullClassification = true
373+
boolean fullClassification = params.getBoolean('fullClassification', true)
365374
boolean includeImages = params.getBoolean('includeImages', false)
366375
boolean onlyContent = params.getBoolean('onlyContent', false)
367376
Map profileAndOpus

0 commit comments

Comments
 (0)