diff --git a/docs/index.md b/docs/index.md index 3bb4035..29201ce 100644 --- a/docs/index.md +++ b/docs/index.md @@ -20,6 +20,10 @@ $ pip install fastgeoapi Please see the [Command-line Reference](usage.md) for details. +## CLI interface + +This section provides documentation for our command line tools. + ## Contributing Contributions are very welcome. To learn more, see the [Contributor diff --git a/docs/pygeoapi-openapi.json b/docs/pygeoapi-openapi.json index 6c3aae4..2eb1ec8 100644 --- a/docs/pygeoapi-openapi.json +++ b/docs/pygeoapi-openapi.json @@ -14,11 +14,7 @@ "url": "https://creativecommons.org/licenses/by/4.0/" }, "version": "0.16.dev0", - "x-keywords": [ - "geospatial", - "data", - "api" - ] + "x-keywords": ["geospatial", "data", "api"] }, "servers": [ { @@ -29,9 +25,7 @@ "paths": { "/": { "get": { - "tags": [ - "server" - ], + "tags": ["server"], "summary": "Landing page", "description": "Landing page", "operationId": "getLandingPage", @@ -68,9 +62,7 @@ }, "/openapi": { "get": { - "tags": [ - "server" - ], + "tags": ["server"], "summary": "This document", "description": "This document", "operationId": "getOpenapi", @@ -88,10 +80,7 @@ "style": "form", "explode": false, "schema": { - "enum": [ - "swagger", - "redoc" - ], + "enum": ["swagger", "redoc"], "type": "string", "default": "swagger" }, @@ -126,9 +115,7 @@ }, "/conformance": { "get": { - "tags": [ - "server" - ], + "tags": ["server"], "summary": "API conformance definition", "description": "API conformance definition", "operationId": "getConformanceDeclaration", @@ -165,9 +152,7 @@ }, "/collections": { "get": { - "tags": [ - "server" - ], + "tags": ["server"], "summary": "Collections", "description": "Collections", "operationId": "getCollections", @@ -204,9 +189,7 @@ }, "/collections/obs": { "get": { - "tags": [ - "obs" - ], + "tags": ["obs"], "summary": "Get Observations metadata", "description": "My cool observations", "operationId": "describeObsCollection", @@ -246,9 +229,7 @@ }, "/collections/obs/items": { "get": { - "tags": [ - "obs" - ], + "tags": ["obs"], "summary": "Get Observations items", "description": "My cool observations", "operationId": "getObsFeatures", @@ -260,12 +241,7 @@ "style": "form", "explode": false, "schema": { - "enum": [ - "json", - "html", - "jsonld", - "csv" - ], + "enum": ["json", "html", "jsonld", "csv"], "type": "string", "default": "json" }, @@ -280,10 +256,7 @@ "deprecated": false, "explode": false, "schema": { - "enum": [ - "en-US", - "fr-CA" - ], + "enum": ["en-US", "fr-CA"], "type": "string", "default": "en-US" }, @@ -313,12 +286,7 @@ "schema": { "type": "array", "items": { - "enum": [ - "id", - "stn_id", - "datetime", - "value" - ], + "enum": ["id", "stn_id", "datetime", "value"], "type": "string" } }, @@ -418,9 +386,7 @@ ] }, "options": { - "tags": [ - "obs" - ], + "tags": ["obs"], "summary": "Options for Observations items", "description": "My cool observations", "operationId": "optionsObsFeatures", @@ -446,9 +412,7 @@ }, "/collections/obs/schema": { "get": { - "tags": [ - "obs" - ], + "tags": ["obs"], "summary": "Get Observations schema", "description": "My cool observations", "operationId": "getObsQueryables", @@ -460,12 +424,7 @@ "style": "form", "explode": false, "schema": { - "enum": [ - "json", - "html", - "jsonld", - "csv" - ], + "enum": ["json", "html", "jsonld", "csv"], "type": "string", "default": "json" }, @@ -480,10 +439,7 @@ "deprecated": false, "explode": false, "schema": { - "enum": [ - "en-US", - "fr-CA" - ], + "enum": ["en-US", "fr-CA"], "type": "string", "default": "en-US" }, @@ -521,9 +477,7 @@ }, "/collections/obs/queryables": { "get": { - "tags": [ - "obs" - ], + "tags": ["obs"], "summary": "Get Observations queryables", "description": "My cool observations", "operationId": "getObsQueryables", @@ -535,12 +489,7 @@ "style": "form", "explode": false, "schema": { - "enum": [ - "json", - "html", - "jsonld", - "csv" - ], + "enum": ["json", "html", "jsonld", "csv"], "type": "string", "default": "json" }, @@ -555,10 +504,7 @@ "deprecated": false, "explode": false, "schema": { - "enum": [ - "en-US", - "fr-CA" - ], + "enum": ["en-US", "fr-CA"], "type": "string", "default": "en-US" }, @@ -596,9 +542,7 @@ }, "/collections/obs/items/{featureId}": { "get": { - "tags": [ - "obs" - ], + "tags": ["obs"], "summary": "Get Observations item by id", "description": "My cool observations", "operationId": "getObsFeature", @@ -642,9 +586,7 @@ ] }, "options": { - "tags": [ - "obs" - ], + "tags": ["obs"], "summary": "Options for Observations item by id", "description": "My cool observations", "operationId": "optionsObsFeature", @@ -675,9 +617,7 @@ }, "/collections/lakes": { "get": { - "tags": [ - "lakes" - ], + "tags": ["lakes"], "summary": "Get Large Lakes metadata", "description": "lakes of the world, public domain", "operationId": "describeLakesCollection", @@ -717,9 +657,7 @@ }, "/collections/lakes/items": { "get": { - "tags": [ - "lakes" - ], + "tags": ["lakes"], "summary": "Get Large Lakes items", "description": "lakes of the world, public domain", "operationId": "getLakesFeatures", @@ -731,12 +669,7 @@ "style": "form", "explode": false, "schema": { - "enum": [ - "json", - "html", - "jsonld", - "csv" - ], + "enum": ["json", "html", "jsonld", "csv"], "type": "string", "default": "json" }, @@ -751,10 +684,7 @@ "deprecated": false, "explode": false, "schema": { - "enum": [ - "en-US", - "fr-CA" - ], + "enum": ["en-US", "fr-CA"], "type": "string", "default": "en-US" }, @@ -917,9 +847,7 @@ ] }, "options": { - "tags": [ - "lakes" - ], + "tags": ["lakes"], "summary": "Options for Large Lakes items", "description": "lakes of the world, public domain", "operationId": "optionsLakesFeatures", @@ -945,9 +873,7 @@ }, "/collections/lakes/schema": { "get": { - "tags": [ - "lakes" - ], + "tags": ["lakes"], "summary": "Get Large Lakes schema", "description": "lakes of the world, public domain", "operationId": "getLakesQueryables", @@ -959,12 +885,7 @@ "style": "form", "explode": false, "schema": { - "enum": [ - "json", - "html", - "jsonld", - "csv" - ], + "enum": ["json", "html", "jsonld", "csv"], "type": "string", "default": "json" }, @@ -979,10 +900,7 @@ "deprecated": false, "explode": false, "schema": { - "enum": [ - "en-US", - "fr-CA" - ], + "enum": ["en-US", "fr-CA"], "type": "string", "default": "en-US" }, @@ -1020,9 +938,7 @@ }, "/collections/lakes/queryables": { "get": { - "tags": [ - "lakes" - ], + "tags": ["lakes"], "summary": "Get Large Lakes queryables", "description": "lakes of the world, public domain", "operationId": "getLakesQueryables", @@ -1034,12 +950,7 @@ "style": "form", "explode": false, "schema": { - "enum": [ - "json", - "html", - "jsonld", - "csv" - ], + "enum": ["json", "html", "jsonld", "csv"], "type": "string", "default": "json" }, @@ -1054,10 +965,7 @@ "deprecated": false, "explode": false, "schema": { - "enum": [ - "en-US", - "fr-CA" - ], + "enum": ["en-US", "fr-CA"], "type": "string", "default": "en-US" }, @@ -1095,9 +1003,7 @@ }, "/collections/lakes/items/{featureId}": { "get": { - "tags": [ - "lakes" - ], + "tags": ["lakes"], "summary": "Get Large Lakes item by id", "description": "lakes of the world, public domain", "operationId": "getLakesFeature", @@ -1141,9 +1047,7 @@ ] }, "options": { - "tags": [ - "lakes" - ], + "tags": ["lakes"], "summary": "Options for Large Lakes item by id", "description": "lakes of the world, public domain", "operationId": "optionsLakesFeature", @@ -1174,9 +1078,7 @@ }, "/processes": { "get": { - "tags": [ - "server" - ], + "tags": ["server"], "summary": "Processes", "description": "Processes", "operationId": "getProcesses", @@ -1207,9 +1109,7 @@ }, "/processes/hello-world": { "get": { - "tags": [ - "hello-world" - ], + "tags": ["hello-world"], "summary": "Get process metadata", "description": "An example process that takes a name as input, and echoes it back as output. Intended to demonstrate a simple process with a single literal input.", "operationId": "describeHello-worldProcess", @@ -1240,9 +1140,7 @@ }, "/processes/hello-world/execution": { "post": { - "tags": [ - "hello-world" - ], + "tags": ["hello-world"], "summary": "Process Hello World execution", "description": "An example process that takes a name as input, and echoes it back as output. Intended to demonstrate a simple process with a single literal input.", "operationId": "executeHello-worldJob", @@ -1294,9 +1192,7 @@ }, "/jobs": { "get": { - "tags": [ - "jobs" - ], + "tags": ["jobs"], "summary": "Retrieve jobs list", "description": "Retrieve a list of jobs", "operationId": "getJobs", @@ -1325,9 +1221,7 @@ }, "/jobs/{jobId}": { "get": { - "tags": [ - "jobs" - ], + "tags": ["jobs"], "summary": "Retrieve job details", "description": "Retrieve job details", "operationId": "getJob", @@ -1372,9 +1266,7 @@ ] }, "delete": { - "tags": [ - "jobs" - ], + "tags": ["jobs"], "summary": "Cancel / delete job", "description": "Cancel / delete job", "operationId": "deleteJob", @@ -1418,9 +1310,7 @@ }, "/jobs/{jobId}/results": { "get": { - "tags": [ - "jobs" - ], + "tags": ["jobs"], "summary": "Retrieve job results", "description": "Retrive job resiults", "operationId": "getJobResults", @@ -1469,10 +1359,7 @@ "components": { "schemas": { "queryable": { - "required": [ - "queryable", - "type" - ], + "required": ["queryable", "type"], "type": "object", "properties": { "queryable": { @@ -1490,9 +1377,7 @@ "language": { "type": "string", "description": "the language used for the title and description", - "default": [ - "en" - ] + "default": ["en"] }, "type": { "type": "string", @@ -1506,9 +1391,7 @@ } }, "queryables": { - "required": [ - "queryables" - ], + "required": ["queryables"], "type": "object", "properties": { "queryables": { @@ -1556,11 +1439,7 @@ "style": "form", "explode": false, "schema": { - "enum": [ - "json", - "html", - "jsonld" - ], + "enum": ["json", "html", "jsonld"], "type": "string", "default": "json" }, @@ -1575,10 +1454,7 @@ "deprecated": false, "explode": false, "schema": { - "enum": [ - "en-US", - "fr-CA" - ], + "enum": ["en-US", "fr-CA"], "type": "string", "default": "en-US" }, @@ -1767,4 +1643,4 @@ "description": "An example process that takes a name as input, and echoes it back as output. Intended to demonstrate a simple process with a single literal input." } ] -} \ No newline at end of file +} diff --git a/mkdocs.yml b/mkdocs.yml index 3675a3c..eeaddfc 100644 --- a/mkdocs.yml +++ b/mkdocs.yml @@ -74,6 +74,7 @@ markdown_extensions: - pymdownx.mark - attr_list - pymdownx.emoji + - mkdocs-typer copyright: | © Copyright 2024 Geobeyond team. diff --git a/noxfile.py b/noxfile.py index 1ca17d4..5719286 100644 --- a/noxfile.py +++ b/noxfile.py @@ -213,6 +213,8 @@ def docs_build(session: NoxPoetrySession) -> None: "mkdocs-material", "mkdocs-material-extras", "mkdocs-material-extensions", + "mkdocs-swagger-ui-tag", + "mkdocs-typer", "termynal", ) @@ -233,6 +235,8 @@ def docs(session: NoxPoetrySession) -> None: "mkdocs-material", "mkdocs-material-extras", "mkdocs-material-extensions", + "mkdocs-swagger-ui-tag", + "mkdocs-typer", "termynal", ) diff --git a/poetry.lock b/poetry.lock index 442b6bc..9ad0062 100644 --- a/poetry.lock +++ b/poetry.lock @@ -1895,6 +1895,21 @@ files = [ [package.dependencies] beautifulsoup4 = ">=4.11.1" +[[package]] +name = "mkdocs-typer" +version = "0.0.3" +description = "An MkDocs extension to generate documentation for Typer command line applications" +optional = false +python-versions = ">=3.7" +files = [ + {file = "mkdocs_typer-0.0.3-py3-none-any.whl", hash = "sha256:b2a9a44da590a7100114fde4de9123fedfea692d229379984db20ee3b3f12d7c"}, + {file = "mkdocs_typer-0.0.3.tar.gz", hash = "sha256:4dd37f024190a82aaf0f6c984faafb15167d34eab7e29a6a85e61362423a4eb7"}, +] + +[package.dependencies] +markdown = "==3.*" +typer = "==0.*" + [[package]] name = "multidict" version = "6.0.5" @@ -4644,4 +4659,4 @@ testing = ["big-O", "jaraco.functools", "jaraco.itertools", "more-itertools", "p [metadata] lock-version = "2.0" python-versions = ">=3.9,<4.0" -content-hash = "808519f69d6bd0f74d07262c10c5efa95b91a53d5e4184aef559c20dc4128458" +content-hash = "79ce145ae5aff2645da0d4b65f732237aee729b57294f14fb9df5da1a76d7aa5" diff --git a/pyproject.toml b/pyproject.toml index cec91b9..5169c23 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -75,6 +75,7 @@ commitizen = "^3.6.0" fencer = { git = "https://github.com/francbartoli/fencer.git", branch = "feature/support-remote-schema" } openapi-resolver = "^0.0.6" schemathesis = "^3.25.6" +mkdocs-typer = "^0.0.3" [tool.coverage.paths] source = [".", "*/site-packages"]