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 );
193 const std::vector<std::shared_ptr<QgsServerOgcApiHandler> > handlers() const
SIP_SKIP;
199 QString mDescription;
206 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.
@ OPENAPI3
"application/openapi+json;version=3.0"
@ alternate
Refers to a substitute for this context.
@ collection
The target IRI points to a resource that is a member of the collection represented by the context IRI...
@ self
Conveys an identifier for the link’s context.
@ prev
Indicates that the link’s context is a part of a series, and that the previous in the series is the l...
@ service_doc
Identifies service documentation for the context that is primarily intended for human consumption.
@ conformance
The target IRI points to a resource which represents the collection resource for the context IRI.
@ describedBy
Refers to a resource providing information about the link’s context.
@ next
Indicates that the link’s context is a part of a series, and that the next in the series is the link ...
@ license
Refers to a license associated with this context.
@ service_desc
Identifies service description for the context that is primarily intended for consumption by machines...
@ items
Refers to a resource that is comprised of members of the collection represented by the link’s 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.
static Q_DECL_DEPRECATED QgsServerOgcApi::ContentType contenTypeFromExtension(const std::string &extension)
Returns the Content-Type value corresponding to extension.
#define SIP_VIRTUALERRORHANDLER(name)
#define SIP_THROW(name,...)