Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ActionOutput: Document QR code rendering & Fix action REST doc #4421

Merged
merged 1 commit into from
Oct 26, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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