Skip to content

Commit

Permalink
Merge pull request #35880 from pblottiere/fix_ogc_api_def_3_10
Browse files Browse the repository at this point in the history
Fixes double type in ogcapif api document
  • Loading branch information
elpaso committed Apr 21, 2020
2 parents 8cbd1e4 + f124e6b commit a38e715
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/server/qgsserverquerystringparameter.cpp
Expand Up @@ -123,6 +123,10 @@ json QgsServerQueryStringParameter::data() const
{
dataType = "string";
}
else if ( dataType == "double" )
{
dataType = "number";
}
return
{
{ "name", nameString },
Expand Down
1 change: 1 addition & 0 deletions tests/src/server/testqgsserverquerystringparameter.cpp
Expand Up @@ -118,6 +118,7 @@ void TestQgsServerQueryStringParameter::testArguments()
QCOMPARE( p.value( ctx ).type(), QVariant::Double );
request.setUrl( QStringLiteral( "http://www.qgis.org/api/?parameter1=a%20string" ) );
QVERIFY_EXCEPTION_THROWN( p.value( ctx ), QgsServerApiBadRequestException );
QCOMPARE( QString::fromStdString( p.data()["schema"]["type"] ), QString( "number" ) );

// Test list
p.mType = QgsServerQueryStringParameter::Type::List;
Expand Down

0 comments on commit a38e715

Please sign in to comment.