mirror of
https://github.com/galaxyproject/galaxy.git
synced 2026-09-24 16:30:27 +08:00
25 lines
558 B
Python
25 lines
558 B
Python
from tool_shed.structured_app import ToolShedApp
|
|
from tool_shed_client.schema import Version
|
|
from . import (
|
|
depends,
|
|
Router,
|
|
)
|
|
|
|
router = Router(tags=["configuration"])
|
|
|
|
|
|
@router.cbv
|
|
class FastAPIConfiguration:
|
|
app: ToolShedApp = depends(ToolShedApp)
|
|
|
|
@router.get(
|
|
"/api/version",
|
|
operation_id="configuration__version",
|
|
)
|
|
def version(self) -> Version:
|
|
return Version(
|
|
version_major=self.app.config.version_major,
|
|
version=self.app.config.version,
|
|
api_version="v2",
|
|
)
|