Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 7 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ dependencies = [
"pystapi-validator",
"stapi-pydantic",
"stapi-fastapi",
"pystapi-schema-generator",
]

[dependency-groups]
Expand All @@ -19,6 +20,8 @@ dev = [
"pre-commit>=4.2.0",
"pre-commit-hooks>=5.0.0",
"pygithub>=2.6.1",
"pyyaml>=6.0",
"types-pyyaml>=6.0",
]
docs = [
"mkdocs-material>=9.6.11",
Expand All @@ -29,13 +32,14 @@ docs = [
default-groups = ["dev", "docs"]

[tool.uv.workspace]
members = ["pystapi-validator", "stapi-pydantic", "pystapi-client", "stapi-fastapi"]
members = ["pystapi-validator", "stapi-pydantic", "pystapi-client", "stapi-fastapi", "pystapi-schema-generator"]

[tool.uv.sources]
pystapi-client.workspace = true
pystapi-validator.workspace = true
stapi-pydantic.workspace = true
stapi-fastapi.workspace = true
pystapi-schema-generator.workspace = true

[tool.ruff]
line-length = 120
Expand All @@ -62,7 +66,8 @@ files = [
"pystapi-client/src/pystapi_client/**/*.py",
"pystapi-validator/src/pystapi_validator/**/*.py",
"stapi-pydantic/src/stapi_pydantic/**/*.py",
"stapi-fastapi/src/stapi_fastapi/**/*.py"
"stapi-fastapi/src/stapi_fastapi/**/*.py",
"pystapi-schema-generator/src/pystapi_schema_generator/**/*.py"
]

[[tool.mypy.overrides]]
Expand Down
9 changes: 9 additions & 0 deletions pystapi-schema-generator/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# pystapi-schema-generator

A minimal reference STAPI application and console script for exporting its OpenAPI document as YAML.

## Usage

```bash
pystapi-schema-generator > openapi.yaml
```
29 changes: 29 additions & 0 deletions pystapi-schema-generator/pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
[project]
name = "pystapi-schema-generator"
version = "0.1.0"
description = "Reference STAPI application and OpenAPI schema export tooling"
readme = "README.md"
license = "MIT"
authors = [
{ name = "Jarrett Keifer", email = "jkeifer0@gmail.com" },
]
requires-python = ">=3.11"
dependencies = [
"stapi-fastapi>=0.9.0",
"pyyaml>=6.0",
]

[project.scripts]
pystapi-schema-generator = "pystapi_schema_generator.application:main"

[dependency-groups]
dev = [
"pytest>=8.3.5",
]

[tool.uv.sources]
stapi-fastapi = { workspace = true }

[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
from .application import create_reference_app, export_openapi, main

__all__ = [
"create_reference_app",
"export_openapi",
"main",
]
Loading
Loading