Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Renamed API definition -> description
  • Loading branch information
elpaso committed Nov 14, 2019
1 parent fc9ba85 commit 61fdbf7
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 11 deletions.
4 changes: 2 additions & 2 deletions src/server/services/wfs3/qgswfs3handlers.cpp
Expand Up @@ -297,14 +297,14 @@ void QgsWfs3LandingPageHandler::handleRequest( const QgsServerApiContext &contex
{ "href", href( context, "/conformance" )},
{ "rel", QgsServerOgcApi::relToString( QgsServerOgcApi::Rel::conformance ) },
{ "type", QgsServerOgcApi::mimeType( QgsServerOgcApi::ContentType::JSON ) },
{ "title", "WFS 3.0 conformance classes" },
{ "title", "Conformance classes" },
} );
data["links"].push_back(
{
{ "href", href( context, "/api" )},
{ "rel", QgsServerOgcApi::relToString( QgsServerOgcApi::Rel::service_desc ) },
{ "type", QgsServerOgcApi::mimeType( QgsServerOgcApi::ContentType::OPENAPI3 ) },
{ "title", "API definition" },
{ "title", "API description" },
} );
write( data, context, {{ "pageTitle", linkTitle() }, { "navigation", json::array() }} );
}
Expand Down
4 changes: 2 additions & 2 deletions src/server/services/wfs3/qgswfs3handlers.h
Expand Up @@ -76,9 +76,9 @@ class QgsWfs3APIHandler: public QgsWfs3AbstractItemsHandler
void handleRequest( const QgsServerApiContext &context ) const override;
QRegularExpression path() const override { return QRegularExpression( R"re(/api)re" ); }
std::string operationId() const override { return "getApiDescription"; }
std::string summary() const override { return "The API definition"; }
std::string summary() const override { return "The API description"; }
std::string description() const override { return "The formal documentation of this API according to the OpenAPI specification, version 3.0. I.e., this document."; }
std::string linkTitle() const override { return "API definition"; }
std::string linkTitle() const override { return "API description"; }
QStringList tags() const override { return { QStringLiteral( "Capabilities" ) }; }
QgsServerOgcApi::Rel linkType() const override { return QgsServerOgcApi::Rel::service_desc; }
json schema( const QgsServerApiContext &context ) const override;
Expand Down
2 changes: 1 addition & 1 deletion tests/testdata/qgis_server/api/test_wfs3_api_project.json
Expand Up @@ -592,7 +592,7 @@ Content-Type: application/openapi+json;version=3.0
"description": "An error occurred."
}
},
"summary": "The API definition",
"summary": "The API description",
"tags": [
"Capabilities"
]
Expand Down
8 changes: 4 additions & 4 deletions tests/testdata/qgis_server/api/test_wfs3_landing_page.html
Expand Up @@ -26,9 +26,9 @@

<link rel="data" href="http://server.qgis.org/wfs3/collections" title="Feature collections" type="application/json">

<link rel="conformance" href="http://server.qgis.org/wfs3/conformance" title="WFS 3.0 conformance classes" type="application/json">
<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 definition" type="application/openapi+json;version=3.0">
<link rel="service-desc" href="http://server.qgis.org/wfs3/api" title="API description" type="application/openapi+json;version=3.0">



Expand Down Expand Up @@ -77,13 +77,13 @@ <h2>Available services</h2>



<li><a rel="conformance" href="http://server.qgis.org/wfs3/conformance">WFS 3.0 conformance classes</a></li>
<li><a rel="conformance" href="http://server.qgis.org/wfs3/conformance">Conformance classes</a></li>





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



Expand Down
4 changes: 2 additions & 2 deletions tests/testdata/qgis_server/api/test_wfs3_landing_page.json
Expand Up @@ -23,13 +23,13 @@ Content-Type: application/json
{
"href": "http://server.qgis.org/wfs3/conformance",
"rel": "conformance",
"title": "WFS 3.0 conformance classes",
"title": "Conformance classes",
"type": "application/json"
},
{
"href": "http://server.qgis.org/wfs3/api",
"rel": "service-desc",
"title": "API definition",
"title": "API description",
"type": "application/openapi+json;version=3.0"
}
],
Expand Down

0 comments on commit 61fdbf7

Please sign in to comment.