Skip to content

Commit 63788b0

Browse files
authored
ActionOutput: Document QR code rendering & Fix action REST doc (#4421)
Signed-off-by: Florian Hotze <[email protected]>
1 parent fa73d3c commit 63788b0

File tree

2 files changed

+21
-1
lines changed
  • bundles
    • org.openhab.core.automation/src/main/java/org/openhab/core/automation/annotation
    • org.openhab.core.automation.rest/src/main/java/org/openhab/core/automation/rest/internal

2 files changed

+21
-1
lines changed

bundles/org.openhab.core.automation.rest/src/main/java/org/openhab/core/automation/rest/internal/ThingActionsResource.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,7 @@ protected void removeModuleHandlerFactory(ModuleHandlerFactory moduleHandlerFact
149149
@Produces(MediaType.APPLICATION_JSON)
150150
@Operation(operationId = "getAvailableActionsForThing", summary = "Get all available actions for provided thing UID", responses = {
151151
@ApiResponse(responseCode = "200", description = "OK", content = @Content(array = @ArraySchema(schema = @Schema(implementation = ThingActionDTO.class), uniqueItems = true))),
152-
@ApiResponse(responseCode = "204", description = "No actions found.") })
152+
@ApiResponse(responseCode = "404", description = "No actions found.") })
153153
public Response getActions(@PathParam("thingUID") @Parameter(description = "thingUID") String thingUID,
154154
@HeaderParam(HttpHeaders.ACCEPT_LANGUAGE) @Parameter(description = "language") @Nullable String language) {
155155
Locale locale = localeService.getLocale(language);

bundles/org.openhab.core.automation/src/main/java/org/openhab/core/automation/annotation/ActionOutput.java

+20
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,28 @@
2929
@Target(ElementType.METHOD)
3030
public @interface ActionOutput {
3131

32+
/**
33+
* Name of the output parameter
34+
* <p>
35+
* There are some reserved names that make the UI render the output pretty and not just as a text field:
36+
* <ul>
37+
* <li>qrCode: Render the output as a QR code.</li>
38+
* </ul>
39+
*
40+
* @return the name of the output parameter
41+
*/
3242
String name();
3343

44+
/**
45+
* Type of the output parameter
46+
* <p>
47+
* There are some special types that make the UI render the output pretty and not just as a text field:
48+
* <ul>
49+
* <li>qrCode: Render the output as a QR code.</li>
50+
* </ul>
51+
*
52+
* @return the type of the output parameter
53+
*/
3454
String type();
3555

3656
String label() default "";

0 commit comments

Comments
 (0)