Skip to content

Enhance topic payload contracts with topic type and endpoint-first spec - #324

Merged
mottych merged 2 commits into
devfrom
feat/issue-321-openapi-topic-contracts
Apr 19, 2026
Merged

Enhance topic payload contracts with topic type and endpoint-first spec#324
mottych merged 2 commits into
devfrom
feat/issue-321-openapi-topic-contracts

Conversation

@mottych

@mottych mottych commented Apr 19, 2026

Copy link
Copy Markdown
Owner

Summary

  • extend runtime OpenAPI topic contract index to include both single-shot and conversation topics
  • include topicType discriminator per topic for unified client routing
  • add conversation payload schema refs and coaching start examples to the OpenAPI contract enrichment
  • add tests for new contract behavior, including goals conversation topic
  • simplify unified AI integration spec to endpoint-first guidance and direct consumers to runtime OpenAPI/AsyncAPI as source of truth

Why

Frontend clients need a single machine-readable topic payload contract that supports different payload/response schemas by topic type without duplicating static documentation.

Validation

  • uv run pytest tests/unit/api/test_openapi_topic_contracts.py tests/unit/core/test_endpoint_registry.py tests/unit/models/test_coaching_results.py
  • uv run ruff check src/api/openapi_topic_contracts.py src/models/coaching_results.py src/core/topic_registry.py src/core/topic_seed_data.py tests/unit/api/test_openapi_topic_contracts.py tests/unit/core/test_endpoint_registry.py tests/unit/models/test_coaching_results.py
  • uv run mypy src/api/openapi_topic_contracts.py tests/unit/api/test_openapi_topic_contracts.py --explicit-package-bases

Fixes #321

@mottych
mottych merged commit 2de99f1 into dev Apr 19, 2026
1 check passed
@mottych
mottych deleted the feat/issue-321-openapi-topic-contracts branch April 19, 2026 22:23
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