[Geoserver-devel] [jira] (GEOS-5858) Inconsistent representation of workspace specific styles in rest

Andrea Aime created BugGEOS-5858
Inconsistent representation of workspace specific styles in rest

Issue Type:

BugBug

Assignee:

Justin Deoliveira

Components:

REST

Created:

19/Jun/13 11:26 AM

Description:

When associating a workspace specific style with a layer the representation of the style mentions the workspace only in the atom link, e.g.:

<defaultStyle>
<name>test</name>
<atom:link xmlns:atom=“http://www.w3.org/2005/Atom” rel=“alternate” href=“http://localhost:8080/geoserver/rest/workspaces/topp/styles/test.xml” type=“application/xml”/>
</defaultStyle>

However, if one tries to update an existing layer via REST and point to a workspace specific style, the request has to contain a <workspace> element, like this:

curl -v -u admin:geoserver -XPUT -H “Content-type: text/xml” -d “<layer><defaultStyle><name>test</name><workspace>topp</workspace></defaultStyle><enabled>true</enabled></layer>” http://localhost:8080/geoserver/rest/layers/topp:states

Otherwise the update will silently fail. I could figure out the <workspace> thing only by looking at the code.

Project:

GeoServer

Priority:

MajorMajor

Reporter:

Andrea Aime

This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: [http://www.atlassian.com/software/jira](http://www.atlassian.com/software/jira)