You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@felix.apache.org by "Carsten Ziegeler (JIRA)" <ji...@apache.org> on 2018/08/07 07:33:00 UTC

[jira] [Resolved] (FELIX-5762) WebConsole Services Servlet: Expose service types as proper JSON array

     [ https://issues.apache.org/jira/browse/FELIX-5762?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Carsten Ziegeler resolved FELIX-5762.
-------------------------------------
    Resolution: Won't Fix

The current contract is that the "types" property is a string, which might contain several values. We should not break this contract for purity reasons.
Similar the "pid" property might contain an array as well.

> WebConsole Services Servlet: Expose service types as proper JSON array
> ----------------------------------------------------------------------
>
>                 Key: FELIX-5762
>                 URL: https://issues.apache.org/jira/browse/FELIX-5762
>             Project: Felix
>          Issue Type: Improvement
>          Components: Web Console
>    Affects Versions: webconsole-4.3.4
>            Reporter: Konrad Windszus
>            Priority: Major
>
> Currently the {{org.apache.felix.webconsole.internal.core.ServicesServlet}} exposes the {{types}} information as single value string, not as proper JSON array value (https://github.com/apache/felix/blob/trunk/webconsole/src/main/java/org/apache/felix/webconsole/internal/core/ServicesServlet.java#L297).
> An example response for a request to {{/system/console/services.json}} currently looks like this
> {code}
> {
> "status": "676 services in total",
> "serviceCount": 676,
> "data": [
> {
> "id": "301",
> "types": "[org.apache.sling.models.spi.Injector, org.apache.sling.models.spi.injectorspecific.InjectAnnotationProcessorFactory, org.apache.sling.models.spi.ValuePreparer]",
> "pid": "org.apache.sling.models.impl.injectors.ValueMapInjector",
> "ranking": "2000",
> "bundleId": 129,
> "bundleName": "Apache Sling Models Implementation",
> "bundleVersion": "1.4.2",
> "bundleSymbolicName": "org.apache.sling.models.impl"
> },
> ....
> ]
> }
> {code}
>  
> The types value is 
> {code}
> "[org.apache.sling.models.spi.Injector, org.apache.sling.models.spi.injectorspecific.InjectAnnotationProcessorFactory, org.apache.sling.models.spi.ValuePreparer]"
> {code}
> although it should rather be 
> {code}
> ["org.apache.sling.models.spi.Injector", "org.apache.sling.models.spi.injectorspecific.InjectAnnotationProcessorFactory", "org.apache.sling.models.spi.ValuePreparer"]
> {code}



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)