Added operationIds for OpenAPI specification (#1861)

Signed-off-by: Christoph Hofmann <christoph@hofmann.pm>
pull/1915/head
Christoph Hofmann 2020-12-10 23:12:11 +01:00 committed by GitHub
parent fe677966af
commit bbede78dc9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
27 changed files with 131 additions and 125 deletions

View File

@ -95,7 +95,7 @@ public class ModuleTypeResource implements RESTResource {
@GET
@Produces(MediaType.APPLICATION_JSON)
@Operation(summary = "Get all available module types.", responses = {
@Operation(operationId = "getModuleTypes", summary = "Get all available module types.", responses = {
@ApiResponse(responseCode = "200", description = "OK", content = @Content(array = @ArraySchema(schema = @Schema(implementation = ModuleTypeDTO.class)))) })
public Response getAll(
@HeaderParam("Accept-Language") @Parameter(description = "language") @Nullable String language,
@ -120,7 +120,7 @@ public class ModuleTypeResource implements RESTResource {
@GET
@Path("/{moduleTypeUID}")
@Produces(MediaType.APPLICATION_JSON)
@Operation(summary = "Gets a module type corresponding to the given UID.", responses = {
@Operation(operationId = "getModuleTypeById", summary = "Gets a module type corresponding to the given UID.", responses = {
@ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = ModuleTypeDTO.class))),
@ApiResponse(responseCode = "404", description = "Module Type corresponding to the given UID does not found.") })
public Response getByUID(

View File

@ -137,7 +137,7 @@ public class RuleResource implements RESTResource {
@GET
@Produces(MediaType.APPLICATION_JSON)
@Operation(summary = "Get available rules, optionally filtered by tags and/or prefix.", responses = {
@Operation(operationId = "getRules", summary = "Get available rules, optionally filtered by tags and/or prefix.", responses = {
@ApiResponse(responseCode = "200", description = "OK", content = @Content(array = @ArraySchema(schema = @Schema(implementation = EnrichedRuleDTO.class)))) })
public Response get(@QueryParam("prefix") final @Nullable String prefix,
@QueryParam("tags") final @Nullable List<String> tags,
@ -167,7 +167,7 @@ public class RuleResource implements RESTResource {
@POST
@Consumes(MediaType.APPLICATION_JSON)
@Produces(MediaType.APPLICATION_JSON)
@Operation(summary = "Creates a rule.", responses = {
@Operation(operationId = "createRule", summary = "Creates a rule.", responses = {
@ApiResponse(responseCode = "201", description = "Created", headers = @Header(name = "Location", description = "Newly created Rule")),
@ApiResponse(responseCode = "409", description = "Creation of the rule is refused. Rule with the same UID already exists."),
@ApiResponse(responseCode = "400", description = "Creation of the rule is refused. Missing required parameter.") })
@ -190,7 +190,7 @@ public class RuleResource implements RESTResource {
@GET
@Path("/{ruleUID}")
@Produces(MediaType.APPLICATION_JSON)
@Operation(summary = "Gets the rule corresponding to the given UID.", responses = {
@Operation(operationId = "getRuleById", summary = "Gets the rule corresponding to the given UID.", responses = {
@ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = EnrichedRuleDTO.class))),
@ApiResponse(responseCode = "404", description = "Rule not found") })
public Response getByUID(@PathParam("ruleUID") @Parameter(description = "ruleUID") String ruleUID) {
@ -205,7 +205,7 @@ public class RuleResource implements RESTResource {
@DELETE
@Path("/{ruleUID}")
@Produces(MediaType.APPLICATION_JSON)
@Operation(summary = "Removes an existing rule corresponding to the given UID.", responses = {
@Operation(operationId = "deleteRule", summary = "Removes an existing rule corresponding to the given UID.", responses = {
@ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = String.class))),
@ApiResponse(responseCode = "404", description = "Rule corresponding to the given UID does not found.") })
public Response remove(@PathParam("ruleUID") @Parameter(description = "ruleUID") String ruleUID) {
@ -221,7 +221,7 @@ public class RuleResource implements RESTResource {
@PUT
@Path("/{ruleUID}")
@Consumes(MediaType.APPLICATION_JSON)
@Operation(summary = "Updates an existing rule corresponding to the given UID.", responses = {
@Operation(operationId = "updateRule", summary = "Updates an existing rule corresponding to the given UID.", responses = {
@ApiResponse(responseCode = "200", description = "OK"),
@ApiResponse(responseCode = "404", description = "Rule corresponding to the given UID does not found.") })
public Response update(@PathParam("ruleUID") @Parameter(description = "ruleUID") String ruleUID,
@ -240,7 +240,7 @@ public class RuleResource implements RESTResource {
@GET
@Path("/{ruleUID}/config")
@Produces(MediaType.APPLICATION_JSON)
@Operation(summary = "Gets the rule configuration values.", responses = {
@Operation(operationId = "getRuleConfiguration", summary = "Gets the rule configuration values.", responses = {
@ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = String.class))),
@ApiResponse(responseCode = "404", description = "Rule corresponding to the given UID does not found.") })
public Response getConfiguration(@PathParam("ruleUID") @Parameter(description = "ruleUID") String ruleUID)
@ -258,7 +258,7 @@ public class RuleResource implements RESTResource {
@PUT
@Path("/{ruleUID}/config")
@Consumes(MediaType.APPLICATION_JSON)
@Operation(summary = "Sets the rule configuration values.", responses = {
@Operation(operationId = "updateRuleConfiguration", summary = "Sets the rule configuration values.", responses = {
@ApiResponse(responseCode = "200", description = "OK"),
@ApiResponse(responseCode = "404", description = "Rule corresponding to the given UID does not found.") })
public Response updateConfiguration(@PathParam("ruleUID") @Parameter(description = "ruleUID") String ruleUID,
@ -280,7 +280,7 @@ public class RuleResource implements RESTResource {
@POST
@Path("/{ruleUID}/enable")
@Consumes(MediaType.TEXT_PLAIN)
@Operation(summary = "Sets the rule enabled status.", responses = {
@Operation(operationId = "enableRule", summary = "Sets the rule enabled status.", responses = {
@ApiResponse(responseCode = "200", description = "OK"),
@ApiResponse(responseCode = "404", description = "Rule corresponding to the given UID does not found.") })
public Response enableRule(@PathParam("ruleUID") @Parameter(description = "ruleUID") String ruleUID,
@ -300,7 +300,7 @@ public class RuleResource implements RESTResource {
@RolesAllowed({ Role.USER, Role.ADMIN })
@Path("/{ruleUID}/runnow")
@Consumes(MediaType.TEXT_PLAIN)
@Operation(summary = "Executes actions of the rule.", responses = {
@Operation(operationId = "runRuleNow", summary = "Executes actions of the rule.", responses = {
@ApiResponse(responseCode = "200", description = "OK"),
@ApiResponse(responseCode = "404", description = "Rule corresponding to the given UID does not found.") })
public Response runNow(@PathParam("ruleUID") @Parameter(description = "ruleUID") String ruleUID)
@ -319,7 +319,7 @@ public class RuleResource implements RESTResource {
@GET
@Path("/{ruleUID}/triggers")
@Produces(MediaType.APPLICATION_JSON)
@Operation(summary = "Gets the rule triggers.", responses = {
@Operation(operationId = "getRuleTriggers", summary = "Gets the rule triggers.", responses = {
@ApiResponse(responseCode = "200", description = "OK", content = @Content(array = @ArraySchema(schema = @Schema(implementation = TriggerDTO.class)))),
@ApiResponse(responseCode = "404", description = "Rule corresponding to the given UID does not found.") })
public Response getTriggers(@PathParam("ruleUID") @Parameter(description = "ruleUID") String ruleUID) {
@ -334,7 +334,7 @@ public class RuleResource implements RESTResource {
@GET
@Path("/{ruleUID}/conditions")
@Produces(MediaType.APPLICATION_JSON)
@Operation(summary = "Gets the rule conditions.", responses = {
@Operation(operationId = "getRuleConditions", summary = "Gets the rule conditions.", responses = {
@ApiResponse(responseCode = "200", description = "OK", content = @Content(array = @ArraySchema(schema = @Schema(implementation = ConditionDTO.class)))),
@ApiResponse(responseCode = "404", description = "Rule corresponding to the given UID does not found.") })
public Response getConditions(@PathParam("ruleUID") @Parameter(description = "ruleUID") String ruleUID) {
@ -349,7 +349,7 @@ public class RuleResource implements RESTResource {
@GET
@Path("/{ruleUID}/actions")
@Produces(MediaType.APPLICATION_JSON)
@Operation(summary = "Gets the rule actions.", responses = {
@Operation(operationId = "getRuleActions", summary = "Gets the rule actions.", responses = {
@ApiResponse(responseCode = "200", description = "OK", content = @Content(array = @ArraySchema(schema = @Schema(implementation = ActionDTO.class)))),
@ApiResponse(responseCode = "404", description = "Rule corresponding to the given UID does not found.") })
public Response getActions(@PathParam("ruleUID") @Parameter(description = "ruleUID") String ruleUID) {
@ -364,7 +364,7 @@ public class RuleResource implements RESTResource {
@GET
@Path("/{ruleUID}/{moduleCategory}/{id}")
@Produces(MediaType.APPLICATION_JSON)
@Operation(summary = "Gets the rule's module corresponding to the given Category and ID.", responses = {
@Operation(operationId = "getRuleModuleById", summary = "Gets the rule's module corresponding to the given Category and ID.", responses = {
@ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = ModuleDTO.class))),
@ApiResponse(responseCode = "404", description = "Rule corresponding to the given UID does not found or does not have a module with such Category and ID.") })
public Response getModuleById(@PathParam("ruleUID") @Parameter(description = "ruleUID") String ruleUID,
@ -383,7 +383,7 @@ public class RuleResource implements RESTResource {
@GET
@Path("/{ruleUID}/{moduleCategory}/{id}/config")
@Produces(MediaType.APPLICATION_JSON)
@Operation(summary = "Gets the module's configuration.", responses = {
@Operation(operationId = "getRuleModuleConfig", summary = "Gets the module's configuration.", responses = {
@ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = String.class))),
@ApiResponse(responseCode = "404", description = "Rule corresponding to the given UID does not found or does not have a module with such Category and ID.") })
public Response getModuleConfig(@PathParam("ruleUID") @Parameter(description = "ruleUID") String ruleUID,
@ -402,7 +402,7 @@ public class RuleResource implements RESTResource {
@GET
@Path("/{ruleUID}/{moduleCategory}/{id}/config/{param}")
@Produces(MediaType.TEXT_PLAIN)
@Operation(summary = "Gets the module's configuration parameter.", responses = {
@Operation(operationId = "getRuleModuleConfigParameter", summary = "Gets the module's configuration parameter.", responses = {
@ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = String.class))),
@ApiResponse(responseCode = "404", description = "Rule corresponding to the given UID does not found or does not have a module with such Category and ID.") })
public Response getModuleConfigParam(@PathParam("ruleUID") @Parameter(description = "ruleUID") String ruleUID,
@ -421,7 +421,7 @@ public class RuleResource implements RESTResource {
@PUT
@Path("/{ruleUID}/{moduleCategory}/{id}/config/{param}")
@Operation(summary = "Sets the module's configuration parameter value.", responses = {
@Operation(operationId = "setRuleModuleConfigParameter", summary = "Sets the module's configuration parameter value.", responses = {
@ApiResponse(responseCode = "200", description = "OK"),
@ApiResponse(responseCode = "404", description = "Rule corresponding to the given UID does not found or does not have a module with such Category and ID.") })
@Consumes(MediaType.TEXT_PLAIN)

View File

@ -86,7 +86,7 @@ public class TemplateResource implements RESTResource {
@GET
@Produces(MediaType.APPLICATION_JSON)
@Operation(summary = "Get all available templates.", responses = {
@Operation(operationId = "getTemplates", summary = "Get all available templates.", responses = {
@ApiResponse(responseCode = "200", description = "OK", content = @Content(array = @ArraySchema(schema = @Schema(implementation = Template.class)))) })
public Response getAll(
@HeaderParam("Accept-Language") @Parameter(description = "language") @Nullable String language) {
@ -99,7 +99,7 @@ public class TemplateResource implements RESTResource {
@GET
@Path("/{templateUID}")
@Produces(MediaType.APPLICATION_JSON)
@Operation(summary = "Gets a template corresponding to the given UID.", responses = {
@Operation(operationId = "getTemplateById", summary = "Gets a template corresponding to the given UID.", responses = {
@ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = Template.class))),
@ApiResponse(responseCode = "404", description = "Template corresponding to the given UID does not found.") })
public Response getByUID(

View File

@ -59,7 +59,7 @@ public class UUIDResource implements RESTResource {
@GET
@Produces(MediaType.TEXT_PLAIN)
@Operation(summary = "A unified unique id.", responses = {
@Operation(operationId = "getUUID", summary = "A unified unique id.", responses = {
@ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = String.class))) })
public Response getInstanceUUID() {
return Response.ok(InstanceUUID.get()).build();

View File

@ -89,7 +89,7 @@ public class AudioResource implements RESTResource {
@GET
@Path("/sources")
@Produces(MediaType.APPLICATION_JSON)
@Operation(summary = "Get the list of all sources.", responses = {
@Operation(operationId = "getAudioSources", summary = "Get the list of all sources.", responses = {
@ApiResponse(responseCode = "200", description = "OK", content = @Content(array = @ArraySchema(schema = @Schema(implementation = AudioSourceDTO.class)))) })
public Response getSources(
@HeaderParam(HttpHeaders.ACCEPT_LANGUAGE) @Parameter(description = "language") @Nullable String language) {
@ -105,7 +105,7 @@ public class AudioResource implements RESTResource {
@GET
@Path("/defaultsource")
@Produces(MediaType.APPLICATION_JSON)
@Operation(summary = "Get the default source if defined or the first available source.", responses = {
@Operation(operationId = "getAudioDefaultSource", summary = "Get the default source if defined or the first available source.", responses = {
@ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = AudioSourceDTO.class))),
@ApiResponse(responseCode = "404", description = "Source not found") })
public Response getDefaultSource(
@ -122,7 +122,7 @@ public class AudioResource implements RESTResource {
@GET
@Path("/sinks")
@Produces(MediaType.APPLICATION_JSON)
@Operation(summary = "Get the list of all sinks.", responses = {
@Operation(operationId = "getAudioSinks", summary = "Get the list of all sinks.", responses = {
@ApiResponse(responseCode = "200", description = "OK", content = @Content(array = @ArraySchema(schema = @Schema(implementation = AudioSinkDTO.class)))) })
public Response getSinks(
@HeaderParam(HttpHeaders.ACCEPT_LANGUAGE) @Parameter(description = "language") @Nullable String language) {
@ -138,7 +138,7 @@ public class AudioResource implements RESTResource {
@GET
@Path("/defaultsink")
@Produces(MediaType.APPLICATION_JSON)
@Operation(summary = "Get the default sink if defined or the first available sink.", responses = {
@Operation(operationId = "getAudioDefaultSink", summary = "Get the default sink if defined or the first available sink.", responses = {
@ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = AudioSinkDTO.class))),
@ApiResponse(responseCode = "404", description = "Sink not found") })
public Response getDefaultSink(

View File

@ -114,7 +114,7 @@ public class TokenResource implements RESTResource {
@Path("/token")
@Produces({ MediaType.APPLICATION_JSON })
@Consumes({ MediaType.APPLICATION_FORM_URLENCODED })
@Operation(summary = "Get access and refresh tokens.", responses = {
@Operation(operationId = "getOAuthToken", summary = "Get access and refresh tokens.", responses = {
@ApiResponse(responseCode = "200", description = "OK"),
@ApiResponse(responseCode = "400", description = "Invalid request parameters") })
public Response getToken(@FormParam("grant_type") String grantType, @FormParam("code") String code,
@ -144,7 +144,7 @@ public class TokenResource implements RESTResource {
@GET
@Path("/sessions")
@Operation(summary = "List the sessions associated to the authenticated user.", responses = {
@Operation(operationId = "getSessionsForCurrentUser", summary = "List the sessions associated to the authenticated user.", responses = {
@ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = UserSessionDTO.class))),
@ApiResponse(responseCode = "401", description = "User is not authenticated"),
@ApiResponse(responseCode = "404", description = "User not found") })
@ -165,7 +165,7 @@ public class TokenResource implements RESTResource {
@GET
@Path("/apitokens")
@Operation(summary = "List the API tokens associated to the authenticated user.", responses = {
@Operation(operationId = "getApiToken", summary = "List the API tokens associated to the authenticated user.", responses = {
@ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = UserApiTokenDTO.class))),
@ApiResponse(responseCode = "401", description = "User is not authenticated"),
@ApiResponse(responseCode = "404", description = "User not found") })
@ -186,7 +186,7 @@ public class TokenResource implements RESTResource {
@DELETE
@Path("/apitokens/{name}")
@Operation(summary = "Revoke a specified API token associated to the authenticated user.", responses = {
@Operation(operationId = "removeApiToken", summary = "Revoke a specified API token associated to the authenticated user.", responses = {
@ApiResponse(responseCode = "200", description = "OK"),
@ApiResponse(responseCode = "401", description = "User is not authenticated"),
@ApiResponse(responseCode = "404", description = "User or API token not found") })
@ -213,7 +213,7 @@ public class TokenResource implements RESTResource {
@POST
@Path("/logout")
@Consumes({ MediaType.APPLICATION_FORM_URLENCODED })
@Operation(summary = "Delete the session associated with a refresh token.", responses = {
@Operation(operationId = "deleteSession", summary = "Delete the session associated with a refresh token.", responses = {
@ApiResponse(responseCode = "200", description = "OK"),
@ApiResponse(responseCode = "401", description = "User is not authenticated"),
@ApiResponse(responseCode = "404", description = "User or refresh token not found") })

View File

@ -119,7 +119,7 @@ public class AddonResource implements RESTResource {
@GET
@Produces(MediaType.APPLICATION_JSON)
@Operation(summary = "Get all add-ons.", responses = {
@Operation(operationId = "getAddons", summary = "Get all add-ons.", responses = {
@ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = String.class))) })
public Response getAddon(
@HeaderParam("Accept-Language") @Parameter(description = "language") @Nullable String language) {
@ -131,7 +131,7 @@ public class AddonResource implements RESTResource {
@GET
@Path("/types")
@Produces(MediaType.APPLICATION_JSON)
@Operation(summary = "Get all add-on types.", responses = {
@Operation(operationId = "getAddonTypes", summary = "Get all add-on types.", responses = {
@ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = String.class))) })
public Response getTypes(
@HeaderParam("Accept-Language") @Parameter(description = "language") @Nullable String language) {
@ -144,7 +144,7 @@ public class AddonResource implements RESTResource {
@GET
@Path("/{addonId: [a-zA-Z_0-9-:]+}")
@Produces(MediaType.APPLICATION_JSON)
@Operation(summary = "Get add-on with given ID.", responses = {
@Operation(operationId = "getAddonById", summary = "Get add-on with given ID.", responses = {
@ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = String.class))),
@ApiResponse(responseCode = "404", description = "Not found") })
public Response getById(
@ -163,7 +163,7 @@ public class AddonResource implements RESTResource {
@POST
@Path("/{addonId: [a-zA-Z_0-9-:]+}/install")
@Operation(summary = "Installs the add-on with the given ID.", responses = {
@Operation(operationId = "installAddonById", summary = "Installs the add-on with the given ID.", responses = {
@ApiResponse(responseCode = "200", description = "OK") })
public Response installAddon(final @PathParam("addonId") @Parameter(description = "addon ID") String addonId) {
ThreadPoolManager.getPool(THREAD_POOL_NAME).submit(() -> {
@ -180,7 +180,7 @@ public class AddonResource implements RESTResource {
@POST
@Path("/url/{url}/install")
@Operation(summary = "Installs the add-on from the given URL.", responses = {
@Operation(operationId = "installAddonFromURL", summary = "Installs the add-on from the given URL.", responses = {
@ApiResponse(responseCode = "200", description = "OK"),
@ApiResponse(responseCode = "400", description = "The given URL is malformed or not valid.") })
public Response installAddonByURL(
@ -199,7 +199,7 @@ public class AddonResource implements RESTResource {
@POST
@Path("/{addonId: [a-zA-Z_0-9-:]+}/uninstall")
@Operation(summary = "Uninstalls the add-on with the given ID.", responses = {
@Operation(operationId = "uninstallAddon", summary = "Uninstalls the add-on with the given ID.", responses = {
@ApiResponse(responseCode = "200", description = "OK") })
public Response uninstallAddon(final @PathParam("addonId") @Parameter(description = "addon ID") String addonId) {
ThreadPoolManager.getPool(THREAD_POOL_NAME).submit(() -> {

View File

@ -115,7 +115,7 @@ public class BindingResource implements RESTResource {
@GET
@Produces(MediaType.APPLICATION_JSON)
@Operation(operationId = "getAllBindings", summary = "Get all bindings.", responses = {
@Operation(operationId = "getBindings", summary = "Get all bindings.", responses = {
@ApiResponse(responseCode = "200", description = "OK", content = @Content(array = @ArraySchema(schema = @Schema(implementation = BindingInfoDTO.class), uniqueItems = true))) })
public Response getAll(
@HeaderParam(HttpHeaders.ACCEPT_LANGUAGE) @Parameter(description = "language") @Nullable String language) {
@ -153,7 +153,7 @@ public class BindingResource implements RESTResource {
@Path("/{bindingId}/config")
@Consumes(MediaType.APPLICATION_JSON)
@Produces({ MediaType.APPLICATION_JSON })
@Operation(summary = "Updates a binding configuration for given binding ID and returns the old configuration.", responses = {
@Operation(operationId = "updateBindingConfiguration", summary = "Updates a binding configuration for given binding ID and returns the old configuration.", responses = {
@ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = String.class))),
@ApiResponse(responseCode = "204", description = "No old configuration"),
@ApiResponse(responseCode = "404", description = "Binding does not exist"),

View File

@ -114,7 +114,7 @@ public class ChannelTypeResource implements RESTResource {
@GET
@Produces(MediaType.APPLICATION_JSON)
@Operation(summary = "Gets all available channel types.", responses = {
@Operation(operationId = "getChannelTypes", summary = "Gets all available channel types.", responses = {
@ApiResponse(responseCode = "200", description = "OK", content = @Content(array = @ArraySchema(schema = @Schema(implementation = ChannelTypeDTO.class), uniqueItems = true))) })
public Response getAll(
@HeaderParam(HttpHeaders.ACCEPT_LANGUAGE) @Parameter(description = "language") @Nullable String language,
@ -138,7 +138,7 @@ public class ChannelTypeResource implements RESTResource {
@GET
@Path("/{channelTypeUID}")
@Produces(MediaType.APPLICATION_JSON)
@Operation(summary = "Gets channel type by UID.", responses = {
@Operation(operationId = "getChannelTypeByUID", summary = "Gets channel type by UID.", responses = {
@ApiResponse(responseCode = "200", description = "Channel type with provided channelTypeUID does not exist.", content = @Content(schema = @Schema(implementation = ChannelTypeDTO.class))),
@ApiResponse(responseCode = "404", description = "No content") })
public Response getByUID(
@ -156,7 +156,7 @@ public class ChannelTypeResource implements RESTResource {
@GET
@Path("/{channelTypeUID}/linkableItemTypes")
@Produces(MediaType.APPLICATION_JSON)
@Operation(summary = "Gets the item types the given trigger channel type UID can be linked to.", responses = {
@Operation(operationId = "getLinkableItemTypesByChannelTypeUID", summary = "Gets the item types the given trigger channel type UID can be linked to.", responses = {
@ApiResponse(responseCode = "200", description = "OK", content = @Content(array = @ArraySchema(schema = @Schema(implementation = String.class), uniqueItems = true))),
@ApiResponse(responseCode = "204", description = "No content: channel type has no linkable items or is no trigger channel."),
@ApiResponse(responseCode = "404", description = "Given channel type UID not found.") })

View File

@ -95,7 +95,7 @@ public class ConfigDescriptionResource implements RESTResource {
@GET
@Produces(MediaType.APPLICATION_JSON)
@Operation(operationId = "getAllConfigDescriptions", summary = "Gets all available config descriptions.", responses = {
@Operation(operationId = "getConfigDescriptions", summary = "Gets all available config descriptions.", responses = {
@ApiResponse(responseCode = "200", description = "OK", content = @Content(array = @ArraySchema(schema = @Schema(implementation = ConfigDescriptionDTO.class)))) })
public Response getAll(
@HeaderParam("Accept-Language") @Parameter(description = "language") @Nullable String language, //
@ -110,7 +110,7 @@ public class ConfigDescriptionResource implements RESTResource {
@GET
@Path("/{uri}")
@Produces(MediaType.APPLICATION_JSON)
@Operation(summary = "Gets a config description by URI.", responses = {
@Operation(operationId = "getConfigDescriptionByURI", summary = "Gets a config description by URI.", responses = {
@ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = ConfigDescriptionDTO.class))),
@ApiResponse(responseCode = "400", description = "Invalid URI syntax"),
@ApiResponse(responseCode = "404", description = "Not found") })

View File

@ -89,7 +89,7 @@ public class DiscoveryResource implements RESTResource {
@GET
@Produces(MediaType.APPLICATION_JSON)
@Operation(summary = "Gets all bindings that support discovery.", responses = {
@Operation(operationId = "getBindingsWithDiscoverySupport", summary = "Gets all bindings that support discovery.", responses = {
@ApiResponse(responseCode = "200", description = "OK", content = @Content(array = @ArraySchema(schema = @Schema(implementation = String.class), uniqueItems = true))) })
public Response getDiscoveryServices() {
Collection<String> supportedBindings = discoveryServiceRegistry.getSupportedBindings();
@ -99,7 +99,7 @@ public class DiscoveryResource implements RESTResource {
@POST
@Path("/bindings/{bindingId}/scan")
@Produces(MediaType.TEXT_PLAIN)
@Operation(summary = "Starts asynchronous discovery process for a binding and returns the timeout in seconds of the discovery operation.", responses = {
@Operation(operationId = "scan", summary = "Starts asynchronous discovery process for a binding and returns the timeout in seconds of the discovery operation.", responses = {
@ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = Integer.class))) })
public Response scan(@PathParam("bindingId") @Parameter(description = "bindingId") final String bindingId) {
discoveryServiceRegistry.startScan(bindingId, new ScanListener() {

View File

@ -65,9 +65,11 @@ import io.swagger.v3.oas.annotations.tags.Tag;
* Jersey servlet.
*
* @author Dennis Nobel - Initial contribution
* @author Kai Kreuzer - refactored for using the OSGi JAX-RS connector and removed ThingSetupManager
* @author Kai Kreuzer - refactored for using the OSGi JAX-RS connector and
* removed ThingSetupManager
* @author Yordan Zhelev - Added Swagger annotations
* @author Chris Jackson - Updated to use JSONResponse. Fixed null response from approve. Improved error reporting.
* @author Chris Jackson - Updated to use JSONResponse. Fixed null response from
* approve. Improved error reporting.
* @author Franck Dechavanne - Added DTOs to ApiResponses
* @author Markus Rathgeb - Migrated to JAX-RS Whiteboard Specification
* @author Wouter Born - Migrated to OpenAPI annotations
@ -99,7 +101,7 @@ public class InboxResource implements RESTResource {
@POST
@Path("/{thingUID}/approve")
@Consumes(MediaType.TEXT_PLAIN)
@Operation(summary = "Approves the discovery result by adding the thing to the registry.", responses = {
@Operation(operationId = "approveInboxItemById", summary = "Approves the discovery result by adding the thing to the registry.", responses = {
@ApiResponse(responseCode = "200", description = "OK"),
@ApiResponse(responseCode = "404", description = "Thing unable to be approved."),
@ApiResponse(responseCode = "409", description = "No binding found that supports this thing.") })
@ -129,7 +131,7 @@ public class InboxResource implements RESTResource {
@DELETE
@Path("/{thingUID}")
@Operation(summary = "Removes the discovery result from the inbox.", responses = {
@Operation(operationId = "removeItemFromInbox", summary = "Removes the discovery result from the inbox.", responses = {
@ApiResponse(responseCode = "200", description = "OK"),
@ApiResponse(responseCode = "404", description = "Discovery result not found in the inbox.") })
public Response delete(@PathParam("thingUID") @Parameter(description = "thingUID") String thingUID) {
@ -142,7 +144,7 @@ public class InboxResource implements RESTResource {
@GET
@Produces({ MediaType.APPLICATION_JSON })
@Operation(summary = "Get all discovered things.", responses = {
@Operation(operationId = "getDiscoveredInboxItems", summary = "Get all discovered things.", responses = {
@ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = DiscoveryResultDTO.class))) })
public Response getAll() {
Stream<DiscoveryResultDTO> discoveryStream = inbox.getAll().stream().map(DiscoveryResultDTOMapper::map);
@ -151,7 +153,7 @@ public class InboxResource implements RESTResource {
@POST
@Path("/{thingUID}/ignore")
@Operation(summary = "Flags a discovery result as ignored for further processing.", responses = {
@Operation(operationId = "flagInboxItemAsIgnored", summary = "Flags a discovery result as ignored for further processing.", responses = {
@ApiResponse(responseCode = "200", description = "OK") })
public Response ignore(@PathParam("thingUID") @Parameter(description = "thingUID") String thingUID) {
inbox.setFlag(new ThingUID(thingUID), DiscoveryResultFlag.IGNORED);
@ -160,7 +162,7 @@ public class InboxResource implements RESTResource {
@POST
@Path("/{thingUID}/unignore")
@Operation(summary = "Removes ignore flag from a discovery result.", responses = {
@Operation(operationId = "removeIgnoreFlagOnInboxItem", summary = "Removes ignore flag from a discovery result.", responses = {
@ApiResponse(responseCode = "200", description = "OK") })
public Response unignore(@PathParam("thingUID") @Parameter(description = "thingUID") String thingUID) {
inbox.setFlag(new ThingUID(thingUID), DiscoveryResultFlag.NEW);

View File

@ -194,7 +194,7 @@ public class ItemResource implements RESTResource {
@GET
@RolesAllowed({ Role.USER, Role.ADMIN })
@Produces(MediaType.APPLICATION_JSON)
@Operation(summary = "Get all available items.", responses = {
@Operation(operationId = "getItems", summary = "Get all available items.", responses = {
@ApiResponse(responseCode = "200", description = "OK", content = @Content(array = @ArraySchema(schema = @Schema(implementation = EnrichedItemDTO.class)))) })
public Response getItems(final @Context UriInfo uriInfo, final @Context HttpHeaders httpHeaders,
@HeaderParam(HttpHeaders.ACCEPT_LANGUAGE) @Parameter(description = "language") @Nullable String language,
@ -221,7 +221,7 @@ public class ItemResource implements RESTResource {
@RolesAllowed({ Role.USER, Role.ADMIN })
@Path("/{itemname: [a-zA-Z_0-9]+}")
@Produces({ MediaType.APPLICATION_JSON })
@Operation(summary = "Gets a single item.", responses = {
@Operation(operationId = "getItemByName", summary = "Gets a single item.", responses = {
@ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = EnrichedItemDTO.class))),
@ApiResponse(responseCode = "404", description = "Item not found") })
public Response getItemData(final @Context UriInfo uriInfo, final @Context HttpHeaders httpHeaders,
@ -258,7 +258,7 @@ public class ItemResource implements RESTResource {
@RolesAllowed({ Role.USER, Role.ADMIN })
@Path("/{itemname: [a-zA-Z_0-9]+}/state")
@Produces(MediaType.TEXT_PLAIN)
@Operation(summary = "Gets the state of an item.", responses = {
@Operation(operationId = "getItemState", summary = "Gets the state of an item.", responses = {
@ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = String.class))),
@ApiResponse(responseCode = "404", description = "Item not found") })
public Response getPlainItemState(@PathParam("itemname") @Parameter(description = "item name") String itemname) {
@ -279,7 +279,7 @@ public class ItemResource implements RESTResource {
@RolesAllowed({ Role.USER, Role.ADMIN })
@Path("/{itemname: [a-zA-Z_0-9]+}/state")
@Consumes(MediaType.TEXT_PLAIN)
@Operation(summary = "Updates the state of an item.", responses = {
@Operation(operationId = "updateItemState", summary = "Updates the state of an item.", responses = {
@ApiResponse(responseCode = "202", description = "Accepted"),
@ApiResponse(responseCode = "404", description = "Item not found"),
@ApiResponse(responseCode = "400", description = "Item state null") })
@ -315,7 +315,7 @@ public class ItemResource implements RESTResource {
@RolesAllowed({ Role.USER, Role.ADMIN })
@Path("/{itemname: [a-zA-Z_0-9]+}")
@Consumes(MediaType.TEXT_PLAIN)
@Operation(summary = "Sends a command to an item.", responses = {
@Operation(operationId = "sendItemCommand", summary = "Sends a command to an item.", responses = {
@ApiResponse(responseCode = "200", description = "OK"),
@ApiResponse(responseCode = "404", description = "Item not found"),
@ApiResponse(responseCode = "400", description = "Item command null") })
@ -356,7 +356,7 @@ public class ItemResource implements RESTResource {
@PUT
@RolesAllowed({ Role.ADMIN })
@Path("/{itemName: [a-zA-Z_0-9]+}/members/{memberItemName: [a-zA-Z_0-9]+}")
@Operation(summary = "Adds a new member to a group item.", security = {
@Operation(operationId = "addMemberToGroupItem", summary = "Adds a new member to a group item.", security = {
@SecurityRequirement(name = "oauth2", scopes = { "admin" }) }, responses = {
@ApiResponse(responseCode = "200", description = "OK"),
@ApiResponse(responseCode = "404", description = "Item or member item not found or item is not of type group item."),
@ -395,7 +395,7 @@ public class ItemResource implements RESTResource {
@DELETE
@RolesAllowed({ Role.ADMIN })
@Path("/{itemName: [a-zA-Z_0-9]+}/members/{memberItemName: [a-zA-Z_0-9]+}")
@Operation(summary = "Removes an existing member from a group item.", security = {
@Operation(operationId = "removeMemberFromGroupItem", summary = "Removes an existing member from a group item.", security = {
@SecurityRequirement(name = "oauth2", scopes = { "admin" }) }, responses = {
@ApiResponse(responseCode = "200", description = "OK"),
@ApiResponse(responseCode = "404", description = "Item or member item not found or item is not of type group item."),
@ -434,7 +434,7 @@ public class ItemResource implements RESTResource {
@DELETE
@RolesAllowed({ Role.ADMIN })
@Path("/{itemname: [a-zA-Z_0-9]+}")
@Operation(summary = "Removes an item from the registry.", security = {
@Operation(operationId = "removeItemFromRegistry", summary = "Removes an item from the registry.", security = {
@SecurityRequirement(name = "oauth2", scopes = { "admin" }) }, responses = {
@ApiResponse(responseCode = "200", description = "OK"),
@ApiResponse(responseCode = "404", description = "Item not found or item is not editable.") })
@ -448,7 +448,7 @@ public class ItemResource implements RESTResource {
@PUT
@RolesAllowed({ Role.ADMIN })
@Path("/{itemname: [a-zA-Z_0-9]+}/tags/{tag}")
@Operation(summary = "Adds a tag to an item.", security = {
@Operation(operationId = "addTagToItem", summary = "Adds a tag to an item.", security = {
@SecurityRequirement(name = "oauth2", scopes = { "admin" }) }, responses = {
@ApiResponse(responseCode = "200", description = "OK"),
@ApiResponse(responseCode = "404", description = "Item not found."),
@ -474,7 +474,7 @@ public class ItemResource implements RESTResource {
@DELETE
@RolesAllowed({ Role.ADMIN })
@Path("/{itemname: [a-zA-Z_0-9]+}/tags/{tag}")
@Operation(summary = "Removes a tag from an item.", security = {
@Operation(operationId = "removeTagFromItem", summary = "Removes a tag from an item.", security = {
@SecurityRequirement(name = "oauth2", scopes = { "admin" }) }, responses = {
@ApiResponse(responseCode = "200", description = "OK"),
@ApiResponse(responseCode = "404", description = "Item not found."),
@ -501,7 +501,7 @@ public class ItemResource implements RESTResource {
@RolesAllowed({ Role.ADMIN })
@Path("/{itemname: [a-zA-Z_0-9]+}/metadata/{namespace}")
@Consumes(MediaType.APPLICATION_JSON)
@Operation(summary = "Adds metadata to an item.", security = {
@Operation(operationId = "addMetadataToItem", summary = "Adds metadata to an item.", security = {
@SecurityRequirement(name = "oauth2", scopes = { "admin" }) }, responses = { //
@ApiResponse(responseCode = "200", description = "OK"), //
@ApiResponse(responseCode = "201", description = "Created"), //
@ -536,7 +536,7 @@ public class ItemResource implements RESTResource {
@DELETE
@RolesAllowed({ Role.ADMIN })
@Path("/{itemname: [a-zA-Z_0-9]+}/metadata/{namespace}")
@Operation(summary = "Removes metadata from an item.", security = {
@Operation(operationId = "removeMetadataFromItem", summary = "Removes metadata from an item.", security = {
@SecurityRequirement(name = "oauth2", scopes = { "admin" }) }, responses = {
@ApiResponse(responseCode = "200", description = "OK"),
@ApiResponse(responseCode = "404", description = "Item not found."),
@ -572,7 +572,7 @@ public class ItemResource implements RESTResource {
@RolesAllowed({ Role.ADMIN })
@Path("/{itemname: [a-zA-Z_0-9]+}")
@Consumes(MediaType.APPLICATION_JSON)
@Operation(summary = "Adds a new item to the registry or updates the existing item.", security = {
@Operation(operationId = "addOrUpdateItemInRegistry", summary = "Adds a new item to the registry or updates the existing item.", security = {
@SecurityRequirement(name = "oauth2", scopes = { "admin" }) }, responses = {
@ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = String.class))),
@ApiResponse(responseCode = "201", description = "Item created."),
@ -636,7 +636,7 @@ public class ItemResource implements RESTResource {
@PUT
@RolesAllowed({ Role.ADMIN })
@Consumes(MediaType.APPLICATION_JSON)
@Operation(summary = "Adds a list of items to the registry or updates the existing items.", security = {
@Operation(operationId = "addOrUpdateItemsInRegistry", summary = "Adds a list of items to the registry or updates the existing items.", security = {
@SecurityRequirement(name = "oauth2", scopes = { "admin" }) }, responses = {
@ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = String.class))),
@ApiResponse(responseCode = "400", description = "Payload is invalid.") })

View File

@ -94,7 +94,7 @@ public class ItemChannelLinkResource implements RESTResource {
@GET
@Produces(MediaType.APPLICATION_JSON)
@Operation(summary = "Gets all available links.", responses = {
@Operation(operationId = "getItemLinks", summary = "Gets all available links.", responses = {
@ApiResponse(responseCode = "200", description = "OK", content = @Content(array = @ArraySchema(schema = @Schema(implementation = ItemChannelLinkDTO.class)))) })
public Response getAll(
@QueryParam("channelUID") @Parameter(description = "filter by channel UID") @Nullable String channelUID,
@ -113,7 +113,7 @@ public class ItemChannelLinkResource implements RESTResource {
@GET
@Path("/{itemName}/{channelUID}")
@Operation(summary = "Retrieves an individual link.", responses = {
@Operation(operationId = "getItemLink", summary = "Retrieves an individual link.", responses = {
@ApiResponse(responseCode = "200", description = "OK"),
@ApiResponse(responseCode = "404", description = "Content does not match the path") })
public Response getLink(@PathParam("itemName") @Parameter(description = "itemName") String itemName,
@ -133,7 +133,7 @@ public class ItemChannelLinkResource implements RESTResource {
@PUT
@RolesAllowed({ Role.ADMIN })
@Path("/{itemName}/{channelUID}")
@Operation(summary = "Links item to a channel.", security = {
@Operation(operationId = "linkItemToChannel", summary = "Links item to a channel.", security = {
@SecurityRequirement(name = "oauth2", scopes = { "admin" }) }, responses = {
@ApiResponse(responseCode = "200", description = "OK"),
@ApiResponse(responseCode = "400", description = "Content does not match the path"),
@ -167,7 +167,7 @@ public class ItemChannelLinkResource implements RESTResource {
@DELETE
@RolesAllowed({ Role.ADMIN })
@Path("/{itemName}/{channelUID}")
@Operation(summary = "Unlinks item from a channel.", security = {
@Operation(operationId = "unlinkItemFromChannel", summary = "Unlinks item from a channel.", security = {
@SecurityRequirement(name = "oauth2", scopes = { "admin" }) }, responses = {
@ApiResponse(responseCode = "200", description = "OK"),
@ApiResponse(responseCode = "404", description = "Link not found."),

View File

@ -131,7 +131,7 @@ public class PersistenceResource implements RESTResource {
@GET
@RolesAllowed({ Role.ADMIN })
@Produces({ MediaType.APPLICATION_JSON })
@Operation(summary = "Gets a list of persistence services.", security = {
@Operation(operationId = "getPersistenceServices", summary = "Gets a list of persistence services.", security = {
@SecurityRequirement(name = "oauth2", scopes = { "admin" }) }, responses = {
@ApiResponse(responseCode = "200", description = "OK", content = @Content(array = @ArraySchema(schema = @Schema(implementation = String.class)))) })
public Response httpGetPersistenceServices(@Context HttpHeaders headers,
@ -146,7 +146,7 @@ public class PersistenceResource implements RESTResource {
@RolesAllowed({ Role.ADMIN })
@Path("/items")
@Produces({ MediaType.APPLICATION_JSON })
@Operation(summary = "Gets a list of items available via a specific persistence service.", security = {
@Operation(operationId = "getItemsForPersistenceService", summary = "Gets a list of items available via a specific persistence service.", security = {
@SecurityRequirement(name = "oauth2", scopes = { "admin" }) }, responses = {
@ApiResponse(responseCode = "200", description = "OK", content = @Content(array = @ArraySchema(schema = @Schema(implementation = String.class)))) })
public Response httpGetPersistenceServiceItems(@Context HttpHeaders headers,
@ -158,7 +158,7 @@ public class PersistenceResource implements RESTResource {
@RolesAllowed({ Role.USER, Role.ADMIN })
@Path("/items/{itemname: [a-zA-Z_0-9]+}")
@Produces({ MediaType.APPLICATION_JSON })
@Operation(summary = "Gets item persistence data from the persistence service.", responses = {
@Operation(operationId = "getItemDataFromPersistenceService", summary = "Gets item persistence data from the persistence service.", responses = {
@ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = ItemHistoryDTO.class))),
@ApiResponse(responseCode = "404", description = "Unknown Item or persistence service") })
public Response httpGetPersistenceItemData(@Context HttpHeaders headers,
@ -179,7 +179,7 @@ public class PersistenceResource implements RESTResource {
@RolesAllowed({ Role.ADMIN })
@Path("/items/{itemname: [a-zA-Z_0-9]+}")
@Produces({ MediaType.APPLICATION_JSON })
@Operation(summary = "Delete item data from a specific persistence service.", security = {
@Operation(operationId = "deleteItemFromPersistenceService", summary = "Delete item data from a specific persistence service.", security = {
@SecurityRequirement(name = "oauth2", scopes = { "admin" }) }, responses = {
@ApiResponse(responseCode = "200", description = "OK", content = @Content(array = @ArraySchema(schema = @Schema(implementation = String.class)))),
@ApiResponse(responseCode = "400", description = "Invalid filter parameters"),
@ -198,7 +198,7 @@ public class PersistenceResource implements RESTResource {
@RolesAllowed({ Role.ADMIN })
@Path("/items/{itemname: [a-zA-Z_0-9]+}")
@Produces({ MediaType.APPLICATION_JSON })
@Operation(summary = "Stores item persistence data into the persistence service.", responses = {
@Operation(operationId = "storeItemDataInPersistenceService", summary = "Stores item persistence data into the persistence service.", responses = {
@ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = ItemHistoryDTO.class))),
@ApiResponse(responseCode = "404", description = "Unknown Item or persistence service") })
public Response httpPutPersistenceItemData(@Context HttpHeaders headers,

View File

@ -101,7 +101,7 @@ public class ProfileTypeResource implements RESTResource {
@GET
@RolesAllowed({ Role.USER, Role.ADMIN })
@Produces(MediaType.APPLICATION_JSON)
@Operation(summary = "Gets all available profile types.", responses = {
@Operation(operationId = "getProfileTypes", summary = "Gets all available profile types.", responses = {
@ApiResponse(responseCode = "200", description = "OK", content = @Content(array = @ArraySchema(schema = @Schema(implementation = ProfileTypeDTO.class), uniqueItems = true))) })
public Response getAll(
@HeaderParam(HttpHeaders.ACCEPT_LANGUAGE) @Parameter(description = "language") @Nullable String language,

View File

@ -76,8 +76,9 @@ import io.swagger.v3.oas.annotations.security.SecurityRequirement;
import io.swagger.v3.oas.annotations.tags.Tag;
/**
* {@link ConfigurableServiceResource} provides access to configurable services. It lists the available services and
* allows to get, update and delete the configuration for a service ID. See also {@link ConfigurableService}.
* {@link ConfigurableServiceResource} provides access to configurable services.
* It lists the available services and allows to get, update and delete the
* configuration for a service ID. See also {@link ConfigurableService}.
*
* @author Dennis Nobel - Initial contribution
* @author Franck Dechavanne - Added DTOs to ApiResponses
@ -117,7 +118,7 @@ public class ConfigurableServiceResource implements RESTResource {
@GET
@Produces({ MediaType.APPLICATION_JSON })
@Operation(summary = "Get all configurable services.", responses = {
@Operation(operationId = "getServices", summary = "Get all configurable services.", responses = {
@ApiResponse(responseCode = "200", description = "OK", content = @Content(array = @ArraySchema(schema = @Schema(implementation = ConfigurableServiceDTO.class)))) })
public List<ConfigurableServiceDTO> getAll() {
List<ConfigurableServiceDTO> services = getConfigurableServices();
@ -127,7 +128,7 @@ public class ConfigurableServiceResource implements RESTResource {
@GET
@Path("/{serviceId}")
@Produces({ MediaType.APPLICATION_JSON })
@Operation(summary = "Get configurable service for given service ID.", responses = {
@Operation(operationId = "getServicesById", summary = "Get configurable service for given service ID.", responses = {
@ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = ConfigurableServiceDTO.class))),
@ApiResponse(responseCode = "404", description = "Not found") })
public Response getById(@PathParam("serviceId") @Parameter(description = "service ID") String serviceId) {
@ -167,7 +168,7 @@ public class ConfigurableServiceResource implements RESTResource {
@GET
@Path("/{serviceId}/contexts")
@Produces({ MediaType.APPLICATION_JSON })
@Operation(summary = "Get existing multiple context service configurations for the given factory PID.", responses = {
@Operation(operationId = "getServiceContext", summary = "Get existing multiple context service configurations for the given factory PID.", responses = {
@ApiResponse(responseCode = "200", description = "OK", content = @Content(array = @ArraySchema(schema = @Schema(implementation = ConfigurableServiceDTO.class)))) })
public List<ConfigurableServiceDTO> getMultiConfigServicesByFactoryPid(
@PathParam("serviceId") @Parameter(description = "service ID") String serviceId) {
@ -183,7 +184,7 @@ public class ConfigurableServiceResource implements RESTResource {
@GET
@Path("/{serviceId}/config")
@Produces({ MediaType.APPLICATION_JSON })
@Operation(summary = "Get service configuration for given service ID.", responses = {
@Operation(operationId = "getServiceConfig", summary = "Get service configuration for given service ID.", responses = {
@ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = String.class))),
@ApiResponse(responseCode = "500", description = "Configuration can not be read due to internal error") })
public Response getConfiguration(@PathParam("serviceId") @Parameter(description = "service ID") String serviceId) {
@ -201,7 +202,7 @@ public class ConfigurableServiceResource implements RESTResource {
@Path("/{serviceId}/config")
@Consumes(MediaType.APPLICATION_JSON)
@Produces({ MediaType.APPLICATION_JSON })
@Operation(summary = "Updates a service configuration for given service ID and returns the old configuration.", responses = {
@Operation(operationId = "updateServiceConfig", summary = "Updates a service configuration for given service ID and returns the old configuration.", responses = {
@ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = String.class))),
@ApiResponse(responseCode = "204", description = "No old configuration"),
@ApiResponse(responseCode = "500", description = "Configuration can not be updated due to internal error") })
@ -248,7 +249,7 @@ public class ConfigurableServiceResource implements RESTResource {
@DELETE
@Path("/{serviceId}/config")
@Produces({ MediaType.APPLICATION_JSON })
@Operation(summary = "Deletes a service configuration for given service ID and returns the old configuration.", responses = {
@Operation(operationId = "deleteServiceConfig", summary = "Deletes a service configuration for given service ID and returns the old configuration.", responses = {
@ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = String.class))),
@ApiResponse(responseCode = "204", description = "No old configuration"),
@ApiResponse(responseCode = "500", description = "Configuration can not be deleted due to internal error") })

View File

@ -215,7 +215,7 @@ public class ThingResource implements RESTResource {
@POST
@RolesAllowed({ Role.ADMIN })
@Consumes(MediaType.APPLICATION_JSON)
@Operation(summary = "Creates a new thing and adds it to the registry.", security = {
@Operation(operationId = "createThingInRegistry", summary = "Creates a new thing and adds it to the registry.", security = {
@SecurityRequirement(name = "oauth2", scopes = { "admin" }) }, responses = {
@ApiResponse(responseCode = "201", description = "Created", content = @Content(schema = @Schema(implementation = String.class))),
@ApiResponse(responseCode = "400", description = "Thing uid does not match bridge uid."),
@ -294,7 +294,7 @@ public class ThingResource implements RESTResource {
@GET
@RolesAllowed({ Role.ADMIN })
@Produces(MediaType.APPLICATION_JSON)
@Operation(summary = "Get all available things.", responses = {
@Operation(operationId = "getThings", summary = "Get all available things.", responses = {
@ApiResponse(responseCode = "200", description = "OK", content = @Content(array = @ArraySchema(schema = @Schema(implementation = EnrichedThingDTO.class), uniqueItems = true))) })
public Response getAll(
@HeaderParam(HttpHeaders.ACCEPT_LANGUAGE) @Parameter(description = "language") @Nullable String language,
@ -314,7 +314,7 @@ public class ThingResource implements RESTResource {
@RolesAllowed({ Role.ADMIN })
@Path("/{thingUID}")
@Produces(MediaType.APPLICATION_JSON)
@Operation(summary = "Gets thing by UID.", security = {
@Operation(operationId = "getThingById", summary = "Gets thing by UID.", security = {
@SecurityRequirement(name = "oauth2", scopes = { "admin" }) }, responses = {
@ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = ThingDTO.class))),
@ApiResponse(responseCode = "404", description = "Thing not found.") })
@ -345,7 +345,7 @@ public class ThingResource implements RESTResource {
@DELETE
@RolesAllowed({ Role.ADMIN })
@Path("/{thingUID}")
@Operation(summary = "Removes a thing from the registry. Set \'force\' to __true__ if you want the thing to be removed immediately.", security = {
@Operation(operationId = "removeThingById", summary = "Removes a thing from the registry. Set \'force\' to __true__ if you want the thing to be removed immediately.", security = {
@SecurityRequirement(name = "oauth2", scopes = { "admin" }) }, responses = {
@ApiResponse(responseCode = "200", description = "OK, was deleted."),
@ApiResponse(responseCode = "202", description = "ACCEPTED for asynchronous deletion."),
@ -404,7 +404,7 @@ public class ThingResource implements RESTResource {
@RolesAllowed({ Role.ADMIN })
@Path("/{thingUID}")
@Consumes(MediaType.APPLICATION_JSON)
@Operation(summary = "Updates a thing.", security = {
@Operation(operationId = "updateThing", summary = "Updates a thing.", security = {
@SecurityRequirement(name = "oauth2", scopes = { "admin" }) }, responses = {
@ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = ThingDTO.class))),
@ApiResponse(responseCode = "404", description = "Thing not found."),
@ -464,7 +464,7 @@ public class ThingResource implements RESTResource {
@RolesAllowed({ Role.ADMIN })
@Path("/{thingUID}/config")
@Consumes(MediaType.APPLICATION_JSON)
@Operation(summary = "Updates thing's configuration.", security = {
@Operation(operationId = "updateThingConfig", summary = "Updates thing's configuration.", security = {
@SecurityRequirement(name = "oauth2", scopes = { "admin" }) }, responses = {
@ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = ThingDTO.class))),
@ApiResponse(responseCode = "400", description = "Configuration of the thing is not valid."),
@ -521,7 +521,7 @@ public class ThingResource implements RESTResource {
@RolesAllowed({ Role.ADMIN })
@Path("/{thingUID}/status")
@Produces(MediaType.APPLICATION_JSON)
@Operation(summary = "Gets thing status.", security = {
@Operation(operationId = "getThingStatus", summary = "Gets thing status.", security = {
@SecurityRequirement(name = "oauth2", scopes = { "admin" }) }, responses = {
@ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = String.class))),
@ApiResponse(responseCode = "404", description = "Thing not found.") })
@ -546,7 +546,7 @@ public class ThingResource implements RESTResource {
@PUT
@RolesAllowed({ Role.ADMIN })
@Path("/{thingUID}/enable")
@Operation(summary = "Sets the thing enabled status.", security = {
@Operation(operationId = "enableThing", summary = "Sets the thing enabled status.", security = {
@SecurityRequirement(name = "oauth2", scopes = { "admin" }) }, responses = {
@ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = String.class))),
@ApiResponse(responseCode = "404", description = "Thing not found.") })
@ -576,7 +576,7 @@ public class ThingResource implements RESTResource {
@RolesAllowed({ Role.ADMIN })
@Path("/{thingUID}/config/status")
@Produces(MediaType.APPLICATION_JSON)
@Operation(summary = "Gets thing config status.", security = {
@Operation(operationId = "getThingConfigStatus", summary = "Gets thing config status.", security = {
@SecurityRequirement(name = "oauth2", scopes = { "admin" }) }, responses = {
@ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = String.class))),
@ApiResponse(responseCode = "404", description = "Thing not found.") })
@ -604,7 +604,7 @@ public class ThingResource implements RESTResource {
@RolesAllowed({ Role.ADMIN })
@Path("/{thingUID}/firmware/{firmwareVersion}")
@Consumes(MediaType.APPLICATION_JSON)
@Operation(summary = "Update thing firmware.", security = {
@Operation(operationId = "updateThingFirmware", summary = "Update thing firmware.", security = {
@SecurityRequirement(name = "oauth2", scopes = { "admin" }) }, responses = {
@ApiResponse(responseCode = "200", description = "OK"),
@ApiResponse(responseCode = "400", description = "Firmware update preconditions not satisfied."),
@ -641,7 +641,7 @@ public class ThingResource implements RESTResource {
@GET
@RolesAllowed({ Role.ADMIN })
@Path("/{thingUID}/firmware/status")
@Operation(summary = "Gets thing's firmware status.", security = {
@Operation(operationId = "getThingFirmwareStatus", summary = "Gets thing's firmware status.", security = {
@SecurityRequirement(name = "oauth2", scopes = { "admin" }) }, responses = {
@ApiResponse(responseCode = "200", description = "OK"),
@ApiResponse(responseCode = "204", description = "No firmware status provided by this Thing.") })
@ -661,7 +661,7 @@ public class ThingResource implements RESTResource {
@RolesAllowed({ Role.ADMIN })
@Path("/{thingUID}/firmwares")
@Produces(MediaType.APPLICATION_JSON)
@Operation(summary = "Get all available firmwares for provided thing UID", security = {
@Operation(operationId = "getAvailableFirmwaresForThing", summary = "Get all available firmwares for provided thing UID", security = {
@SecurityRequirement(name = "oauth2", scopes = { "admin" }) }, responses = {
@ApiResponse(responseCode = "200", description = "OK", content = @Content(array = @ArraySchema(schema = @Schema(implementation = FirmwareDTO.class), uniqueItems = true))),
@ApiResponse(responseCode = "204", description = "No firmwares found.") })

View File

@ -130,7 +130,7 @@ public class ThingTypeResource implements RESTResource {
@GET
@RolesAllowed({ Role.USER, Role.ADMIN })
@Produces(MediaType.APPLICATION_JSON)
@Operation(summary = "Gets all available thing types without config description, channels and properties.", responses = {
@Operation(operationId = "getThingTypes", summary = "Gets all available thing types without config description, channels and properties.", responses = {
@ApiResponse(responseCode = "200", description = "OK", content = @Content(array = @ArraySchema(schema = @Schema(implementation = StrippedThingTypeDTO.class), uniqueItems = true))) })
public Response getAll(
@HeaderParam(HttpHeaders.ACCEPT_LANGUAGE) @Parameter(description = "language") @Nullable String language,
@ -150,7 +150,7 @@ public class ThingTypeResource implements RESTResource {
@RolesAllowed({ Role.USER, Role.ADMIN })
@Path("/{thingTypeUID}")
@Produces(MediaType.APPLICATION_JSON)
@Operation(summary = "Gets thing type by UID.", responses = {
@Operation(operationId = "getThingTypeById", summary = "Gets thing type by UID.", responses = {
@ApiResponse(responseCode = "200", description = "Thing type with provided thingTypeUID does not exist.", content = @Content(schema = @Schema(implementation = ThingTypeDTO.class))),
@ApiResponse(responseCode = "404", description = "No content") })
public Response getByUID(@PathParam("thingTypeUID") @Parameter(description = "thingTypeUID") String thingTypeUID,

View File

@ -91,14 +91,14 @@ public class LogHandler implements RESTResource {
@GET
@Path("/levels")
@Operation(summary = "Get log severities, which are logged by the current logger settings.", responses = {
@Operation(operationId = "getLogLevels", summary = "Get log severities, which are logged by the current logger settings.", responses = {
@ApiResponse(responseCode = "200", description = "This depends on the current log settings at the backend.") })
public Response getLogLevels() {
return Response.ok(createLogLevelsMap()).build();
}
@GET
@Operation(summary = "Returns the last logged frontend messages. The amount is limited to the "
@Operation(operationId = "getLastLogMessagesForFrontend", summary = "Returns the last logged frontend messages. The amount is limited to the "
+ LogConstants.LOG_BUFFER_LIMIT + " last entries.")
public Response getLastLogs(@DefaultValue(LogConstants.LOG_BUFFER_LIMIT
@ -130,7 +130,7 @@ public class LogHandler implements RESTResource {
@POST
@Consumes(MediaType.APPLICATION_JSON)
@Operation(summary = "Log a frontend log message to the backend.", responses = {
@Operation(operationId = "logMessageToBackend", summary = "Log a frontend log message to the backend.", responses = {
@ApiResponse(responseCode = "200", description = "OK"),
@ApiResponse(responseCode = "403", description = LogConstants.LOG_SEVERITY_IS_NOT_SUPPORTED) })
public Response log(

View File

@ -222,7 +222,7 @@ public class SitemapResource
@GET
@Produces(MediaType.APPLICATION_JSON)
@Operation(summary = "Get all available sitemaps.", responses = {
@Operation(operationId = "getSitemaps", summary = "Get all available sitemaps.", responses = {
@ApiResponse(responseCode = "200", description = "OK", content = @Content(array = @ArraySchema(schema = @Schema(implementation = SitemapDTO.class)))) })
public Response getSitemaps() {
logger.debug("Received HTTP GET request from IP {} at '{}'", request.getRemoteAddr(), uriInfo.getPath());
@ -233,7 +233,7 @@ public class SitemapResource
@GET
@Path("/{sitemapname: [a-zA-Z_0-9]+}")
@Produces(MediaType.APPLICATION_JSON)
@Operation(summary = "Get sitemap by name.", responses = {
@Operation(operationId = "getSitemapByName", summary = "Get sitemap by name.", responses = {
@ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = SitemapDTO.class))) })
public Response getSitemapData(@Context HttpHeaders headers,
@HeaderParam(HttpHeaders.ACCEPT_LANGUAGE) @Parameter(description = "language") @Nullable String language,
@ -251,7 +251,7 @@ public class SitemapResource
@GET
@Path("/{sitemapname: [a-zA-Z_0-9]+}/{pageid: [a-zA-Z_0-9]+}")
@Produces(MediaType.APPLICATION_JSON)
@Operation(summary = "Polls the data for a sitemap.", responses = {
@Operation(operationId = "pollDataForSitemap", summary = "Polls the data for a sitemap.", responses = {
@ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = PageDTO.class))),
@ApiResponse(responseCode = "404", description = "Sitemap with requested name does not exist or page does not exist, or page refers to a non-linkable widget"),
@ApiResponse(responseCode = "400", description = "Invalid subscription id has been provided.") })
@ -294,7 +294,7 @@ public class SitemapResource
@POST
@Path(SEGMENT_EVENTS + "/subscribe")
@Produces(MediaType.APPLICATION_JSON)
@Operation(summary = "Creates a sitemap event subscription.", responses = {
@Operation(operationId = "createSitemapEventSubscription", summary = "Creates a sitemap event subscription.", responses = {
@ApiResponse(responseCode = "201", description = "Subscription created."),
@ApiResponse(responseCode = "503", description = "Subscriptions limit reached.") })
public Object createEventSubscription() {
@ -323,7 +323,8 @@ public class SitemapResource
@GET
@Path(SEGMENT_EVENTS + "/{subscriptionid: [a-zA-Z_0-9-]+}")
@Produces(MediaType.SERVER_SENT_EVENTS)
@Operation(summary = "Get sitemap events.", responses = { @ApiResponse(responseCode = "200", description = "OK"),
@Operation(operationId = "getSitemapEvents", summary = "Get sitemap events.", responses = {
@ApiResponse(responseCode = "200", description = "OK"),
@ApiResponse(responseCode = "400", description = "Page not linked to the subscription."),
@ApiResponse(responseCode = "404", description = "Subscription not found.") })
public void getSitemapEvents(@Context final SseEventSink sseEventSink, @Context final HttpServletResponse response,

View File

@ -152,7 +152,8 @@ public class SseResource implements RESTResource, SsePublisher {
@GET
@Produces(MediaType.SERVER_SENT_EVENTS)
@Operation(summary = "Get all events.", responses = { @ApiResponse(responseCode = "200", description = "OK"),
@Operation(operationId = "getEvents", summary = "Get all events.", responses = {
@ApiResponse(responseCode = "200", description = "OK"),
@ApiResponse(responseCode = "400", description = "Topic is empty or contains invalid characters") })
public void listen(@Context final SseEventSink sseEventSink, @Context final HttpServletResponse response,
@QueryParam("topics") @Parameter(description = "topics") String eventFilter) {
@ -182,7 +183,7 @@ public class SseResource implements RESTResource, SsePublisher {
@GET
@Path("/states")
@Produces(MediaType.SERVER_SENT_EVENTS)
@Operation(summary = "Initiates a new item state tracker connection", responses = {
@Operation(operationId = "initNewStateTacker", summary = "Initiates a new item state tracker connection", responses = {
@ApiResponse(responseCode = "200", description = "OK") })
public void getStateEvents(@Context final SseEventSink sseEventSink, @Context final HttpServletResponse response) {
final SseSinkItemInfo sinkItemInfo = new SseSinkItemInfo();
@ -203,7 +204,7 @@ public class SseResource implements RESTResource, SsePublisher {
*/
@POST
@Path("/states/{connectionId}")
@Operation(summary = "Changes the list of items a SSE connection will receive state updates to.", responses = {
@Operation(operationId = "updateItemListForStateUpdates", summary = "Changes the list of items a SSE connection will receive state updates to.", responses = {
@ApiResponse(responseCode = "200", description = "OK"),
@ApiResponse(responseCode = "404", description = "Unknown connectionId") })
public Object updateTrackedItems(@PathParam("connectionId") String connectionId,

View File

@ -94,7 +94,7 @@ public class UIResource implements RESTResource {
@GET
@Path("/tiles")
@Produces({ MediaType.APPLICATION_JSON })
@Operation(summary = "Get all registered UI tiles.", responses = {
@Operation(operationId = "getUITiles", summary = "Get all registered UI tiles.", responses = {
@ApiResponse(responseCode = "200", description = "OK", content = @Content(array = @ArraySchema(schema = @Schema(implementation = TileDTO.class)))) })
public Response getAll() {
Stream<TileDTO> tiles = tileProvider.getTiles().map(this::toTileDTO);
@ -104,7 +104,7 @@ public class UIResource implements RESTResource {
@GET
@Path("/components/{namespace}")
@Produces({ MediaType.APPLICATION_JSON })
@Operation(summary = "Get all registered UI components in the specified namespace.", responses = {
@Operation(operationId = "getRegisteredUIComponentsInNamespace", summary = "Get all registered UI components in the specified namespace.", responses = {
@ApiResponse(responseCode = "200", description = "OK", content = @Content(array = @ArraySchema(schema = @Schema(implementation = RootUIComponent.class)))) })
public Response getAllComponents(@PathParam("namespace") String namespace,
@QueryParam("summary") @Parameter(description = "summary fields only") @Nullable Boolean summary) {
@ -132,7 +132,7 @@ public class UIResource implements RESTResource {
@GET
@Path("/components/{namespace}/{componentUID}")
@Produces({ MediaType.APPLICATION_JSON })
@Operation(summary = "Get a specific UI component in the specified namespace.", responses = {
@Operation(operationId = "getUIComponentInNamespace", summary = "Get a specific UI component in the specified namespace.", responses = {
@ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = RootUIComponent.class))),
@ApiResponse(responseCode = "404", description = "Component not found") })
public Response getComponentByUID(@PathParam("namespace") String namespace,
@ -149,7 +149,7 @@ public class UIResource implements RESTResource {
@RolesAllowed({ Role.ADMIN })
@Path("/components/{namespace}")
@Produces({ MediaType.APPLICATION_JSON })
@Operation(summary = "Add an UI component in the specified namespace.", security = {
@Operation(operationId = "addUIComponentToNamespace", summary = "Add an UI component in the specified namespace.", security = {
@SecurityRequirement(name = "oauth2", scopes = { "admin" }) }, responses = {
@ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = RootUIComponent.class))) })
public Response addComponent(@PathParam("namespace") String namespace, RootUIComponent component) {
@ -163,7 +163,7 @@ public class UIResource implements RESTResource {
@RolesAllowed({ Role.ADMIN })
@Path("/components/{namespace}/{componentUID}")
@Produces({ MediaType.APPLICATION_JSON })
@Operation(summary = "Update a specific UI component in the specified namespace.", security = {
@Operation(operationId = "updateUIComponentInNamespace", summary = "Update a specific UI component in the specified namespace.", security = {
@SecurityRequirement(name = "oauth2", scopes = { "admin" }) }, responses = {
@ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = RootUIComponent.class))),
@ApiResponse(responseCode = "404", description = "Component not found") })
@ -187,7 +187,7 @@ public class UIResource implements RESTResource {
@RolesAllowed({ Role.ADMIN })
@Path("/components/{namespace}/{componentUID}")
@Produces({ MediaType.APPLICATION_JSON })
@Operation(summary = "Remove a specific UI component in the specified namespace.", security = {
@Operation(operationId = "removeUIComponentFromNamespace", summary = "Remove a specific UI component in the specified namespace.", security = {
@SecurityRequirement(name = "oauth2", scopes = { "admin" }) }, responses = {
@ApiResponse(responseCode = "200", description = "OK"),
@ApiResponse(responseCode = "404", description = "Component not found") })

View File

@ -94,7 +94,7 @@ public class VoiceResource implements RESTResource {
@GET
@Path("/interpreters")
@Produces(MediaType.APPLICATION_JSON)
@Operation(summary = "Get the list of all interpreters.", responses = {
@Operation(operationId = "getVoiceInterpreters", summary = "Get the list of all interpreters.", responses = {
@ApiResponse(responseCode = "200", description = "OK", content = @Content(array = @ArraySchema(schema = @Schema(implementation = HumanLanguageInterpreterDTO.class)))) })
public Response getInterpreters(
@HeaderParam(HttpHeaders.ACCEPT_LANGUAGE) @Parameter(description = "language") @Nullable String language) {
@ -107,7 +107,7 @@ public class VoiceResource implements RESTResource {
@GET
@Path("/interpreters/{id: [a-zA-Z_0-9]+}")
@Produces(MediaType.APPLICATION_JSON)
@Operation(summary = "Gets a single interpreter.", responses = {
@Operation(operationId = "getVoiceInterpreterByUID", summary = "Gets a single interpreter.", responses = {
@ApiResponse(responseCode = "200", description = "OK", content = @Content(array = @ArraySchema(schema = @Schema(implementation = HumanLanguageInterpreterDTO.class)))),
@ApiResponse(responseCode = "404", description = "Interpreter not found") })
public Response getInterpreter(
@ -126,7 +126,7 @@ public class VoiceResource implements RESTResource {
@POST
@Path("/interpreters/{id: [a-zA-Z_0-9]+}")
@Consumes(MediaType.TEXT_PLAIN)
@Operation(summary = "Sends a text to a given human language interpreter.", responses = {
@Operation(operationId = "interpretText", summary = "Sends a text to a given human language interpreter.", responses = {
@ApiResponse(responseCode = "200", description = "OK"),
@ApiResponse(responseCode = "404", description = "No human language interpreter was found."),
@ApiResponse(responseCode = "400", description = "interpretation exception occurs") })
@ -151,7 +151,7 @@ public class VoiceResource implements RESTResource {
@POST
@Path("/interpreters")
@Consumes(MediaType.TEXT_PLAIN)
@Operation(summary = "Sends a text to the default human language interpreter.", responses = {
@Operation(operationId = "interpretTextByDefaultInterpreter", summary = "Sends a text to the default human language interpreter.", responses = {
@ApiResponse(responseCode = "200", description = "OK"),
@ApiResponse(responseCode = "404", description = "No human language interpreter was found."),
@ApiResponse(responseCode = "400", description = "interpretation exception occurs") })
@ -175,7 +175,7 @@ public class VoiceResource implements RESTResource {
@GET
@Path("/voices")
@Produces(MediaType.APPLICATION_JSON)
@Operation(summary = "Get the list of all voices.", responses = {
@Operation(operationId = "getVoices", summary = "Get the list of all voices.", responses = {
@ApiResponse(responseCode = "200", description = "OK", content = @Content(array = @ArraySchema(schema = @Schema(implementation = VoiceDTO.class)))) })
public Response getVoices() {
List<VoiceDTO> dtos = voiceManager.getAllVoices().stream().map(VoiceMapper::map).collect(Collectors.toList());
@ -185,7 +185,7 @@ public class VoiceResource implements RESTResource {
@GET
@Path("/defaultvoice")
@Produces(MediaType.APPLICATION_JSON)
@Operation(summary = "Gets the default voice.", responses = {
@Operation(operationId = "getDefaultVoice", summary = "Gets the default voice.", responses = {
@ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = VoiceDTO.class))),
@ApiResponse(responseCode = "404", description = "No default voice was found.") })
public Response getDefaultVoice() {
@ -201,7 +201,7 @@ public class VoiceResource implements RESTResource {
@POST
@Path("/say")
@Consumes(MediaType.TEXT_PLAIN)
@Operation(summary = "Speaks a given text with a given voice through the given audio sink.", responses = {
@Operation(operationId = "textToSpeech", summary = "Speaks a given text with a given voice through the given audio sink.", responses = {
@ApiResponse(responseCode = "200", description = "OK") })
public Response say(@Parameter(description = "text to speak", required = true) String text,
@QueryParam("voiceid") @Parameter(description = "voice id") @Nullable String voiceId,

View File

@ -95,7 +95,7 @@ public class RootResource implements RESTResource {
@GET
@Path("/")
@Produces(MediaType.APPLICATION_JSON)
@Operation(summary = "Gets information about the runtime, the API version and links to resources.", responses = {
@Operation(operationId = "getRoot", summary = "Gets information about the runtime, the API version and links to resources.", responses = {
@ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = RootBean.class))) })
public Response getRoot(@Context UriInfo uriInfo) {
// key: path, value: name (this way we could ensure that ever path is added only once).

View File

@ -68,7 +68,7 @@ public class SystemInfoResource implements RESTResource {
@GET
@Path("/")
@Produces(MediaType.APPLICATION_JSON)
@Operation(summary = "Gets information about the system.", responses = {
@Operation(operationId = "getSystemInformation", summary = "Gets information about the system.", responses = {
@ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = SystemInfoBean.class))) })
public Response getSystemInfo(@Context UriInfo uriInfo) {

View File

@ -86,7 +86,8 @@ public class IconSetResource implements RESTResource {
@GET
@Produces(MediaType.APPLICATION_JSON)
@Operation(summary = "Gets all icon sets.", responses = { @ApiResponse(responseCode = "200", description = "OK") })
@Operation(operationId = "getIconSets", summary = "Gets all icon sets.", responses = {
@ApiResponse(responseCode = "200", description = "OK") })
public Response getAll(
@HeaderParam("Accept-Language") @Parameter(description = "language") @Nullable String language) {
Locale locale = localeService.getLocale(language);