Skip to content

Add OpenAPI/Swagger contract tests and handle nested id UUIDs#13

Merged
merval merged 1 commit into
mainfrom
codex/leverage-swagger-json-spec-in-tests
May 31, 2026
Merged

Add OpenAPI/Swagger contract tests and handle nested id UUIDs#13
merval merged 1 commit into
mainfrom
codex/leverage-swagger-json-spec-in-tests

Conversation

@merval

@merval merval commented May 31, 2026

Copy link
Copy Markdown
Member

Motivation

  • Ensure the application’s HTTP requests to ProPresenter remain aligned with the checked-in OpenAPI/Swagger spec to catch API contract regressions early.
  • Correctly extract stable UUID-like identifiers when the API returns nested id objects to avoid broken library/presentation lookups.

Description

  • Add tests/openapi_spec.py helpers to load the checked-in tests/swagger.json, match concrete API paths to templated OpenAPI paths, and extract example JSON responses.
  • Add tests/test_swagger_contract.py which injects a FakeProPresenterClient, exercises the app routes, and asserts each generated ProPresenter request is covered by the OpenAPI spec and example fixtures.
  • Update propresenter_notes/services.py uuid_value to recurse into a nested id dict when present so nested `{

Codex Task

@merval merval merged commit d48f5c5 into main May 31, 2026
1 check passed
@merval merval deleted the codex/leverage-swagger-json-spec-in-tests branch May 31, 2026 03:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant