[ 
https://issues.apache.org/jira/browse/FELIX-6363?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17243043#comment-17243043
 ] 

Carsten Ziegeler commented on FELIX-6363:
-----------------------------------------

This rest api has been created for the web console - that's why it is working 
the way it is. The documentation is misleading/wrong. It's in fact implemented 
that you need to post all property names as part of the propertyList - the web 
console has a list of the property names,  so it's not a problem for the web 
console to send them.
I agree that this is not very useful for a general client.
I'm not sure, if changing this behaviour has side effects for the web console 
or potentially other clients.
However, we could add a new command "update" with the behaviour you want, web 
console continues to use "apply"

> Updating OSGI configuration via REST API deletes unreferenced properties
> ------------------------------------------------------------------------
>
>                 Key: FELIX-6363
>                 URL: https://issues.apache.org/jira/browse/FELIX-6363
>             Project: Felix
>          Issue Type: Bug
>          Components: Web Console
>            Reporter: Peter Grape
>            Priority: Major
>
> When updating a single value using the REST API the unreferenced properties 
> in a configuration is deleted, this is not what the documentation is saying 
> on: 
> [https://felix.apache.org/documentation/subprojects/apache-felix-web-console/web-console-restful-api.html#configuration-admin-plugin]
> If I instead add all the properties to the propertyList parameter all those 
> referenced are updated and/or saved .
>  
> This cannot be right because I will then have to query for all parameters 
> before I am able to update a single one.
> Since there is a delete option in the REST API this should only as stated in 
> the documentation update the referenced parameters and leave all others 
> untouched.
>  
> Either add an extra option with the possibility to delete unreferenced 
> properties.
> or remove the code all together.
>  
> The code that does the deletion is here: 
> [https://github.com/apache/felix-dev/blob/ab2c3ac3a570ba316daeb6368bab8193805f37c0/webconsole/src/main/java/org/apache/felix/webconsole/internal/configuration/ConfigAdminSupport.java#L304]
>  



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to