diff --git a/src/main/java/org/phoebus/channelfinder/CFResourceDescriptors.java b/src/main/java/org/phoebus/channelfinder/CFResourceDescriptors.java index 09ea38b..6bc535b 100644 --- a/src/main/java/org/phoebus/channelfinder/CFResourceDescriptors.java +++ b/src/main/java/org/phoebus/channelfinder/CFResourceDescriptors.java @@ -9,4 +9,12 @@ public class CFResourceDescriptors { public static final String CHANNEL_RESOURCE_URI = CF_SERVICE + "/resources/channels"; public static final String SCROLL_RESOURCE_URI = CF_SERVICE + "/resources/scroll"; public static final String CHANNEL_PROCESSOR_RESOURCE_URI = CF_SERVICE + "/resources/processors"; + + public static final String SEARCH_PARAM_DESCRIPTION = + "Search parameters. Examples:\n" + + "- ~name: Filter by channel name (e.g., ~name=SR*)\n" + + "- ~tag: Filter by tag name, use ! to negate (e.g., ~tag=active)\n" + + "- ~size: Number of results (e.g., ~size=100)\n" + + "- ~from: Starting index (e.g., ~from=0)\n" + + "Use |,; as value separators"; } diff --git a/src/main/java/org/phoebus/channelfinder/ChannelManager.java b/src/main/java/org/phoebus/channelfinder/ChannelManager.java index 9866f81..5fa411c 100644 --- a/src/main/java/org/phoebus/channelfinder/ChannelManager.java +++ b/src/main/java/org/phoebus/channelfinder/ChannelManager.java @@ -7,6 +7,8 @@ import io.swagger.v3.oas.annotations.media.Schema; import io.swagger.v3.oas.annotations.responses.ApiResponse; import io.swagger.v3.oas.annotations.responses.ApiResponses; +import io.swagger.v3.oas.annotations.Operation; +import io.swagger.v3.oas.annotations.Parameter; import org.phoebus.channelfinder.AuthorizationService.ROLES; import org.phoebus.channelfinder.entity.Channel; import org.phoebus.channelfinder.entity.Property; @@ -41,6 +43,7 @@ import java.util.stream.StreamSupport; import static org.phoebus.channelfinder.CFResourceDescriptors.CHANNEL_RESOURCE_URI; +import static org.phoebus.channelfinder.CFResourceDescriptors.SEARCH_PARAM_DESCRIPTION; @CrossOrigin @RestController @@ -69,14 +72,12 @@ public class ChannelManager { @Autowired ChannelProcessorService channelProcessorService; - /** - * GET method for querying a collection of Channel instances, based on a - * multi-parameter query specifying patterns for tags, property values, and - * channel names to match against. - * - * @param allRequestParams query parameters - * @return list of all channels - */ + @Operation( + summary = "Query channels", + description = "Query a collection of Channel instances based on tags, property values, and channel names.", + operationId = "queryChannels", + tags = {"Channel"} + ) @ApiResponses( value = { @ApiResponse( @@ -94,18 +95,18 @@ public class ChannelManager { content = @Content(schema = @Schema(implementation = ResponseStatusException.class))) }) @GetMapping - public List query(@RequestParam MultiValueMap allRequestParams) { + public List query( + @Parameter(description = SEARCH_PARAM_DESCRIPTION) + @RequestParam MultiValueMap allRequestParams) { return channelRepository.search(allRequestParams).channels(); } - /** - * GET method for querying for a collection of Channel instances, based on a - * multi-parameter query specifying patterns for tags, property values, and - * channel names to match against. - * - * @param allRequestParams query parameters - * @return SearchResult a count to the total number of matches and the first 10k hits - */ + @Operation( + summary = "Combined query for channels", + description = "Query for a collection of Channel instances and get a count and the first 10k hits.", + operationId = "combinedQueryChannels", + tags = {"Channel"} + ) @ApiResponses( value = { @ApiResponse( @@ -123,17 +124,18 @@ public List query(@RequestParam MultiValueMap allReques content = @Content(schema = @Schema(implementation = ResponseStatusException.class))) }) @GetMapping("/combined") - public SearchResult combinedQuery(@RequestParam MultiValueMap allRequestParams) { + public SearchResult combinedQuery( + @Parameter(description = SEARCH_PARAM_DESCRIPTION) + @RequestParam MultiValueMap allRequestParams) { return channelRepository.search(allRequestParams); } - /** - * GET method for querying the number of matches to a multi-parameter query specifying patterns for tags, property values, and - * channel names to match against. - * - * @param allRequestParams query parameters - * @return a total number of channels that match the query parameters - */ + @Operation( + summary = "Count channels matching query", + description = "Get the number of channels matching the given query parameters.", + operationId = "countChannels", + tags = {"Channel"} + ) @ApiResponses( value = { @ApiResponse( @@ -146,17 +148,18 @@ public SearchResult combinedQuery(@RequestParam MultiValueMap al content = @Content(schema = @Schema(implementation = ResponseStatusException.class))) }) @GetMapping("/count") - public long queryCount(@RequestParam MultiValueMap allRequestParams) { + public long queryCount( + @Parameter(description = SEARCH_PARAM_DESCRIPTION) + @RequestParam MultiValueMap allRequestParams) { return channelRepository.count(allRequestParams); } - /** - * GET method for retrieving an instance of Channel identified by - * channelName. - * - * @param channelName - channel name to search for - * @return found channel - */ + @Operation( + summary = "Get channel by name", + description = "Retrieve a Channel instance by its name.", + operationId = "getChannelByName", + tags = {"Channel"} + ) @ApiResponses( value = { @ApiResponse( @@ -182,15 +185,12 @@ public Channel read(@PathVariable("channelName") String channelName) { } } - /** - * PUT method for creating/replacing a channel instance identified by the - * payload. The complete set of properties for the channel must be - * supplied, which will replace the existing set of properties. - * - * @param channelName - name of channel to be created - * @param channel - new data (properties/tags) for channel chan - * @return the created channel - */ + @Operation( + summary = "Create or replace a channel", + description = "Create or replace a channel instance identified by the payload.", + operationId = "createOrReplaceChannel", + tags = {"Channel"} + ) @ApiResponses( value = { @ApiResponse( @@ -248,12 +248,12 @@ public Channel create(@PathVariable("channelName") String channelName, @RequestB } } - /** - * PUT method for creating multiple channels. - * - * @param channels - XmlChannels to be created - * @return the list of channels created - */ + @Operation( + summary = "Create or replace multiple channels", + description = "Create or replace multiple channel instances.", + operationId = "createOrReplaceChannels", + tags = {"Channel"} + ) @ApiResponses( value = { @ApiResponse( @@ -347,14 +347,12 @@ private void resetOwnersToExisting(Iterable channels) { } } - /** - * POST method for merging properties and tags of the channel identified by the - * payload into an existing channel. - * - * @param channelName - name of channel to add - * @param channel - new Channel data (properties/tags) to be merged into channel channelName - * @return the updated channel - */ + @Operation( + summary = "Update a channel", + description = "Merge properties and tags of the channel identified by the payload into an existing channel.", + operationId = "updateChannel", + tags = {"Channel"} + ) @ApiResponses( value = { @ApiResponse( @@ -427,13 +425,12 @@ public Channel update(@PathVariable("channelName") String channelName, @RequestB } } - /** - * POST method for merging properties and tags of the Channels identified by the - * payload into existing channels. - * - * @param channels - XmlChannels to be updated - * @return the updated channels - */ + @Operation( + summary = "Update multiple channels", + description = "Merge properties and tags of the channels identified by the payload into existing channels.", + operationId = "updateChannels", + tags = {"Channel"} + ) @ApiResponses( value = { @ApiResponse( @@ -497,12 +494,12 @@ public Iterable update(@RequestBody Iterable channels) { } } - /** - * DELETE method for deleting a channel instance identified by path parameter - * channelName. - * - * @param channelName - name of channel to remove - */ + @Operation( + summary = "Delete a channel", + description = "Delete a channel instance identified by its name.", + operationId = "deleteChannel", + tags = {"Channel"} + ) @ApiResponses( value = { @ApiResponse( diff --git a/src/main/java/org/phoebus/channelfinder/ChannelScroll.java b/src/main/java/org/phoebus/channelfinder/ChannelScroll.java index c646997..03e56f6 100644 --- a/src/main/java/org/phoebus/channelfinder/ChannelScroll.java +++ b/src/main/java/org/phoebus/channelfinder/ChannelScroll.java @@ -6,6 +6,8 @@ import io.swagger.v3.oas.annotations.media.Schema; import io.swagger.v3.oas.annotations.responses.ApiResponse; import io.swagger.v3.oas.annotations.responses.ApiResponses; +import io.swagger.v3.oas.annotations.Operation; +import io.swagger.v3.oas.annotations.Parameter; import java.text.MessageFormat; import java.util.Comparator; import java.util.List; @@ -54,14 +56,12 @@ public class ChannelScroll { @Qualifier("indexClient") ElasticsearchClient client; - /** - * GET method for retrieving a collection of Channel instances, based on a - * multi-parameter query specifying patterns for tags, property values, and - * channel names to match against. - * - * @param allRequestParams search parameters - * @return list of all channels - */ + @Operation( + summary = "Scroll query for channels", + description = "Retrieve a collection of Channel instances based on multi-parameter search.", + operationId = "scrollQueryChannels", + tags = {"ChannelScroll"} + ) @ApiResponses( value = { @ApiResponse( @@ -74,18 +74,18 @@ public class ChannelScroll { content = @Content(schema = @Schema(implementation = ResponseStatusException.class))) }) @GetMapping - public Scroll query(@RequestParam MultiValueMap allRequestParams) { + public Scroll query( + @Parameter(description = CFResourceDescriptors.SEARCH_PARAM_DESCRIPTION) + @RequestParam MultiValueMap allRequestParams) { return search(null, allRequestParams); } - /** - * GET method for retrieving a collection of Channel instances, based on a - * multi-parameter query specifying patterns for tags, property values, and - * channel names to match against. - * - * @param scrollId scroll Id - * @return list of all channels - */ + @Operation( + summary = "Scroll query by scrollId", + description = "Retrieve a collection of Channel instances using a scrollId and search parameters.", + operationId = "scrollQueryById", + tags = {"ChannelScroll"} + ) @ApiResponses( value = { @ApiResponse( @@ -98,7 +98,10 @@ public Scroll query(@RequestParam MultiValueMap allRequestParams content = @Content(schema = @Schema(implementation = ResponseStatusException.class))) }) @GetMapping("/{scrollId}") - public Scroll query(@PathVariable("scrollId") String scrollId, @RequestParam MultiValueMap searchParameters) { + public Scroll query( + @Parameter(description = "Scroll ID from previous query") @PathVariable("scrollId") String scrollId, + @Parameter(description = CFResourceDescriptors.SEARCH_PARAM_DESCRIPTION) + @RequestParam MultiValueMap searchParameters) { return search(scrollId, searchParameters); } diff --git a/src/main/java/org/phoebus/channelfinder/InfoManager.java b/src/main/java/org/phoebus/channelfinder/InfoManager.java index f36ef20..1515b5d 100644 --- a/src/main/java/org/phoebus/channelfinder/InfoManager.java +++ b/src/main/java/org/phoebus/channelfinder/InfoManager.java @@ -6,6 +6,7 @@ import io.swagger.v3.oas.annotations.media.Schema; import io.swagger.v3.oas.annotations.responses.ApiResponse; import io.swagger.v3.oas.annotations.responses.ApiResponses; +import io.swagger.v3.oas.annotations.Operation; import java.io.IOException; import java.util.LinkedHashMap; import java.util.Map; @@ -41,10 +42,12 @@ public class InfoManager { private static final ObjectMapper objectMapper = new ObjectMapper().enable(SerializationFeature.INDENT_OUTPUT); - /** - * - * @return Information about the ChannelFinder service - */ + @Operation( + summary = "Get ChannelFinder service info", + description = "Returns information about the ChannelFinder service and its Elasticsearch backend.", + operationId = "getServiceInfo", + tags = {"Info"} + ) @ApiResponses( value = { @ApiResponse( diff --git a/src/main/java/org/phoebus/channelfinder/PropertyManager.java b/src/main/java/org/phoebus/channelfinder/PropertyManager.java index a1e4018..6434b9d 100644 --- a/src/main/java/org/phoebus/channelfinder/PropertyManager.java +++ b/src/main/java/org/phoebus/channelfinder/PropertyManager.java @@ -7,6 +7,7 @@ import io.swagger.v3.oas.annotations.media.Schema; import io.swagger.v3.oas.annotations.responses.ApiResponse; import io.swagger.v3.oas.annotations.responses.ApiResponses; +import io.swagger.v3.oas.annotations.Operation; import java.text.MessageFormat; import java.util.ArrayList; import java.util.Arrays; @@ -59,11 +60,12 @@ public class PropertyManager { @Autowired AuthorizationService authorizationService; - /** - * GET method for retrieving the list of properties in the database. - * - * @return list of all properties - */ + @Operation( + summary = "List all properties", + description = "Retrieve the list of all properties in the database.", + operationId = "listProperties", + tags = {"Property"} + ) @ApiResponses( value = { @ApiResponse( @@ -82,15 +84,12 @@ public Iterable list() { return propertyRepository.findAll(); } - /** - * GET method for retrieving the property with the path parameter propertyName - *

- * To get all its channels use the parameter "withChannels" - * - * @param propertyName - property name to search for - * @param withChannels - get the channels with the property - * @return found property - */ + @Operation( + summary = "Get property by name", + description = "Retrieve a property by its name. Optionally include its channels.", + operationId = "getPropertyByName", + tags = {"Property"} + ) @ApiResponses( value = { @ApiResponse( @@ -122,18 +121,12 @@ public Property read(@PathVariable("propertyName") String propertyName, } } - /** - * PUT method for creating and exclusively adding the property - * identified by the path parameter propertyName to all channels - * identified by the payload structure property. Setting the owner - * attribute in the XML root element is mandatory. Values for the properties - * are taken from the payload. - * - * - * @param propertyName - name of property to be created - * @param property - an Property instance with the list of channels to add the property propertyName to - * @return the created property - */ + @Operation( + summary = "Create or update a property", + description = "Create and exclusively update the property identified by the path parameter.", + operationId = "createOrUpdateProperty", + tags = {"Property"} + ) @ApiResponses( value = { @ApiResponse( @@ -197,12 +190,12 @@ public Property create(@PathVariable("propertyName") String propertyName, @Reque } } - /** - * PUT method for creating multiple properties. - * - * @param properties - XmlProperties to be created - * @return the list of properties created - */ + @Operation( + summary = "Create multiple properties", + description = "Create multiple properties in a single request.", + operationId = "createMultipleProperties", + tags = {"Property"} + ) @ApiResponses( value = { @ApiResponse( @@ -267,18 +260,12 @@ public Iterable create(@RequestBody Iterable properties) { } } - /** - * PUT method for adding the property identified by property to the single - * channel chan (both path parameters). - * - * TODO: could be simplified with multi index update and script which can use - * wildcards thus removing the need to explicitly define the entire property - * - * @param propertyName - name of tag to be created - * @param channelName - channel to update property to - * @param property - property payload with value - * @return added property - */ + @Operation( + summary = "Add property to a single channel", + description = "Add the property identified by propertyName to the channel identified by channelName.", + operationId = "addPropertyToChannel", + tags = {"Property"} + ) @ApiResponses( value = { @ApiResponse( @@ -343,16 +330,12 @@ public Property addSingle(@PathVariable("propertyName") String propertyName, @Pa } } - /** - * POST method for updating the property identified by the path parameter - * propertyName, adding it to all channels identified by the payload structure - * property. Setting the owner attribute in the XML root element is - * mandatory. Values for the properties are taken from the payload. - * - * @param propertyName - name of property to be updated - * @param property - a Property instance with the list of channels to add the property propertyName to - * @return the updated property - */ + @Operation( + summary = "Update a property", + description = "Update the property identified by the path parameter, adding it to all channels in the payload.", + operationId = "updateProperty", + tags = {"Property"} + ) @ApiResponses( value = { @ApiResponse( @@ -461,18 +444,14 @@ public Property update(@PathVariable("propertyName") String propertyName, @Reque } return updatedProperty; - } - /** - * POST method for updating multiple properties and updating all the appropriate - * channels. - * - * If the channels don't exist it will fail - * - * @param properties - XmlProperties to be updated - * @return the updated properties - */ + @Operation( + summary = "Update multiple properties", + description = "Update multiple properties and all appropriate channels.", + operationId = "updateMultipleProperties", + tags = {"Property"} + ) @ApiResponses( value = { @ApiResponse( @@ -578,12 +557,12 @@ private void checkPropertyAuthorization(Optional existingProperty) { } } - /** - * DELETE method for deleting the property identified by the path parameter - * propertyName from all channels. - * - * @param propertyName - name of property to remove - */ + @Operation( + summary = "Delete a property", + description = "Delete the property identified by the path parameter from all channels.", + operationId = "deleteProperty", + tags = {"Property"} + ) @ApiResponses( value = { @ApiResponse( @@ -629,13 +608,12 @@ public void remove(@PathVariable("propertyName") String propertyName) { } } - /** - * DELETE method for deleting the property identified by propertyName from the - * channel channelName (both path parameters). - * - * @param propertyName - name of property to remove - * @param channelName - channel to remove propertyName from - */ + @Operation( + summary = "Delete property from a channel", + description = "Delete the property identified by propertyName from the channel identified by channelName.", + operationId = "deletePropertyFromChannel", + tags = {"Property"} + ) @ApiResponses( value = { @ApiResponse( diff --git a/src/main/java/org/phoebus/channelfinder/TagManager.java b/src/main/java/org/phoebus/channelfinder/TagManager.java index 7155fe2..ffec21a 100644 --- a/src/main/java/org/phoebus/channelfinder/TagManager.java +++ b/src/main/java/org/phoebus/channelfinder/TagManager.java @@ -7,6 +7,7 @@ import io.swagger.v3.oas.annotations.media.Schema; import io.swagger.v3.oas.annotations.responses.ApiResponse; import io.swagger.v3.oas.annotations.responses.ApiResponses; +import io.swagger.v3.oas.annotations.Operation; import java.text.MessageFormat; import java.util.ArrayList; import java.util.Arrays; @@ -57,11 +58,12 @@ public class TagManager { @Autowired AuthorizationService authorizationService; - /** - * GET method for retrieving the list of tags in the database. - * - * @return list of all tags - */ + @Operation( + summary = "List all tags", + description = "Retrieve the list of all tags in the database.", + operationId = "listTags", + tags = {"Tag"} + ) @ApiResponses( value = { @ApiResponse( @@ -79,15 +81,12 @@ public Iterable list() { return tagRepository.findAll(); } - /** - * GET method for retrieving the tag with the path parameter tagName - * - * To get all its channels use the parameter "withChannels" - * - * @param tagName - tag name to search for - * @param withChannels - channels with the tag tagName - * @return found tag - */ + @Operation( + summary = "Get tag by name", + description = "Retrieve a tag by its name. Optionally include its channels.", + operationId = "getTagByName", + tags = {"Tag"} + ) @ApiResponses( value = { @ApiResponse( @@ -125,16 +124,12 @@ public Tag read(@PathVariable("tagName") String tagName, } } - /** - * PUT method to create and exclusively update the tag identified by the - * path parameter name to all channels identified in the payload - * structure data. Setting the owner attribute in the XML root element - * is mandatory. - * - * @param tagName - name of tag to be created - * @param tag - Tag structure containing the list of channels to be tagged - * @return the created tag - */ + @Operation( + summary = "Create or update a tag", + description = "Create and exclusively update the tag identified by the path parameter.", + operationId = "createOrUpdateTag", + tags = {"Tag"} + ) @ApiResponses( value = { @ApiResponse( @@ -206,12 +201,12 @@ public Tag create(@PathVariable("tagName") String tagName, @RequestBody Tag tag) } } - /** - * PUT method for creating multiple tags. - * - * @param tags - XmlTags to be created - * @return the list of tags created - */ + @Operation( + summary = "Create multiple tags", + description = "Create multiple tags in a single request.", + operationId = "createMultipleTags", + tags = {"Tag"} + ) @ApiResponses( value = { @ApiResponse( @@ -303,17 +298,12 @@ public Iterable create(@RequestBody Iterable tags) { } } - /** - * PUT method for adding the tag identified by tag to the single - * channel chan (both path parameters). - * - * TODO: could be simplified with multi index update and script which can use - * wildcards thus removing the need to explicitly define the entire tag - * - * @param tagName - name of tag to be added to channel - * @param channelName - channel to update tag to - * @return added tag - */ + @Operation( + summary = "Add tag to a single channel", + description = "Add the tag identified by tagName to the channel identified by channelName.", + operationId = "addTagToChannel", + tags = {"Tag"} + ) @ApiResponses( value = { @ApiResponse( @@ -374,18 +364,12 @@ public Tag addSingle(@PathVariable("tagName") String tagName, @PathVariable("cha } } - /** - * POST method to update the tag identified by the path parameter - * name, adding it to all channels identified by the channels inside - * the payload structure data. Setting the owner attribute in the XML - * root element is mandatory. - * - * TODO: Optimize the bulk channel update - * - * @param tagName - name of tag to be updated - * @param tag - Tag with list of channels to addSingle the tag name to - * @return the updated tag - */ + @Operation( + summary = "Update a tag", + description = "Update the tag identified by the path parameter, adding it to all channels in the payload.", + operationId = "updateTag", + tags = {"Tag"} + ) @ApiResponses( value = { @ApiResponse( @@ -476,15 +460,12 @@ public Tag update(@PathVariable("tagName") String tagName, @RequestBody Tag tag) } } - /** - * POST method for updating multiple tags and updating all the appropriate - * channels. - * - * If the channels don't exist it will fail - * - * @param tags - XmlTags to be updated - * @return the updated tags - */ + @Operation( + summary = "Update multiple tags", + description = "Update multiple tags and all appropriate channels. The operation will fail if any of the specified channels do not exist.", + operationId = "updateMultipleTags", + tags = {"Tag"} + ) @ApiResponses( value = { @ApiResponse( @@ -568,12 +549,12 @@ public Iterable update(@RequestBody Iterable tags) { } } - /** - * DELETE method for deleting the tag identified by the path parameter - * tagName from all channels. - * - * @param tagName - name of tag to remove - */ + @Operation( + summary = "Delete a tag", + description = "Delete the tag identified by the path parameter from all channels.", + operationId = "deleteTag", + tags = {"Tag"} + ) @ApiResponses( value = { @ApiResponse( @@ -623,13 +604,12 @@ public void remove(@PathVariable("tagName") String tagName) { } } - /** - * DELETE method for deleting the tag identified by tagName from the - * channel channelName (both path parameters). - * - * @param tagName - name of tag to remove - * @param channelName - channel to remove tagName from - */ + @Operation( + summary = "Delete tag from a channel", + description = "Delete the tag identified by tagName from the channel identified by channelName.", + operationId = "deleteTagFromChannel", + tags = {"Tag"} + ) @ApiResponses( value = { @ApiResponse( diff --git a/src/main/java/org/phoebus/channelfinder/processors/ChannelProcessorManager.java b/src/main/java/org/phoebus/channelfinder/processors/ChannelProcessorManager.java index 274056c..43907e5 100644 --- a/src/main/java/org/phoebus/channelfinder/processors/ChannelProcessorManager.java +++ b/src/main/java/org/phoebus/channelfinder/processors/ChannelProcessorManager.java @@ -5,6 +5,8 @@ import io.swagger.v3.oas.annotations.media.Schema; import io.swagger.v3.oas.annotations.responses.ApiResponse; import io.swagger.v3.oas.annotations.responses.ApiResponses; +import io.swagger.v3.oas.annotations.Operation; +import io.swagger.v3.oas.annotations.Parameter; import org.phoebus.channelfinder.AuthorizationService; import org.phoebus.channelfinder.ChannelScroll; import org.phoebus.channelfinder.entity.Channel; @@ -28,11 +30,7 @@ import java.util.logging.Logger; import static org.phoebus.channelfinder.CFResourceDescriptors.CHANNEL_PROCESSOR_RESOURCE_URI; - -/** - * A rest end point for retrieving information about the various channel processors included - * in this installation of ChannelFinder and end points for manually triggering their processing. - */ +import static org.phoebus.channelfinder.CFResourceDescriptors.SEARCH_PARAM_DESCRIPTION; @RestController @RequestMapping(CHANNEL_PROCESSOR_RESOURCE_URI) @@ -53,6 +51,12 @@ public class ChannelProcessorManager { @Value("${elasticsearch.query.size:10000}") private int defaultMaxSize; + @Operation( + summary = "Get processor count", + description = "Returns the number of channel processors.", + operationId = "getProcessorCount", + tags = {"ChannelProcessor"} + ) @ApiResponses( value = { @ApiResponse( @@ -65,6 +69,12 @@ public long processorCount() { return channelProcessorService.getProcessorCount(); } + @Operation( + summary = "Get processor info", + description = "Returns information about all channel processors.", + operationId = "getProcessorInfo", + tags = {"ChannelProcessor"} + ) @ApiResponses( value = { @ApiResponse( @@ -78,6 +88,12 @@ public List processorInfo() { return channelProcessorService.getProcessorsInfo(); } + @Operation( + summary = "Process all channels", + description = "Manually trigger processing on all channels in ChannelFinder.", + operationId = "processAllChannels", + tags = {"ChannelProcessor"} + ) @ApiResponses( value = { @ApiResponse( @@ -108,6 +124,12 @@ public long processAllChannels() { } } + @Operation( + summary = "Process channels by query", + description = "Manually trigger processing on channels matching the given query.", + operationId = "processChannelsByQuery", + tags = {"ChannelProcessor"} + ) @ApiResponses( value = { @ApiResponse( @@ -116,7 +138,9 @@ public long processAllChannels() { content = @Content(schema = @Schema(implementation = Long.class))) }) @PutMapping("/process/query") - public long processChannels(@RequestParam MultiValueMap allRequestParams) { + public long processChannels( + @Parameter(description = SEARCH_PARAM_DESCRIPTION) + @RequestParam MultiValueMap allRequestParams) { long channelCount = 0; Scroll scrollResult = channelScroll.query(allRequestParams); channelCount += scrollResult.getChannels().size();