Compare commits

..

3 Commits

6 changed files with 7 additions and 6 deletions

View File

@ -442,6 +442,7 @@ void QgsWfs3DescribeCollectionHandler::handleRequest( const QgsServerApiContext
const std::string title { mapLayer->serverProperties()->wfsTitle().isEmpty() ? mapLayer->name().toStdString() : mapLayer->serverProperties()->wfsTitle().toStdString() };
const std::string itemsTitle { title + " items" };
const QString shortName { mapLayer->serverProperties()->shortName().isEmpty() ? mapLayer->name() : mapLayer->serverProperties()->shortName() };
const QString typeName = QString( shortName ).replace( ' ', '_' ).replace( ':', '-' ).replace( QChar( 0x2014 ) /* em-dash */, '-' );
json linksList = links( context );
linksList.push_back(
{ { "href", href( context, QStringLiteral( "/items" ), QgsServerOgcApi::contentTypeToExtension( QgsServerOgcApi::ContentType::GEOJSON ) ) },
@ -460,7 +461,7 @@ void QgsWfs3DescribeCollectionHandler::handleRequest( const QgsServerApiContext
);
linksList.push_back(
{ { "href", parentLink( context.request()->url(), 3 ).toStdString() + "?request=DescribeFeatureType&typenames=" + QUrlQuery( shortName ).toString( QUrl::EncodeSpaces ).toStdString() + "&service=WFS&version=2.0"
{ { "href", parentLink( context.request()->url(), 3 ).toStdString() + "?request=DescribeFeatureType&typename=" + QUrlQuery( typeName ).toString( QUrl::EncodeSpaces ).toStdString() + "&service=WFS&version=2.0"
},
{ "rel", QgsServerOgcApi::relToString( QgsServerOgcApi::Rel::describedBy ) },
{ "type", QgsServerOgcApi::mimeType( QgsServerOgcApi::ContentType::XML ) },

View File

@ -50,7 +50,7 @@ Content-Type: application/json
"type": "text/html"
},
{
"href": "http://server.qgis.org/?request=DescribeFeatureType&typenames=layer1_with_short_name&service=WFS&version=2.0",
"href": "http://server.qgis.org/?request=DescribeFeatureType&typename=layer1_with_short_name&service=WFS&version=2.0",
"rel": "describedBy",
"title": "Schema for A Layer1 with a short name",
"type": "application/xml"

View File

@ -55,7 +55,7 @@ Content-Type: application/json
"type": "text/html"
},
{
"href": "http://server.qgis.org/?request=DescribeFeatureType&typenames=points&service=WFS&version=2.0",
"href": "http://server.qgis.org/?request=DescribeFeatureType&typename=points&service=WFS&version=2.0",
"rel": "describedBy",
"title": "Schema for points",
"type": "application/xml"

View File

@ -31,7 +31,7 @@
<link rel="items" href="http://server.qgis.org/wfs3/collections/testlayer%20%C3%A8%C3%A9/items.html" title="A test wfs vector layer èé items as HTML" type="text/html">
<link rel="describedBy" href="http://server.qgis.org/?request=DescribeFeatureType&typenames=testlayer%20èé&service=WFS&version=2.0" title="Schema for A test wfs vector layer èé" type="application/xml">
<link rel="describedBy" href="http://server.qgis.org/?request=DescribeFeatureType&typename=testlayer%20èé&service=WFS&version=2.0" title="Schema for A test wfs vector layer èé" type="application/xml">

View File

@ -50,7 +50,7 @@ Content-Type: application/json
"type": "text/html"
},
{
"href": "http://server.qgis.org/?request=DescribeFeatureType&typenames=testlayer%20èé&service=WFS&version=2.0",
"href": "http://server.qgis.org/?request=DescribeFeatureType&typename=testlayer%20èé&service=WFS&version=2.0",
"rel": "describedBy",
"title": "Schema for A test wfs vector layer èé",
"type": "application/xml"

View File

@ -70,7 +70,7 @@ Content-Type: application/json
"id": "layer1_with_short_name",
"links": [
{
"href": "http://server.qgis.org/wfs3/collections/layer1_with_short_name/items.json",
"href": "http://server.qgis.org/wfs3/collections/layer1_with_short_name/items.geojson",
"rel": "items",
"title": "A Layer1 with a short name as GeoJSON",
"type": "application/geo+json"