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" 
   27 using namespace nlohmann;
 
  113     virtual QRegularExpression 
path() 
const = 0;
 
  142     virtual QStringList 
tags()
 const { 
return {}; }
 
  158     QList<QgsServerOgcApi::ContentType> contentTypes() const 
SIP_SKIP;
 
  195     QString contentTypeForAccept( const QString &accept ) const;
 
  225     void write( json &data, 
const QgsServerApiContext &context, 
const json &htmlMetadata = 
nullptr ) 
const;
 
  233     void jsonDump( json &data, 
const QgsServerApiContext &context, 
const QString &contentType = QStringLiteral( 
"application/json" ) ) 
const;
 
  264                const std::string &title = 
"" ) 
const;
 
  320     std::
string href( const 
QgsServerApiContext &context, const QString &extraPath = QString(), const QString &extension = QString() ) const;
 
  353     static QString parentLink( const QUrl &url, 
int levels = 1 );
 
  366     static json defaultResponse() 
SIP_SKIP;
 
  382     void setContentTypesInt( const QList<
int> &contentTypes ) 
SIP_PYNAME( setContentTypes );
 
  393     QList<
QgsServerOgcApi::ContentType> mContentTypes = { QgsServerOgcApi::ContentType::JSON, QgsServerOgcApi::ContentType::HTML };
 
Bad request error API exception.
The QgsServerApiContext class encapsulates the resources for a particular client request: the request...
The QgsServerOgcApiHandler abstract class represents a OGC API handler to be registered in QgsServerO...
virtual std::string summary() const =0
Summary.
virtual QList< QgsServerQueryStringParameter > parameters(const QgsServerApiContext &context) const
Returns a list of query string parameters.
virtual QgsServerOgcApi::Rel linkType() const =0
Main role for the resource link.
virtual QStringList tags() const
Tags.
virtual std::string linkTitle() const =0
Title for the handler link.
virtual std::string operationId() const =0
Returns the operation id for template file names and other internal references.
virtual std::string description() const =0
Description.
virtual QRegularExpression path() const =0
URL pattern for this handler, named capture group are automatically extracted and returned by values(...
QGIS Server OGC API endpoint.
ContentType
Media types used for content negotiation, insert more specific first.
QgsServerRequest Class defining request interface passed to services QgsService::executeRequest() met...
Represents a vector layer which manages a vector based data sets.
#define SIP_VIRTUALERRORHANDLER(name)