{ "components": { "schemas": { "Catalog": { "properties": { "fonts": { "additionalProperties": { "description": "Font metadata including family, style, glyph count, and Unicode range.", "properties": { "end": { "description": "Last Unicode codepoint available.", "minimum": 0, "type": "integer" }, "family": { "description": "Font family name (e.g., \"Arial\").", "type": "string" }, "format": { "oneOf": [ { "type": "null" }, { "$ref": "#/components/schemas/FontFormat", "description": "Source font file container format." } ] }, "glyphs": { "description": "Total number of glyphs in this font.", "format": "int32", "minimum": 0, "type": "integer" }, "last_modified_at": { "description": "Timestamp of the source font file's last modification.", "format": "date-time", "type": ["string", "null"] }, "start": { "description": "First Unicode codepoint available.", "minimum": 0, "type": "integer" }, "style": { "description": "Font style (e.g., \"Bold\", \"Italic\").\n\nNone for regular style.", "type": ["string", "null"] } }, "required": ["family", "glyphs", "start", "end"], "type": "object" }, "propertyNames": { "type": "string" }, "type": "object" }, "settings": { "description": "Server-wide capability flags", "properties": { "rendering": { "description": "Whether server-side style rendering endpoints are enabled.", "type": "boolean" } }, "required": ["rendering"], "type": "object" }, "sprites": { "additionalProperties": { "description": "Sprite source metadata.", "properties": { "images": { "description": "Available sprite image names.", "items": { "type": "string" }, "type": "array" }, "last_modified_at": { "description": "Timestamp of the spritesheet's last modification.", "format": "date-time", "type": ["string", "null"] }, "size_in_bytes": { "description": "Total size of the spritesheet in bytes.", "format": "int64", "minimum": 1, "type": "integer" } }, "required": ["images"], "type": "object" }, "propertyNames": { "type": "string" }, "type": "object" }, "styles": { "additionalProperties": { "description": "Style metadata.", "properties": { "colors": { "description": "Distinct colors referenced by the style, for preview swatches.", "items": { "type": "string" }, "type": ["array", "null"] }, "last_modified_at": { "description": "Timestamp of the style file's last modification.", "format": "date-time", "type": ["string", "null"] }, "layer_count": { "description": "Number of layers declared in the style JSON.", "format": "int32", "minimum": 0, "type": ["integer", "null"] }, "path": { "description": "Path to the style JSON file.", "type": "string" }, "type": { "oneOf": [ { "type": "null" }, { "$ref": "#/components/schemas/StyleKind", "description": "What kind of layers the style draws." } ] }, "version_hash": { "description": "Hash identifying the current style revision.", "type": ["string", "null"] } }, "required": ["path"], "type": "object" }, "propertyNames": { "type": "string" }, "type": "object" }, "tiles": { "additionalProperties": { "description": "Metadata for a tile source in the catalog.\n\nContains information needed to properly serve tiles from a source,\nincluding HTTP headers and human-readable metadata.", "properties": { "attribution": { "description": "Attribution text for the data source", "type": ["string", "null"] }, "content_encoding": { "description": "Optional content encoding (e.g., \"gzip\", \"deflate\")", "type": ["string", "null"] }, "content_type": { "description": "MIME type for the tile data (e.g., \"application/x-protobuf\", \"image/png\")", "type": "string" }, "description": { "description": "Description of the tile source content", "type": ["string", "null"] }, "last_modified_at": { "description": "Timestamp of the underlying source's last modification.", "format": "date-time", "type": ["string", "null"] }, "layer_count": { "description": "Number of vector layers declared by this source.", "format": "int32", "minimum": 0, "type": ["integer", "null"] }, "name": { "description": "Human-readable name for the tile source", "type": ["string", "null"] } }, "required": ["content_type"], "type": "object" }, "propertyNames": { "type": "string" }, "type": "object" } }, "required": ["tiles", "sprites", "fonts", "styles", "settings"], "type": "object" }, "FeatureCollectionTag": { "description": "`\"FeatureCollection\"` discriminator for the top-level body. A unit enum so\nany other `type` (a bare `Feature`, `Geometry`, or garbage) fails to\ndeserialize with a clear serde error.", "enum": ["FeatureCollection"], "type": "string" }, "FeatureTag": { "description": "`\"Feature\"` discriminator for each member of the collection.", "enum": ["Feature"], "type": "string" }, "FontFormat": { "description": "Source font file container format.\n\nThe string serialization (serde and `strum`) is the lowercase file\nextension, so [`FontFormat::VARIANTS`] doubles as the list of recognised\nfont extensions and [`str::parse`] maps an extension back to a variant.", "enum": ["otf", "ttf", "ttc"], "type": "string" }, "StaticOverlayFeature": { "description": "Wire shape of one `GeoJSON` `Feature`. A `null`/missing geometry is kept as\n`None` and skipped at apply time.", "properties": { "geometry": { "description": "`GeoJSON` geometry. `Point`/`MultiPoint` -> circle layer;\n`LineString`/`MultiLineString` -> line layer;\n`Polygon`/`MultiPolygon` -> fill (and optionally outline-line) layer.\n`GeometryCollection` and `null` are silently skipped." }, "properties": { "oneOf": [ { "type": "null" }, { "$ref": "#/components/schemas/StaticOverlayProperties", "description": "Styling for this feature. All fields optional; unknown fields ignored." } ] }, "type": { "$ref": "#/components/schemas/FeatureTag", "description": "`GeoJSON` type discriminator. Must be `\"Feature\"`." } }, "required": ["type"], "type": "object" }, "StaticOverlayProperties": { "description": "Wire shape of a feature's `properties`, keyed by canonical `MapLibre`\npaint/layout names. Colors arrive as strings and are parsed in [`TryFrom`];\nenums and numbers are validated by serde. Unknown keys (`id`, `name`,\n`title`, …) are ignored.", "properties": { "circle-color": { "description": "CSS color for `Point` geometries.", "example": "#285DAA", "type": ["string", "null"] }, "circle-opacity": { "format": "float", "type": ["number", "null"] }, "circle-radius": { "description": "Radius in pixels at the rendered scale.", "example": 8.0, "format": "float", "type": ["number", "null"] }, "circle-stroke-color": { "type": ["string", "null"] }, "circle-stroke-opacity": { "format": "float", "type": ["number", "null"] }, "circle-stroke-width": { "format": "float", "type": ["number", "null"] }, "fill-color": { "description": "CSS color for `Polygon` fills.", "example": "#95BEFA", "type": ["string", "null"] }, "fill-opacity": { "format": "float", "type": ["number", "null"] }, "fill-outline-color": { "type": ["string", "null"] }, "line-cap": { "description": "One of `butt`, `round`, `square`.", "example": "round", "type": ["string", "null"] }, "line-color": { "description": "CSS color for `LineString` geometries (and `Polygon` outlines).", "example": "#285DAA", "type": ["string", "null"] }, "line-join": { "description": "One of `miter`, `bevel`, `round`.", "example": "round", "type": ["string", "null"] }, "line-opacity": { "format": "float", "type": ["number", "null"] }, "line-width": { "description": "Line width in pixels at the rendered scale.", "example": 2.0, "format": "float", "type": ["number", "null"] } }, "type": "object" }, "StaticStyleOverlay": { "description": "Wire shape of the top-level body: a `GeoJSON` `FeatureCollection`. Doubles as\nthe `OpenAPI` request-body schema.", "properties": { "features": { "description": "Features to overlay on the rendered base map, in draw order.", "items": { "$ref": "#/components/schemas/StaticOverlayFeature" }, "type": "array" }, "type": { "$ref": "#/components/schemas/FeatureCollectionTag", "description": "`GeoJSON` type discriminator. Must be `\"FeatureCollection\"`." } }, "required": ["type", "features"], "type": "object" }, "StyleKind": { "description": "What kind of layers a `MapLibre` style draws.", "enum": ["vector", "raster", "hybrid"], "type": "string" } } }, "info": { "contact": { "email": "to.stepan.kuzmin@gmail.com", "name": "Stepan Kuzmin" }, "description": "Blazing-fast tile server with PostGIS, MBTiles, and PMTiles support.", "license": { "name": "MIT OR Apache-2.0" }, "title": "Martin", "version": "1.13.0" }, "openapi": "3.1.0", "paths": { "/{source_ids}": { "get": { "operationId": "get_source_info", "parameters": [ { "in": "path", "name": "source_ids", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "content": { "application/json": {} }, "description": "TileJSON 3.0.0 metadata for the requested source(s)" }, "404": { "description": "No matching source" } }, "tags": ["crate::srv"] } }, "/{source_ids}/{z}/{x}/{y}": { "get": { "operationId": "get_tile", "parameters": [ { "in": "path", "name": "source_ids", "required": true, "schema": { "type": "string" } }, { "in": "path", "name": "z", "required": true, "schema": { "format": "int32", "minimum": 0, "type": "integer" } }, { "in": "path", "name": "x", "required": true, "schema": { "format": "int32", "minimum": 0, "type": "integer" } }, { "in": "path", "name": "y", "required": true, "schema": { "format": "int32", "minimum": 0, "type": "integer" } } ], "responses": { "200": { "description": "Encoded vector or raster tile" }, "204": { "description": "Source(s) returned an empty tile" }, "304": { "description": "ETag matched If-None-Match" }, "404": { "description": "No matching source" }, "406": { "description": "No supported tile format in Accept header" } }, "tags": ["crate::srv"] } }, "/catalog": { "get": { "operationId": "get_catalog", "responses": { "200": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Catalog" } } }, "description": "Catalog of all configured sources" } }, "tags": ["crate::srv"] } }, "/font/{fontstack}/{start}-{end}": { "get": { "operationId": "get_font", "parameters": [ { "in": "path", "name": "fontstack", "required": true, "schema": { "type": "string" } }, { "in": "path", "name": "start", "required": true, "schema": { "format": "int32", "minimum": 0, "type": "integer" } }, { "in": "path", "name": "end", "required": true, "schema": { "format": "int32", "minimum": 0, "type": "integer" } } ], "responses": { "200": { "content": { "application/x-protobuf": {} }, "description": "Glyph PBF range" }, "400": { "description": "Invalid glyph range" }, "404": { "description": "No matching font" } }, "tags": ["crate::srv"] } }, "/health": { "get": { "operationId": "get_health", "responses": { "200": { "content": { "text/plain": { "schema": { "type": "string" } } }, "description": "Service healthy" } }, "summary": "Return 200 OK if healthy. Used for readiness and liveness probes.", "tags": ["crate::srv"] } }, "/sdf_sprite/{source_ids}.json": { "get": { "operationId": "get_sprite_sdf_json", "parameters": [ { "in": "path", "name": "source_ids", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "content": { "application/json": {} }, "description": "SDF sprite index JSON" }, "404": { "description": "No matching sprite source" } }, "tags": ["crate::srv"] } }, "/sdf_sprite/{source_ids}.png": { "get": { "operationId": "get_sprite_sdf_png", "parameters": [ { "in": "path", "name": "source_ids", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "content": { "image/png": {} }, "description": "Combined signed-distance-field sprite image" }, "404": { "description": "No matching sprite source" } }, "tags": ["crate::srv"] } }, "/sprite/{source_ids}.json": { "get": { "operationId": "get_sprite_json", "parameters": [ { "in": "path", "name": "source_ids", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "content": { "application/json": {} }, "description": "Sprite index JSON" }, "404": { "description": "No matching sprite source" } }, "tags": ["crate::srv"] } }, "/sprite/{source_ids}.png": { "get": { "operationId": "get_sprite_png", "parameters": [ { "in": "path", "name": "source_ids", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "content": { "image/png": {} }, "description": "Combined sprite image" }, "404": { "description": "No matching sprite source" } }, "tags": ["crate::srv"] } }, "/style/{style_id}": { "get": { "operationId": "get_style_json", "parameters": [ { "in": "path", "name": "style_id", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "content": { "application/json": {} }, "description": "MapLibre Style Spec JSON document" }, "400": { "description": "Style file is malformed" }, "404": { "description": "No matching style" } }, "tags": ["crate::srv"] } }, "/style/{style_id}/{z}/{x}/{y}.{format}": { "get": { "operationId": "get_rendered_tile_style", "parameters": [ { "in": "path", "name": "style_id", "required": true, "schema": { "type": "string" } }, { "in": "path", "name": "z", "required": true, "schema": { "format": "int32", "minimum": 0, "type": "integer" } }, { "in": "path", "name": "x", "required": true, "schema": { "format": "int32", "minimum": 0, "type": "integer" } }, { "in": "path", "name": "y", "required": true, "schema": { "format": "int32", "minimum": 0, "type": "integer" } }, { "in": "path", "name": "format", "required": true, "schema": { "description": "Image format requested in the URL.", "enum": ["png", "jpg", "webp"], "type": "string" } } ], "responses": { "200": { "description": "Server-side rendered style tile (PNG/JPEG/WebP)" }, "400": { "description": "Invalid tile coordinates" }, "403": { "description": "Rendering is disabled" }, "404": { "description": "No matching style" }, "500": { "description": "Renderer or encoder failure" } }, "tags": ["crate::srv"] } }, "/style/{style_id}/static/{camera}/{size}.{format}": { "get": { "operationId": "get_rendered_static_style", "parameters": [ { "in": "path", "name": "style_id", "required": true, "schema": { "type": "string" } }, { "description": "`lon,lat,zoom[@bearing[,pitch]]` or `minLon,minLat,maxLon,maxLat`.", "in": "path", "name": "camera", "required": true, "schema": { "type": "string" } }, { "description": "`WIDTHxHEIGHT[@SCALEx]` - e.g. `800x600` or `400x300@2x`.", "in": "path", "name": "size", "required": true, "schema": { "type": "string" } }, { "description": "Output encoding. `png`, `jpg`, or `webp` (canonical names only;\n`.jpeg` is redirected to `.jpg` via [`redirect_static_jpeg`]).", "in": "path", "name": "format", "required": true, "schema": { "description": "Image format requested in the URL.", "enum": ["png", "jpg", "webp"], "type": "string" } } ], "responses": { "200": { "content": { "image/jpeg": {}, "image/png": {}, "image/webp": {} }, "description": "Rendered static map image" }, "400": { "description": "Invalid params or size" }, "403": { "description": "Rendering is disabled" }, "404": { "description": "No matching style" }, "500": { "description": "Renderer or encoder failure" } }, "summary": "Render a static map image at an arbitrary camera into `{size}.{format}`.", "tags": ["crate::srv"] }, "post": { "description": "An empty or missing body renders the base map alone.", "operationId": "post_rendered_static_style", "parameters": [ { "in": "path", "name": "style_id", "required": true, "schema": { "type": "string" } }, { "description": "`lon,lat,zoom[@bearing[,pitch]]` or `minLon,minLat,maxLon,maxLat`.", "in": "path", "name": "camera", "required": true, "schema": { "type": "string" } }, { "description": "`WIDTHxHEIGHT[@SCALEx]` - e.g. `800x600` or `400x300@2x`.", "in": "path", "name": "size", "required": true, "schema": { "type": "string" } }, { "description": "Output encoding. `png`, `jpg`, or `webp` (canonical names only;\n`.jpeg` is redirected to `.jpg` via [`redirect_static_jpeg`]).", "in": "path", "name": "format", "required": true, "schema": { "description": "Image format requested in the URL.", "enum": ["png", "jpg", "webp"], "type": "string" } } ], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/StaticStyleOverlay" } } }, "description": "GeoJSON FeatureCollection. Each feature's `properties` carries MapLibre canonical paint/layout property names (`circle-color`, `line-width`, `fill-color`, …). Unknown property keys are ignored.", "required": true }, "responses": { "200": { "content": { "image/jpeg": {}, "image/png": {}, "image/webp": {} }, "description": "Rendered static map image" }, "400": { "description": "Invalid params, size, or overlay body" }, "403": { "description": "Rendering is disabled" }, "404": { "description": "No matching style" }, "500": { "description": "Renderer or encoder failure" } }, "summary": "Render a static map image with optional vector overlays.\nSee [our documentation](https://maplibre.org/martin/sources-styles/) for\nthe supported overlay body -- a `GeoJSON` `FeatureCollection` with style\nproperties on each feature.", "tags": ["crate::srv"] } } } }