From ace190c6dc98b40eb38e6511564593c86bfcb704 Mon Sep 17 00:00:00 2001 From: Esteban Zimanyi Date: Thu, 19 Nov 2026 10:45:01 +0100 Subject: [PATCH] Mark every route as a requirement of a declared class or an extension routeTable holds every operation the service serves: its method and path, its handler, and the conformance class it is a requirement of, or extension for a MobilityAPI extension. newMux routes by it, and the API definition marks each operation by it, with x-conformance-class naming the class or x-mobilityapi-extension. The class URIs the conformance declaration lists are constants the table, the declaration and the tests read. ats_routes_test.go holds the three to each other: a route marked with a class the conformance declaration does not list, a route the API definition does not describe, an operation it describes that no route serves, and a route an abstract test of Annex A issues that is marked as an extension or with another class, each fail. Of the 45 routes, 33 are requirements of a declared class (Common core 3, mf-collection 5, movingfeatures 14, cquery 5, Coverages core 2, EDR core 4) and 12 are extensions: /health, trajectories, timeseries, export, bulk, PUT of a moving feature, the live ingest of a temporal property and the five routes of the geometry continuous query. Witness. GET /health, /collections/{cid}/trajectories and /collections/{cid}/timeseries were served and absent from the API definition, since the routing table and the API definition were two lists. Measured. go test passes; renaming /health in the API definition fails the test from both sides, the served route undescribed and the described one unserved. samples/api-definition.json is what the service writes, emitted as samples.go writes it; the same emission over master reproduces master's sample byte for byte. --- ats_part1_test.go | 6 +- ats_routes_test.go | 139 +++++++++++++++++++++++++ main.go | 197 ++++++++++++++++++++++++------------ samples/api-definition.json | 159 +++++++++++++++++++++-------- 4 files changed, 389 insertions(+), 112 deletions(-) create mode 100644 ats_routes_test.go diff --git a/ats_part1_test.go b/ats_part1_test.go index 37c47af..2f386b8 100644 --- a/ats_part1_test.go +++ b/ats_part1_test.go @@ -87,9 +87,9 @@ type atsTest struct { // The conformance class URIs of Part 1. const ( - classCollection = "http://www.opengis.net/spec/ogcapi-movingfeatures-1/1.0/conf/mf-collection" - classFeatures = "http://www.opengis.net/spec/ogcapi-movingfeatures-1/1.0/conf/movingfeatures" - classCommon = "http://www.opengis.net/spec/ogcapi-movingfeatures-1/1.0/conf/common" + classCollection = confMFCollection + classFeatures = confMovingFeatures + classCommon = confMFCommon ) // atsPart1 is Annex A. The 45 abstract tests of the mf-collection and diff --git a/ats_routes_test.go b/ats_routes_test.go new file mode 100644 index 0000000..7455cf3 --- /dev/null +++ b/ats_routes_test.go @@ -0,0 +1,139 @@ +// Every route the service serves is a requirement of a conformance class it +// declares, or a MobilityAPI extension the API definition names as one. +// +// The routing table and the API definition are both read from #routeTable, and +// this file holds the three to each other: a route marked with a class the +// service does not declare, a route the API definition does not describe, an +// operation described that no route serves, and a route an abstract test of +// Annex A issues that is marked as an extension, each fail here. +package main + +import ( + "encoding/json" + "net/http/httptest" + "sort" + "strings" + "testing" +) + +// declaredClasses reads the conformance declaration the service writes. +func declaredClasses(t *testing.T) map[string]bool { + t.Helper() + rec := httptest.NewRecorder() + conformance(rec, httptest.NewRequest("GET", "/conformance", nil)) + var doc struct { + ConformsTo []string `json:"conformsTo"` + } + if err := json.Unmarshal(rec.Body.Bytes(), &doc); err != nil { + t.Fatal(err) + } + out := map[string]bool{} + for _, c := range doc.ConformsTo { + out[c] = true + } + return out +} + +// apiOperations reads the API definition the service writes: each operation, +// keyed "METHOD path", with its marking. +func apiOperations(t *testing.T) map[string]map[string]any { + t.Helper() + rec := httptest.NewRecorder() + apiDoc(rec, httptest.NewRequest("GET", "/api", nil)) + var doc struct { + Paths map[string]map[string]map[string]any `json:"paths"` + } + if err := json.Unmarshal(rec.Body.Bytes(), &doc); err != nil { + t.Fatal(err) + } + out := map[string]map[string]any{} + for p, item := range doc.Paths { + for m, op := range item { + out[strings.ToUpper(m)+" "+p] = op + } + } + return out +} + +// Every route is marked with a class the service declares, or as an extension; +// the API definition describes every route with that marking and describes no +// operation that no route serves. +func TestATSEveryRouteIsAClassOrAnExtension(t *testing.T) { + declared := declaredClasses(t) + ops := apiOperations(t) + served := map[string]bool{} + byClass := map[string]int{} + for _, r := range routeTable() { + key := r.method + " " + r.path + if served[key] { + t.Errorf("%s is routed twice", key) + } + served[key] = true + if r.class != extension && !declared[r.class] { + t.Errorf("%s is marked with %s, which the conformance declaration does not list", key, r.class) + } + op, ok := ops[key] + if !ok { + t.Errorf("%s is served and the API definition does not describe it", key) + continue + } + class, _ := op[xConformanceClass].(string) + ext, _ := op[xExtension].(bool) + switch { + case r.class == extension && (!ext || class != ""): + t.Errorf("%s is an extension and the API definition marks it %s=%v %s=%q", + key, xExtension, ext, xConformanceClass, class) + case r.class != extension && (ext || class != r.class): + t.Errorf("%s is a requirement of %s and the API definition marks it %s=%v %s=%q", + key, r.class, xExtension, ext, xConformanceClass, class) + } + if r.class == extension { + byClass["extension"]++ + } else { + byClass[r.class]++ + } + } + for key := range ops { + if !served[key] { + t.Errorf("the API definition describes %s, which no route serves", key) + } + } + if len(served) == 0 { + t.Fatal("the route table is empty, so this test would assert nothing") + } + var lines []string + for c, n := range byClass { + lines = append(lines, c+": "+itoa(n)) + } + sort.Strings(lines) + t.Logf("%d routes: %s", len(served), strings.Join(lines, "; ")) +} + +// A route an abstract test of Annex A issues is a requirement of the class the +// test belongs to, never an extension: the marking agrees with the standard's +// own conformance instrument. +func TestATSAnnexARoutesAreClassRoutes(t *testing.T) { + classOf := map[string]string{} + for _, r := range routeTable() { + classOf[r.method+" "+r.path] = r.class + } + var n int + for _, a := range atsPart1 { + if a.kind != atsRoute { + continue + } + n++ + class, ok := classOf[a.method+" "+a.path] + if !ok { + t.Errorf("%s issues %s %s, which the route table does not hold", a.id, a.method, a.path) + continue + } + if class != a.class { + t.Errorf("%s issues %s %s, marked %q; the abstract test belongs to %s", + a.id, a.method, a.path, class, a.class) + } + } + if n == 0 { + t.Fatal("Annex A holds no route row, so this test would assert nothing") + } +} diff --git a/main.go b/main.go index 7c57ebc..7150c32 100644 --- a/main.go +++ b/main.go @@ -182,66 +182,130 @@ func main() { log.Println("shut down") } -// newMux is the routing table of the tier: every path the service serves, -// with the method each one accepts. main and the conformance tests share it, -// so a test exercises the routing the service runs. +// The conformance classes the tier declares at /conformance, beside +// #coverageConformance and #edrConformance. +const ( + confMFCommon = "http://www.opengis.net/spec/ogcapi-movingfeatures-1/1.0/conf/common" + confMFCollection = "http://www.opengis.net/spec/ogcapi-movingfeatures-1/1.0/conf/mf-collection" + confMovingFeatures = "http://www.opengis.net/spec/ogcapi-movingfeatures-1/1.0/conf/movingfeatures" + confCQuery = "http://www.opengis.net/spec/ogcapi-movingfeatures-4/1.0/conf/cquery" + confCommonCore = "http://www.opengis.net/spec/ogcapi-common-1/1.0/conf/core" + confCommonCollections = "http://www.opengis.net/spec/ogcapi-common-2/1.0/conf/collections" +) + +// extension marks a route that is a requirement of no class the tier declares: +// a MobilityAPI extension, which the API definition names as one and which +// changes no answer a declared class defines. +const extension = "" + +// route is one operation the service serves: the method and path it is routed +// by, its handler, and the declared conformance class it is a requirement of, +// or #extension. +type route struct { + method, path string + handler http.HandlerFunc + class string +} + +// routeTable is every operation the service serves. newMux routes by it and +// apiDoc marks each operation of the API definition by it, so what is served, +// what is described and what each route answers to are one list. +func routeTable() []route { + rs := []route{ + {"GET", "/health", health, extension}, + {"GET", "/", landing, confCommonCore}, + {"GET", "/api", apiDoc, confCommonCore}, + {"GET", "/conformance", conformance, confCommonCore}, + {"GET", "/collections", listCollections, confMFCollection}, + {"POST", "/collections", postCollection, confMFCollection}, + {"GET", "/collections/{cid}", getCollection, confMFCollection}, + {"PUT", "/collections/{cid}", putCollection, confMFCollection}, + {"DELETE", "/collections/{cid}", deleteCollection, confMFCollection}, + // The animated map and the fleet dashboard read these two. + {"GET", "/collections/{cid}/trajectories", trajectories, extension}, + {"GET", "/collections/{cid}/timeseries", timeseries, extension}, + {"GET", "/collections/{cid}/items", streamItems, confMovingFeatures}, + {"POST", "/collections/{cid}/items", postItem, confMovingFeatures}, + {"GET", "/collections/{cid}/items/{fid}", getItem, confMovingFeatures}, + {"PUT", "/collections/{cid}/items/{fid}", putItem, extension}, + {"DELETE", "/collections/{cid}/items/{fid}", deleteItem, confMovingFeatures}, + // The lakehouse bulk feed (NDJSON | Parquet) and the bulk ingest of a + // real-time fleet feed. + {"GET", "/collections/{cid}/export", export, extension}, + {"POST", "/collections/{cid}/bulk", bulkIngest, extension}, + // OGC API - Coverages - Part 1: a raster collection's coverage and its fields. + {"GET", "/collections/{cid}/coverage", getCoverage, coverageConfBase + "core"}, + {"GET", "/collections/{cid}/schema", coverageSchema, coverageConfBase + "core"}, + // The sub-resources of a moving feature. + {"GET", "/collections/{cid}/items/{fid}/tgsequence", tgSequence, confMovingFeatures}, + {"POST", "/collections/{cid}/items/{fid}/tgsequence", postTgSequence, confMovingFeatures}, + {"DELETE", "/collections/{cid}/items/{fid}/tgsequence/{tgid}", deleteTgSequence, confMovingFeatures}, + {"GET", "/collections/{cid}/items/{fid}/tgsequence/{tgid}/{qtype}", tgSequenceQuery, confMovingFeatures}, + {"GET", "/collections/{cid}/items/{fid}/tproperties", listTProperties, confMovingFeatures}, + {"POST", "/collections/{cid}/items/{fid}/tproperties", postTProperties, confMovingFeatures}, + {"GET", "/collections/{cid}/items/{fid}/tproperties/{pname}", getTProperty, confMovingFeatures}, + {"POST", "/collections/{cid}/items/{fid}/tproperties/{pname}", postTPropertyValues, confMovingFeatures}, + {"DELETE", "/collections/{cid}/items/{fid}/tproperties/{pname}", deleteTProperty, confMovingFeatures}, + {"DELETE", "/collections/{cid}/items/{fid}/tproperties/{pname}/{tvid}", deleteTPropertyValue, confMovingFeatures}, + // MF Part 4 (Stream Extension): continuous queries on a temporal property, + // their results delivered over Server-Sent Events. + {"POST", "/collections/{cid}/items/{fid}/tproperties/{pname}/queries", postQuery, confCQuery}, + {"GET", "/collections/{cid}/items/{fid}/tproperties/{pname}/queries", listQueries, confCQuery}, + {"GET", "/collections/{cid}/items/{fid}/tproperties/{pname}/queries/{qid}", getQuery, confCQuery}, + {"GET", "/collections/{cid}/items/{fid}/tproperties/{pname}/queries/{qid}/stream", streamQuery, confCQuery}, + {"DELETE", "/collections/{cid}/items/{fid}/tproperties/{pname}/queries/{qid}", deleteQuery, confCQuery}, + // Live ingestion: a producer pushes records the live queries process. + {"POST", "/collections/{cid}/items/{fid}/tproperties/{pname}/ingest", ingestProperty, extension}, + // A continuous query streaming the moving feature's position, the feed of + // an animated map, which CONFORMANCE.md states is no Part 4 requirement. + {"POST", "/collections/{cid}/items/{fid}/tgsequence/queries", postGeometryQuery, extension}, + {"GET", "/collections/{cid}/items/{fid}/tgsequence/queries", listGeometryQueries, extension}, + {"GET", "/collections/{cid}/items/{fid}/tgsequence/queries/{qid}", getQuery, extension}, + {"GET", "/collections/{cid}/items/{fid}/tgsequence/queries/{qid}/stream", streamQuery, extension}, + {"DELETE", "/collections/{cid}/items/{fid}/tgsequence/queries/{qid}", deleteQuery, extension}, + } + // OGC API - EDR: the queries of a raster collection. + for _, q := range edrQueries { + rs = append(rs, route{"GET", "/collections/{cid}/" + q.name, edrQuery(q.name), edrConformance}) + } + return rs +} + +// The OpenAPI specification extensions by which the API definition marks an +// operation: the declared conformance class it is a requirement of, or that it +// is a MobilityAPI extension. +const ( + xConformanceClass = "x-conformance-class" + xExtension = "x-mobilityapi-extension" +) + +// markOperations marks every operation of the API definition's paths with the +// class #routeTable gives its route, or as an extension. +func markOperations(paths map[string]any) { + for _, r := range routeTable() { + item, _ := paths[r.path].(map[string]any) + op, _ := item[strings.ToLower(r.method)].(map[string]any) + if op == nil { + continue + } + if r.class == extension { + op[xExtension] = true + } else { + op[xConformanceClass] = r.class + } + } +} + +// health answers that the service is up. +func health(w http.ResponseWriter, r *http.Request) { writeRaw(w, 200, `{"status":"ok"}`) } + +// newMux is the routing table of the tier, built from #routeTable. main and the +// conformance tests share it, so a test exercises the routing the service runs. func newMux() *http.ServeMux { mux := http.NewServeMux() - mux.HandleFunc("GET /health", func(w http.ResponseWriter, r *http.Request) { writeRaw(w, 200, `{"status":"ok"}`) }) - mux.HandleFunc("GET /", landing) - mux.HandleFunc("GET /api", apiDoc) - mux.HandleFunc("GET /conformance", conformance) - mux.HandleFunc("GET /collections", listCollections) - mux.HandleFunc("POST /collections", postCollection) - mux.HandleFunc("GET /collections/{cid}", getCollection) - mux.HandleFunc("PUT /collections/{cid}", putCollection) - mux.HandleFunc("DELETE /collections/{cid}", deleteCollection) - mux.HandleFunc("GET /collections/{cid}/trajectories", trajectories) - mux.HandleFunc("GET /collections/{cid}/timeseries", timeseries) - mux.HandleFunc("GET /collections/{cid}/items", streamItems) - mux.HandleFunc("GET /collections/{cid}/items/{fid}", getItem) - mux.HandleFunc("POST /collections/{cid}/items", postItem) - mux.HandleFunc("GET /collections/{cid}/export", export) // lakehouse bulk feed (NDJSON | Parquet) - // OGC API - Coverages - Part 1: a raster collection's coverage and its fields - mux.HandleFunc("GET /collections/{cid}/coverage", getCoverage) - mux.HandleFunc("GET /collections/{cid}/schema", coverageSchema) - // OGC API - EDR: the queries of a raster collection - for _, q := range edrQueries { - mux.HandleFunc("GET /collections/{cid}/"+q.name, edrQuery(q.name)) - } - // extension (not in conformsTo): bulk ingest of a real-time fleet feed - mux.HandleFunc("POST /collections/{cid}/bulk", bulkIngest) - // OGC API – Moving Features sub-resources of a moving feature: - mux.HandleFunc("GET /collections/{cid}/items/{fid}/tgsequence", tgSequence) - mux.HandleFunc("GET /collections/{cid}/items/{fid}/tgsequence/{tgid}/{qtype}", tgSequenceQuery) - mux.HandleFunc("GET /collections/{cid}/items/{fid}/tproperties", listTProperties) - mux.HandleFunc("GET /collections/{cid}/items/{fid}/tproperties/{pname}", getTProperty) - // writes: replace / delete a feature, append a temporally-disjoint sub-trajectory - mux.HandleFunc("PUT /collections/{cid}/items/{fid}", putItem) - mux.HandleFunc("DELETE /collections/{cid}/items/{fid}", deleteItem) - mux.HandleFunc("POST /collections/{cid}/items/{fid}/tgsequence", postTgSequence) - // temporal properties are user-supplied, stored, time-varying attributes - mux.HandleFunc("POST /collections/{cid}/items/{fid}/tproperties", postTProperties) - mux.HandleFunc("POST /collections/{cid}/items/{fid}/tproperties/{pname}", postTPropertyValues) - mux.HandleFunc("DELETE /collections/{cid}/items/{fid}/tproperties/{pname}", deleteTProperty) - mux.HandleFunc("DELETE /collections/{cid}/items/{fid}/tproperties/{pname}/{tvid}", deleteTPropertyValue) - mux.HandleFunc("DELETE /collections/{cid}/items/{fid}/tgsequence/{tgid}", deleteTgSequence) - // MF Part 4 (Stream Extension): continuous queries on a temporal property, - // delivered over Server-Sent Events. - mux.HandleFunc("POST /collections/{cid}/items/{fid}/tproperties/{pname}/queries", postQuery) - mux.HandleFunc("GET /collections/{cid}/items/{fid}/tproperties/{pname}/queries", listQueries) - mux.HandleFunc("GET /collections/{cid}/items/{fid}/tproperties/{pname}/queries/{qid}", getQuery) - mux.HandleFunc("GET /collections/{cid}/items/{fid}/tproperties/{pname}/queries/{qid}/stream", streamQuery) - mux.HandleFunc("DELETE /collections/{cid}/items/{fid}/tproperties/{pname}/queries/{qid}", deleteQuery) - // live ingestion: a producer pushes records that live queries process in real time - mux.HandleFunc("POST /collections/{cid}/items/{fid}/tproperties/{pname}/ingest", ingestProperty) - // MF Part 4: a continuous query that streams the moving feature's position - // (the temporal geometry), the feed for an animated map. - mux.HandleFunc("POST /collections/{cid}/items/{fid}/tgsequence/queries", postGeometryQuery) - mux.HandleFunc("GET /collections/{cid}/items/{fid}/tgsequence/queries", listGeometryQueries) - mux.HandleFunc("GET /collections/{cid}/items/{fid}/tgsequence/queries/{qid}", getQuery) - mux.HandleFunc("GET /collections/{cid}/items/{fid}/tgsequence/queries/{qid}/stream", streamQuery) - mux.HandleFunc("DELETE /collections/{cid}/items/{fid}/tgsequence/queries/{qid}", deleteQuery) + for _, r := range routeTable() { + mux.HandleFunc(r.method+" "+r.path, r.handler) + } return mux } @@ -312,12 +376,7 @@ func landing(w http.ResponseWriter, r *http.Request) { // #coverageConformance classes of OGC API - Coverages its raster collections do. func conformance(w http.ResponseWriter, r *http.Request) { writeJSON(w, 200, map[string]any{"conformsTo": append([]string{ - "http://www.opengis.net/spec/ogcapi-movingfeatures-1/1.0/conf/common", - "http://www.opengis.net/spec/ogcapi-movingfeatures-1/1.0/conf/mf-collection", - "http://www.opengis.net/spec/ogcapi-movingfeatures-1/1.0/conf/movingfeatures", - "http://www.opengis.net/spec/ogcapi-movingfeatures-4/1.0/conf/cquery", - "http://www.opengis.net/spec/ogcapi-common-1/1.0/conf/core", - "http://www.opengis.net/spec/ogcapi-common-2/1.0/conf/collections", + confMFCommon, confMFCollection, confMovingFeatures, confCQuery, confCommonCore, confCommonCollections, }, append(coverageConformance, edrConformance)...)}) } func listCollections(w http.ResponseWriter, r *http.Request) { @@ -1471,9 +1530,12 @@ func apiDoc(w http.ResponseWriter, r *http.Request) { "openapi": "3.0.3", "info": map[string]any{"title": "MobilityAPI-go", "version": "1.0.0", "description": "OGC API – Moving Features over MobilityDB"}, "paths": map[string]any{ - "/": get("Landing page"), - "/api": get("API definition"), - "/conformance": get("Conformance declaration"), + "/health": get("Liveness: answers {\"status\":\"ok\"} while the service is up"), + "/collections/{cid}/trajectories": get("Every feature's trajectory for animated rendering, sampled to ~sample seconds (180 by default), in WGS84, as {trips, tmin, tmax}"), + "/collections/{cid}/timeseries": get("The fleet-wide average of the speed property, grouped by ship type, over step-second buckets"), + "/": get("Landing page"), + "/api": get("API definition"), + "/conformance": get("Conformance declaration"), "/collections": map[string]any{ "get": withParams(op("Moving feature collections"), limitParam), "post": op("Register a new collection"), @@ -1549,6 +1611,7 @@ func apiDoc(w http.ResponseWriter, r *http.Request) { for p, item := range edrPaths() { paths[p] = item } + markOperations(paths) w.Header().Set("Content-Type", "application/vnd.oai.openapi+json;version=3.0") w.WriteHeader(200) json.NewEncoder(w).Encode(doc) diff --git a/samples/api-definition.json b/samples/api-definition.json index ebb63ea..bdecef8 100644 --- a/samples/api-definition.json +++ b/samples/api-definition.json @@ -13,7 +13,8 @@ "description": "OK" } }, - "summary": "Landing page" + "summary": "Landing page", + "x-conformance-class": "http://www.opengis.net/spec/ogcapi-common-1/1.0/conf/core" } }, "/api": { @@ -23,7 +24,8 @@ "description": "OK" } }, - "summary": "API definition" + "summary": "API definition", + "x-conformance-class": "http://www.opengis.net/spec/ogcapi-common-1/1.0/conf/core" } }, "/collections": { @@ -49,7 +51,8 @@ "description": "OK" } }, - "summary": "Moving feature collections" + "summary": "Moving feature collections", + "x-conformance-class": "http://www.opengis.net/spec/ogcapi-movingfeatures-1/1.0/conf/mf-collection" }, "post": { "responses": { @@ -57,7 +60,8 @@ "description": "OK" } }, - "summary": "Register a new collection" + "summary": "Register a new collection", + "x-conformance-class": "http://www.opengis.net/spec/ogcapi-movingfeatures-1/1.0/conf/mf-collection" } }, "/collections/{cid}": { @@ -67,7 +71,8 @@ "description": "OK" } }, - "summary": "Delete a collection" + "summary": "Delete a collection", + "x-conformance-class": "http://www.opengis.net/spec/ogcapi-movingfeatures-1/1.0/conf/mf-collection" }, "get": { "responses": { @@ -75,7 +80,8 @@ "description": "OK" } }, - "summary": "Collection metadata" + "summary": "Collection metadata", + "x-conformance-class": "http://www.opengis.net/spec/ogcapi-movingfeatures-1/1.0/conf/mf-collection" }, "put": { "responses": { @@ -83,12 +89,14 @@ "description": "OK" } }, - "summary": "Replace collection metadata" + "summary": "Replace collection metadata", + "x-conformance-class": "http://www.opengis.net/spec/ogcapi-movingfeatures-1/1.0/conf/mf-collection" } }, "/collections/{cid}/area": { "get": { - "summary": "OGC API - EDR: the area query over a raster collection, coords a WKT POLYGON, answered in CoverageJSON" + "summary": "OGC API - EDR: the area query over a raster collection, coords a WKT POLYGON, answered in CoverageJSON", + "x-conformance-class": "http://www.opengis.net/spec/ogcapi-edr-1/1.1/conf/core" } }, "/collections/{cid}/bulk": { @@ -98,12 +106,14 @@ "description": "OK" } }, - "summary": "Bulk ingest (extension): a batch of (vehicleId, position, time) observations as GeoJSON Points or GeoParquet, optionally gzip/deflate/br/zstd-compressed; each is appended as one instant" + "summary": "Bulk ingest (extension): a batch of (vehicleId, position, time) observations as GeoJSON Points or GeoParquet, optionally gzip/deflate/br/zstd-compressed; each is appended as one instant", + "x-mobilityapi-extension": true } }, "/collections/{cid}/corridor": { "get": { - "summary": "OGC API - EDR: the corridor query over a raster collection, coords a WKT LINESTRING, answered in CoverageJSON" + "summary": "OGC API - EDR: the corridor query over a raster collection, coords a WKT LINESTRING, answered in CoverageJSON", + "x-conformance-class": "http://www.opengis.net/spec/ogcapi-edr-1/1.1/conf/core" } }, "/collections/{cid}/coverage": { @@ -113,7 +123,8 @@ "description": "OK" } }, - "summary": "OGC API - Coverages: the raster of one period of a raster collection, subset by bbox, datetime, subset and properties, as GeoTIFF or CoverageJSON" + "summary": "OGC API - Coverages: the raster of one period of a raster collection, subset by bbox, datetime, subset and properties, as GeoTIFF or CoverageJSON", + "x-conformance-class": "https://www.opengis.net/spec/ogcapi-coverages-1/1.0/conf/core" } }, "/collections/{cid}/export": { @@ -123,7 +134,8 @@ "description": "OK" } }, - "summary": "Bulk lakehouse export: NDJSON, or ?format=parquet (WKB + bbox/time sidecar)" + "summary": "Bulk lakehouse export: NDJSON, or ?format=parquet (WKB + bbox/time sidecar)", + "x-mobilityapi-extension": true } }, "/collections/{cid}/items": { @@ -188,7 +200,8 @@ "description": "OK" } }, - "summary": "Moving features (streamed, keyset-paged; bbox/datetime/subtrajectory filters)" + "summary": "Moving features (streamed, keyset-paged; bbox/datetime/subtrajectory filters)", + "x-conformance-class": "http://www.opengis.net/spec/ogcapi-movingfeatures-1/1.0/conf/movingfeatures" }, "post": { "responses": { @@ -196,7 +209,8 @@ "description": "OK" } }, - "summary": "Insert a moving feature" + "summary": "Insert a moving feature", + "x-conformance-class": "http://www.opengis.net/spec/ogcapi-movingfeatures-1/1.0/conf/movingfeatures" } }, "/collections/{cid}/items/{fid}": { @@ -206,7 +220,8 @@ "description": "OK" } }, - "summary": "Delete a moving feature" + "summary": "Delete a moving feature", + "x-conformance-class": "http://www.opengis.net/spec/ogcapi-movingfeatures-1/1.0/conf/movingfeatures" }, "get": { "responses": { @@ -214,7 +229,8 @@ "description": "OK" } }, - "summary": "A moving feature as a Feature" + "summary": "A moving feature as a Feature", + "x-conformance-class": "http://www.opengis.net/spec/ogcapi-movingfeatures-1/1.0/conf/movingfeatures" }, "put": { "responses": { @@ -222,7 +238,8 @@ "description": "OK" } }, - "summary": "Replace a moving feature" + "summary": "Replace a moving feature", + "x-mobilityapi-extension": true } }, "/collections/{cid}/items/{fid}/tgsequence": { @@ -302,7 +319,8 @@ "description": "OK" } }, - "summary": "Temporal geometry sequence (TemporalGeometrySequence; members addressable by their 1-based id)" + "summary": "Temporal geometry sequence (TemporalGeometrySequence; members addressable by their 1-based id)", + "x-conformance-class": "http://www.opengis.net/spec/ogcapi-movingfeatures-1/1.0/conf/movingfeatures" }, "post": { "responses": { @@ -310,7 +328,8 @@ "description": "OK" } }, - "summary": "Append a temporally-disjoint member sequence" + "summary": "Append a temporally-disjoint member sequence", + "x-conformance-class": "http://www.opengis.net/spec/ogcapi-movingfeatures-1/1.0/conf/movingfeatures" } }, "/collections/{cid}/items/{fid}/tgsequence/queries": { @@ -320,7 +339,8 @@ "description": "OK" } }, - "summary": "List the geometry (position) continuous queries of a feature" + "summary": "List the geometry (position) continuous queries of a feature", + "x-mobilityapi-extension": true }, "post": { "responses": { @@ -328,7 +348,8 @@ "description": "OK" } }, - "summary": "Register a geometry continuous query streaming the moving feature's position" + "summary": "Register a geometry continuous query streaming the moving feature's position", + "x-mobilityapi-extension": true } }, "/collections/{cid}/items/{fid}/tgsequence/queries/{qid}": { @@ -338,7 +359,8 @@ "description": "OK" } }, - "summary": "Stop a geometry continuous query" + "summary": "Stop a geometry continuous query", + "x-mobilityapi-extension": true }, "get": { "responses": { @@ -346,7 +368,8 @@ "description": "OK" } }, - "summary": "Geometry continuous-query status (the cquery link object)" + "summary": "Geometry continuous-query status (the cquery link object)", + "x-mobilityapi-extension": true } }, "/collections/{cid}/items/{fid}/tgsequence/queries/{qid}/stream": { @@ -356,7 +379,8 @@ "description": "OK" } }, - "summary": "Moving-feature positions as Server-Sent Events (see api/streaming-asyncapi.yaml)" + "summary": "Moving-feature positions as Server-Sent Events (see api/streaming-asyncapi.yaml)", + "x-mobilityapi-extension": true } }, "/collections/{cid}/items/{fid}/tgsequence/{tgid}": { @@ -366,7 +390,8 @@ "description": "OK" } }, - "summary": "Delete a temporal primitive geometry (member sequence) by id" + "summary": "Delete a temporal primitive geometry (member sequence) by id", + "x-conformance-class": "http://www.opengis.net/spec/ogcapi-movingfeatures-1/1.0/conf/movingfeatures" } }, "/collections/{cid}/items/{fid}/tgsequence/{tgid}/{qtype}": { @@ -376,7 +401,8 @@ "description": "OK" } }, - "summary": "Derived query on a member geometry: distance | velocity | raster (acceleration → 501, not derivable for this motion model); raster reads the rasters of the raster collection `collection` along it, from band `band` (1 by default), kept to the values in `valueRange=lo,hi` when given" + "summary": "Derived query on a member geometry: distance | velocity | raster (acceleration → 501, not derivable for this motion model); raster reads the rasters of the raster collection `collection` along it, from band `band` (1 by default), kept to the values in `valueRange=lo,hi` when given", + "x-conformance-class": "http://www.opengis.net/spec/ogcapi-movingfeatures-1/1.0/conf/movingfeatures" } }, "/collections/{cid}/items/{fid}/tproperties": { @@ -413,7 +439,8 @@ "description": "OK" } }, - "summary": "Stored temporal properties of a feature" + "summary": "Stored temporal properties of a feature", + "x-conformance-class": "http://www.opengis.net/spec/ogcapi-movingfeatures-1/1.0/conf/movingfeatures" }, "post": { "responses": { @@ -421,7 +448,8 @@ "description": "OK" } }, - "summary": "Add one or more temporal properties (TReal | TInteger | TText | TBoolean) to a feature" + "summary": "Add one or more temporal properties (TReal | TInteger | TText | TBoolean) to a feature", + "x-conformance-class": "http://www.opengis.net/spec/ogcapi-movingfeatures-1/1.0/conf/movingfeatures" } }, "/collections/{cid}/items/{fid}/tproperties/{pname}": { @@ -431,7 +459,8 @@ "description": "OK" } }, - "summary": "Delete a temporal property" + "summary": "Delete a temporal property", + "x-conformance-class": "http://www.opengis.net/spec/ogcapi-movingfeatures-1/1.0/conf/movingfeatures" }, "get": { "parameters": [ @@ -479,7 +508,8 @@ "description": "OK" } }, - "summary": "A stored temporal property as an OGC temporalProperty" + "summary": "A stored temporal property as an OGC temporalProperty", + "x-conformance-class": "http://www.opengis.net/spec/ogcapi-movingfeatures-1/1.0/conf/movingfeatures" }, "post": { "responses": { @@ -487,7 +517,8 @@ "description": "OK" } }, - "summary": "Append values to a temporal property (temporally disjoint; overlap → 409)" + "summary": "Append values to a temporal property (temporally disjoint; overlap → 409)", + "x-conformance-class": "http://www.opengis.net/spec/ogcapi-movingfeatures-1/1.0/conf/movingfeatures" } }, "/collections/{cid}/items/{fid}/tproperties/{pname}/ingest": { @@ -497,7 +528,8 @@ "description": "OK" } }, - "summary": "Push a live record ({datetime, value}) to the live queries on the property" + "summary": "Push a live record ({datetime, value}) to the live queries on the property", + "x-mobilityapi-extension": true } }, "/collections/{cid}/items/{fid}/tproperties/{pname}/queries": { @@ -507,7 +539,8 @@ "description": "OK" } }, - "summary": "List the continuous queries on a temporal property" + "summary": "List the continuous queries on a temporal property", + "x-conformance-class": "http://www.opengis.net/spec/ogcapi-movingfeatures-4/1.0/conf/cquery" }, "post": { "responses": { @@ -515,7 +548,8 @@ "description": "OK" } }, - "summary": "Register a continuous query (MF Part 4): a lifted transform (operation), or a windowed aggregation (aggregation + window: COUNT | TUMBLING | HOPPING). Set live:true to source from pushed records" + "summary": "Register a continuous query (MF Part 4): a lifted transform (operation), or a windowed aggregation (aggregation + window: COUNT | TUMBLING | HOPPING). Set live:true to source from pushed records", + "x-conformance-class": "http://www.opengis.net/spec/ogcapi-movingfeatures-4/1.0/conf/cquery" } }, "/collections/{cid}/items/{fid}/tproperties/{pname}/queries/{qid}": { @@ -525,7 +559,8 @@ "description": "OK" } }, - "summary": "Stop a continuous query" + "summary": "Stop a continuous query", + "x-conformance-class": "http://www.opengis.net/spec/ogcapi-movingfeatures-4/1.0/conf/cquery" }, "get": { "responses": { @@ -533,7 +568,8 @@ "description": "OK" } }, - "summary": "Continuous-query status (the cquery link object)" + "summary": "Continuous-query status (the cquery link object)", + "x-conformance-class": "http://www.opengis.net/spec/ogcapi-movingfeatures-4/1.0/conf/cquery" } }, "/collections/{cid}/items/{fid}/tproperties/{pname}/queries/{qid}/stream": { @@ -543,7 +579,8 @@ "description": "OK" } }, - "summary": "Continuous-query results as Server-Sent Events (see api/streaming-asyncapi.yaml)" + "summary": "Continuous-query results as Server-Sent Events (see api/streaming-asyncapi.yaml)", + "x-conformance-class": "http://www.opengis.net/spec/ogcapi-movingfeatures-4/1.0/conf/cquery" } }, "/collections/{cid}/items/{fid}/tproperties/{pname}/{tvid}": { @@ -553,12 +590,14 @@ "description": "OK" } }, - "summary": "Delete a temporal primitive value (member value sequence) by its 1-based id" + "summary": "Delete a temporal primitive value (member value sequence) by its 1-based id", + "x-conformance-class": "http://www.opengis.net/spec/ogcapi-movingfeatures-1/1.0/conf/movingfeatures" } }, "/collections/{cid}/position": { "get": { - "summary": "OGC API - EDR: the position query over a raster collection, coords a WKT POINT, answered in CoverageJSON" + "summary": "OGC API - EDR: the position query over a raster collection, coords a WKT POINT, answered in CoverageJSON", + "x-conformance-class": "http://www.opengis.net/spec/ogcapi-edr-1/1.1/conf/core" } }, "/collections/{cid}/schema": { @@ -568,12 +607,36 @@ "description": "OK" } }, - "summary": "OGC API - Coverages: the fields of a raster collection, one per band" + "summary": "OGC API - Coverages: the fields of a raster collection, one per band", + "x-conformance-class": "https://www.opengis.net/spec/ogcapi-coverages-1/1.0/conf/core" + } + }, + "/collections/{cid}/timeseries": { + "get": { + "responses": { + "200": { + "description": "OK" + } + }, + "summary": "The fleet-wide average of the speed property, grouped by ship type, over step-second buckets", + "x-mobilityapi-extension": true + } + }, + "/collections/{cid}/trajectories": { + "get": { + "responses": { + "200": { + "description": "OK" + } + }, + "summary": "Every feature's trajectory for animated rendering, sampled to ~sample seconds (180 by default), in WGS84, as {trips, tmin, tmax}", + "x-mobilityapi-extension": true } }, "/collections/{cid}/trajectory": { "get": { - "summary": "OGC API - EDR: the trajectory query over a raster collection, coords a WKT LINESTRING, answered in CoverageJSON" + "summary": "OGC API - EDR: the trajectory query over a raster collection, coords a WKT LINESTRING, answered in CoverageJSON", + "x-conformance-class": "http://www.opengis.net/spec/ogcapi-edr-1/1.1/conf/core" } }, "/conformance": { @@ -583,7 +646,19 @@ "description": "OK" } }, - "summary": "Conformance declaration" + "summary": "Conformance declaration", + "x-conformance-class": "http://www.opengis.net/spec/ogcapi-common-1/1.0/conf/core" + } + }, + "/health": { + "get": { + "responses": { + "200": { + "description": "OK" + } + }, + "summary": "Liveness: answers {\"status\":\"ok\"} while the service is up", + "x-mobilityapi-extension": true } } }