mirror of
https://github.com/danieldemus/openhab-core.git
synced 2025-01-10 13:21:53 +01:00
ActionOutput: Document QR code rendering & Fix action REST doc (#4421)
Signed-off-by: Florian Hotze <dev@florianhotze.com>
This commit is contained in:
parent
fa73d3cb49
commit
63788b061b
@ -149,7 +149,7 @@ public class ThingActionsResource implements RESTResource {
|
||||
@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);
|
||||
|
@ -29,8 +29,28 @@ import java.lang.annotation.Target;
|
||||
@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 "";
|
||||
|
Loading…
Reference in New Issue
Block a user