Skip to content

Commit

Permalink
use test setup for openapi export
Browse files Browse the repository at this point in the history
  • Loading branch information
jschlyter committed Nov 28, 2024
1 parent 24354cc commit 3eceb9f
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions tools/export_openapi_yaml.py
Original file line number Diff line number Diff line change
@@ -1,11 +1,15 @@
from fastapi.testclient import TestClient
from pydantic_settings import SettingsConfigDict

from nodeman.server import NodemanServer
from nodeman.settings import Settings

Settings.model_config = SettingsConfigDict(toml_file="tests/test.toml")

settings = Settings()
app = NodemanServer(settings)

client = TestClient(app)
response = client.get("/openapi.yaml")
response.raise_for_status()
print(response.text)

0 comments on commit 3eceb9f

Please sign in to comment.