[Geoserver-devel] [JIRA] (GEOS-9937) Name of styles with colons are incorrect in REST API

Jan Boonen created an issue

GeoServer / BugGEOS-9937

Name of styles with colons are incorrect in REST API

Issue Type:

BugBug

Affects Versions:

2.18.2

Assignee:

Unassigned

Components:

REST

Created:

26/Feb/21 3:55 PM

Environment:

Ubuntu 18.04

Priority:

MediumMedium

Reporter:

Jan Boonen

After an upgrade from GeoServer 2.12 to 2.18 we have ran into some peculiar behaviour of the REST API. For historical reasons we use styles with colons in the name. When requesting these style via the endpoint {{ /rest/styles/

{name}

.json }} we retrieve the information as expected (see example below).

{{{
“style”: {
“name”: “GEOD8602XXXX:test_bag_0b591144-b63a-44a0-bff2-e372a30a8be2:test”,
“format”: “sld”,
“languageVersion”:

{ “version”: “1.0.0” }

,
“filename”: “GEOD8602XXXX:test_bag_0b591144-b63a-44a0-bff2-e372a30a8be2:test.sld”,
“dateCreated”: “2021-02-26 14:46:33.966 UTC”,
“dateModified”: “2021-02-26 14:46:34.313 UTC”
}
}}}

However, when we request the layer to which this style is connected via {{ /rest/layers/

{layerName}

.json }} the name of the style has changed (see JSON response below). The part of the name before the first colon is duplicated! It seems to me that GeoServer treats this part as the workspace name, but the style is available in the global space.

{{{
“layer”: {
“name”: “test_bag_0b591144-b63a-44a0-bff2-e372a30a8be2”,
“type”: “VECTOR”,
“defaultStyle”:

{ “name”: “polygon”, “href”: “https://acc.geodan.nl/data/my/gws/rest/styles/polygon.json” }

,
“styles”: {
“style”: [

{ “name”: “GEOD8602XXXX:GEOD8602XXXX:test_bag_0b591144-b63a-44a0-bff2-e372a30a8be2:test”, “href”: “https://acc.geodan.nl/data/my/gws/rest/styles/GEOD8602XXXX%3Atest_bag_0b591144-b63a-44a0-bff2-e372a30a8be2%3Atest.json” }

]
},
“resource”:

{ “@class”: “featureType”, “name”: “GEOD8602XXXX:test_bag_0b591144-b63a-44a0-bff2-e372a30a8be2”, “href”: “https://acc.geodan.nl/data/my/gws/rest/workspaces/GEOD8602XXXX/datastores/GEOD8602XXXX/featuretypes/test_bag_0b591144-b63a-44a0-bff2-e372a30a8be2.json” }

,
“queryable”: true,
“opaque”: false,
“attribution”:

{ “logoWidth”: 0, “logoHeight”: 0 }

,
“dateCreated”: “2021-02-18 09:13:54.87 UTC”,
“dateModified”: “2021-02-26 14:34:54.921 UTC”
}
}}}

Add Comment

Add Comment

Get Jira notifications on your phone! Download the Jira Cloud app for Android or iOS


This message was sent by Atlassian Jira (v1001.0.0-SNAPSHOT#100154-sha1:2dd4382)

Atlassian logo