16 #ifndef QGSSERVEROGCAPIHANDLER_H 17 #define QGSSERVEROGCAPIHANDLER_H 19 #include <QRegularExpression> 20 #include "qgis_server.h" 23 #include "nlohmann/json_fwd.hpp" 24 #include "inja/inja.hpp" 77 virtual QRegularExpression path()
const = 0;
80 virtual std::string operationId()
const = 0;
94 virtual std::string summary()
const = 0;
97 virtual std::string description()
const = 0;
100 virtual std::string linkTitle()
const = 0;
106 virtual QStringList
tags()
const {
return {}; }
122 QList<QgsServerOgcApi::ContentType> contentTypes()
const SIP_SKIP;
159 QString contentTypeForAccept(
const QString &accept )
const;
164 #ifndef SIP_RUN // Skip SIP 187 void write( json &data,
const QgsServerApiContext &context,
const json &htmlMetadata =
nullptr )
const;
195 void jsonDump( json &data,
const QgsServerApiContext &context,
const QString &contentType = QStringLiteral(
"application/json" ) )
const;
226 const std::string &title =
"" )
const;
250 #endif // SIP skipped 281 std::string href(
const QgsServerApiContext &context,
const QString &extraPath = QString(),
const QString &extension = QString() )
const;
314 static QString parentLink(
const QUrl &url,
int levels = 1 );
327 static json defaultResponse()
SIP_SKIP;
343 void setContentTypesInt(
const QList<int> &contentTypes )
SIP_PYNAME( setContentTypes );
349 void setContentTypes(
const QList<QgsServerOgcApi::ContentType> &contentTypes )
SIP_SKIP;
354 QList<QgsServerOgcApi::ContentType> mContentTypes = { QgsServerOgcApi::ContentType::JSON, QgsServerOgcApi::ContentType::HTML };
359 #endif // QGSSERVEROGCAPIHANDLER_H #define SIP_VIRTUALERRORHANDLER(name)
The QgsServerOgcApiHandler abstract class represents a OGC API handler to be registered in QgsServerO...
ContentType
Media types used for content negotiation, insert more specific first.
The QgsServerApiContext class encapsulates the resources for a particular client request: the request...
QgsServerRequest Class defining request interface passed to services QgsService::executeRequest() met...
Bad request error API exception.
virtual QList< QgsServerQueryStringParameter > parameters(const QgsServerApiContext &context) const
Returns a list of query string parameters.
virtual QStringList tags() const
Tags.
Represents a vector layer which manages a vector based data sets.