16 #ifndef QGSSERVEROGCAPI_H
17 #define QGSSERVEROGCAPI_H
20 #include "qgis_server.h"
98 const QString &rootPath,
100 const QString &description = QString(),
101 const QString &version = QString() );
104 const QString
name()
const override {
return mName; }
105 const QString
description()
const override {
return mDescription; }
106 const QString
version()
const override {
return mVersion; }
107 const QString
rootPath()
const override {
return mRootPath ; }
120 static const QMap<QgsServerOgcApi::ContentType, QStringList> contentTypeMimes()
SIP_SKIP;
135 template<
class T,
typename... Args>
138 mHandlers.emplace_back( std::make_shared<T>( args... ) );
151 static QUrl sanitizeUrl(
const QUrl &url );
186 const std::vector<std::shared_ptr<QgsServerOgcApiHandler> > handlers() const
SIP_SKIP;
192 QString mDescription;
199 static QMap<
QgsServerOgcApi::ContentType, QStringList> sContentTypeMime;
Bad request error API exception.
The QgsServerApiContext class encapsulates the resources for a particular client request: the request...
Server generic API endpoint abstract base class.
virtual void executeRequest(const QgsServerApiContext &context) const =0
Executes a request by passing the given context to the API handlers.
QgsServerInterface Class defining interfaces exposed by QGIS Server and made available to plugins.
The QgsServerOgcApiHandler abstract class represents a OGC API handler to be registered in QgsServerO...
QGIS Server OGC API endpoint.
const QString rootPath() const override
Returns the root path for the API.
void registerHandler(Args... args)
Registers an OGC API handler passing Args to the constructor.
const QString description() const override
Returns the API description.
ContentType
Media types used for content negotiation, insert more specific first.
@ JSON
"application/openapi+json;version=3.0"
@ collection
Refers to a resource providing information about the link’s context.
@ prev
Identifies service documentation for the context that is primarily intended for human consumption.
@ service_doc
Identifies service description for the context that is primarily intended for consumption by machines...
@ conformance
Refers to a resource that is comprised of members of the collection represented by the link’s context...
@ describedBy
Refers to a substitute for this context.
@ next
Indicates that the link’s context is a part of a series, and that the previous in the series is the l...
@ license
Indicates that the link’s context is a part of a series, and that the next in the series is the link ...
@ service_desc
Conveys an identifier for the link’s context.
@ items
Refers to a license associated with this context.
@ item
The target IRI points to a resource that is a member of the collection represented by the context IRI...
const QString version() const override
Returns the version of the service.
const QString name() const override
Returns the API name.
#define SIP_VIRTUALERRORHANDLER(name)