Skip to content

Commit

Permalink
ActionOutput: Document QR code rendering & Fix action REST doc (#4421)
Browse files Browse the repository at this point in the history
Signed-off-by: Florian Hotze <[email protected]>
  • Loading branch information
florian-h05 authored Oct 26, 2024
1 parent fa73d3c commit 63788b0
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ protected void removeModuleHandlerFactory(ModuleHandlerFactory moduleHandlerFact
@Produces(MediaType.APPLICATION_JSON)
@Operation(operationId = "getAvailableActionsForThing", summary = "Get all available actions for provided thing UID", responses = {
@ApiResponse(responseCode = "200", description = "OK", content = @Content(array = @ArraySchema(schema = @Schema(implementation = ThingActionDTO.class), uniqueItems = true))),
@ApiResponse(responseCode = "204", description = "No actions found.") })
@ApiResponse(responseCode = "404", description = "No actions found.") })
public Response getActions(@PathParam("thingUID") @Parameter(description = "thingUID") String thingUID,
@HeaderParam(HttpHeaders.ACCEPT_LANGUAGE) @Parameter(description = "language") @Nullable String language) {
Locale locale = localeService.getLocale(language);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,28 @@
@Target(ElementType.METHOD)
public @interface ActionOutput {

/**
* Name of the output parameter
* <p>
* There are some reserved names that make the UI render the output pretty and not just as a text field:
* <ul>
* <li>qrCode: Render the output as a QR code.</li>
* </ul>
*
* @return the name of the output parameter
*/
String name();

/**
* Type of the output parameter
* <p>
* There are some special types that make the UI render the output pretty and not just as a text field:
* <ul>
* <li>qrCode: Render the output as a QR code.</li>
* </ul>
*
* @return the type of the output parameter
*/
String type();

String label() default "";
Expand Down

0 comments on commit 63788b0

Please sign in to comment.