Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Merge pull request #35315 from pblottiere/ogcapif_fix_3_12
Fix landing page test for OGC API Features certification
  • Loading branch information
elpaso committed Mar 25, 2020
2 parents 591d96f + 1f3ad93 commit fb7ed6b
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 11 deletions.
2 changes: 1 addition & 1 deletion src/server/qgsserverogcapi.cpp
Expand Up @@ -33,7 +33,7 @@ QMap<QgsServerOgcApi::ContentType, QStringList> QgsServerOgcApi::sContentTypeMim
QStringLiteral( "application/geojson" )
};
map[QgsServerOgcApi::ContentType::HTML] = QStringList { QStringLiteral( "text/html" ) };
map[QgsServerOgcApi::ContentType::OPENAPI3] = QStringList { QStringLiteral( "application/openapi+json;version=3.0" ) };
map[QgsServerOgcApi::ContentType::OPENAPI3] = QStringList { QStringLiteral( "application/vnd.oai.openapi+json;version=3.0" ) };
map[QgsServerOgcApi::ContentType::XML] = QStringList { QStringLiteral( "application/xml" ) };
return map;
}();
Expand Down
4 changes: 2 additions & 2 deletions src/server/services/wfs3/qgswfs3handlers.cpp
Expand Up @@ -169,7 +169,7 @@ json QgsWfs3APIHandler::schema( const QgsServerApiContext &context ) const
{
"content", {
{
"application/openapi+json;version=3.0", {
"application/vnd.oai.openapi+json;version=3.0", {
{
"schema", {
{ "type", "object" }
Expand Down Expand Up @@ -301,7 +301,7 @@ void QgsWfs3LandingPageHandler::handleRequest( const QgsServerApiContext &contex
} );
data["links"].push_back(
{
{ "href", href( context, "/api" )},
{ "href", href( context, "/api.json" )},
{ "rel", QgsServerOgcApi::relToString( QgsServerOgcApi::Rel::service_desc ) },
{ "type", QgsServerOgcApi::mimeType( QgsServerOgcApi::ContentType::OPENAPI3 ) },
{ "title", "API description" },
Expand Down
6 changes: 3 additions & 3 deletions tests/testdata/qgis_server/api/test_wfs3_api_project.json
@@ -1,4 +1,4 @@
Content-Type: application/openapi+json;version=3.0
Content-Type: application/vnd.oai.openapi+json;version=3.0

{
"components": {
Expand Down Expand Up @@ -563,7 +563,7 @@ Content-Type: application/openapi+json;version=3.0
"responses": {
"200": {
"content": {
"application/openapi+json;version=3.0": {
"application/vnd.oai.openapi+json;version=3.0": {
"schema": {
"type": "object"
}
Expand Down Expand Up @@ -2164,4 +2164,4 @@ Content-Type: application/openapi+json;version=3.0
}
],
"timeStamp": "2019-07-05T12:27:07Z"
}
}
4 changes: 2 additions & 2 deletions tests/testdata/qgis_server/api/test_wfs3_landing_page.html
Expand Up @@ -28,7 +28,7 @@

<link rel="conformance" href="http://server.qgis.org/wfs3/conformance" title="Conformance classes" type="application/json">

<link rel="service-desc" href="http://server.qgis.org/wfs3/api" title="API description" type="application/openapi+json;version=3.0">
<link rel="service-desc" href="http://server.qgis.org/wfs3/api.json" title="API description" type="application/vnd.oai.openapi+json;version=3.0">



Expand Down Expand Up @@ -83,7 +83,7 @@ <h2>Available services</h2>



<li><a rel="service-desc" href="http://server.qgis.org/wfs3/api">API description</a></li>
<li><a rel="service-desc" href="http://server.qgis.org/wfs3/api.json">API description</a></li>



Expand Down
6 changes: 3 additions & 3 deletions tests/testdata/qgis_server/api/test_wfs3_landing_page.json
Expand Up @@ -27,11 +27,11 @@ Content-Type: application/json
"type": "application/json"
},
{
"href": "http://server.qgis.org/wfs3/api",
"href": "http://server.qgis.org/wfs3/api.json",
"rel": "service-desc",
"title": "API description",
"type": "application/openapi+json;version=3.0"
"type": "application/vnd.oai.openapi+json;version=3.0"
}
],
"timeStamp": "2019-07-05T12:27:07Z"
}
}

0 comments on commit fb7ed6b

Please sign in to comment.