[server][oapif] Fix link rel property

This commit is contained in:
pathmapper 2024-09-24 07:36:17 +02:00
parent beca49c4e8
commit 71ed302093
2 changed files with 10 additions and 10 deletions

View File

@ -517,13 +517,13 @@ void QgsWfs3CollectionsHandler::handleRequest( const QgsServerApiContext &contex
"links", {
{
{ "href", href( context, QStringLiteral( "/%1/items" ).arg( shortName ), QgsServerOgcApi::contentTypeToExtension( QgsServerOgcApi::ContentType::JSON ) ) },
{ "rel", QgsServerOgcApi::relToString( QgsServerOgcApi::Rel::item ) },
{ "rel", QgsServerOgcApi::relToString( QgsServerOgcApi::Rel::items ) },
{ "type", QgsServerOgcApi::mimeType( QgsServerOgcApi::ContentType::GEOJSON ) },
{ "title", title + " as GeoJSON" }
},
{
{ "href", href( context, QStringLiteral( "/%1/items" ).arg( shortName ), QgsServerOgcApi::contentTypeToExtension( QgsServerOgcApi::ContentType::HTML ) ) },
{ "rel", QgsServerOgcApi::relToString( QgsServerOgcApi::Rel::item ) },
{ "rel", QgsServerOgcApi::relToString( QgsServerOgcApi::Rel::items ) },
{ "type", QgsServerOgcApi::mimeType( QgsServerOgcApi::ContentType::HTML ) },
{ "title", title + " as HTML" }
}/* TODO: not sure what these "concepts" are about, neither if they are mandatory

View File

@ -30,13 +30,13 @@ Content-Type: application/json
"links": [
{
"href": "http://server.qgis.org/wfs3/collections/testlayer%20%C3%A8%C3%A9/items.json",
"rel": "item",
"rel": "items",
"title": "A test wfs vector layer èé as GeoJSON",
"type": "application/geo+json"
},
{
"href": "http://server.qgis.org/wfs3/collections/testlayer%20%C3%A8%C3%A9/items.html",
"rel": "item",
"rel": "items",
"title": "A test wfs vector layer èé as HTML",
"type": "text/html"
}
@ -71,13 +71,13 @@ Content-Type: application/json
"links": [
{
"href": "http://server.qgis.org/wfs3/collections/layer1_with_short_name/items.json",
"rel": "item",
"rel": "items",
"title": "A Layer1 with a short name as GeoJSON",
"type": "application/geo+json"
},
{
"href": "http://server.qgis.org/wfs3/collections/layer1_with_short_name/items.html",
"rel": "item",
"rel": "items",
"title": "A Layer1 with a short name as HTML",
"type": "text/html"
}
@ -112,13 +112,13 @@ Content-Type: application/json
"links": [
{
"href": "http://server.qgis.org/wfs3/collections/exclude_attribute/items.json",
"rel": "item",
"rel": "items",
"title": "A test vector layer exclude attrs as GeoJSON",
"type": "application/geo+json"
},
{
"href": "http://server.qgis.org/wfs3/collections/exclude_attribute/items.html",
"rel": "item",
"rel": "items",
"title": "A test vector layer exclude attrs as HTML",
"type": "text/html"
}
@ -153,13 +153,13 @@ Content-Type: application/json
"links": [
{
"href": "http://server.qgis.org/wfs3/collections/fields_alias/items.json",
"rel": "item",
"rel": "items",
"title": "A test vector layer with aliases as GeoJSON",
"type": "application/geo+json"
},
{
"href": "http://server.qgis.org/wfs3/collections/fields_alias/items.html",
"rel": "item",
"rel": "items",
"title": "A test vector layer with aliases as HTML",
"type": "text/html"
}