Skip to content

Add get config endpoint#107

Merged
javidahmed64592 merged 3 commits into
mainfrom
add-get-config-endpoint
Jul 3, 2026
Merged

Add get config endpoint#107
javidahmed64592 merged 3 commits into
mainfrom
add-get-config-endpoint

Conversation

@javidahmed64592

Copy link
Copy Markdown
Owner

This pull request adds a new /config endpoint to the template server, allowing clients to retrieve the current server configuration and version. It introduces a new response model, updates the router and server setup to support this endpoint, and adds comprehensive tests to ensure correct behavior.

New /config endpoint and response model:

  • Added GetConfigResponse model to encapsulate server configuration and version in API responses. (python_template_server/models.py)
  • Added get_config method and /config route to TemplateServerRouter, returning the current configuration and version. (python_template_server/routers/template_server_router.py) [1] [2]
  • Introduced configure_router method to inject configuration and version into the router instance. (python_template_server/routers/template_server_router.py)

Server and router integration:

  • Updated server initialization to call configure_router with the current configuration and version before route setup. (python_template_server/template_server.py) [1] [2]

Testing improvements:

  • Added and updated tests to cover the new /config endpoint, including integration and unit tests for the response model. (tests/routers/test_template_server_router.py, tests/test_models.py, tests/conftest.py) [1] [2] [3] [4]

These changes improve the server's introspection capabilities and ensure robust test coverage for the new endpoint.

@javidahmed64592 javidahmed64592 merged commit d74cfff into main Jul 3, 2026
14 checks passed
@javidahmed64592 javidahmed64592 deleted the add-get-config-endpoint branch July 3, 2026 22:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant