Skip to content

Fix API/docs parity and add contract validation#26

Merged
andreagrandi merged 1 commit intomasterfrom
api-docs-parity-contract-validation
Mar 14, 2026
Merged

Fix API/docs parity and add contract validation#26
andreagrandi merged 1 commit intomasterfrom
api-docs-parity-contract-validation

Conversation

@andreagrandi
Copy link
Owner

Summary

  • Fix docs drift: corrected search q parameter description (name + description, not address), added WEBP to accepted image formats, fixed statistics endpoint path prefix, updated rate-limiting table with missing endpoints
  • Document community photo endpoint: new docs/libraries/submit-photo.md for POST /api/v1/libraries/{slug}/photo, added to nav, index, getting-started, and changelog
  • Add OpenAPI schema validation to CI: openapi-spec-validator dependency, validate_openapi nox session, CI step after tests. Also fixed a pre-existing spec violation (Pydantic examples arrays on query params → json_schema_extra with singular example)
  • Add end-to-end API integration test: single workflow test covering register → login → me → submit → detail (pending) → approve → list → search → detail (public) → report → community photo → statistics

Test plan

  • All 481 tests pass (nox -s tests)
  • OpenAPI schema validates (nox -s validate_openapi)
  • Docker rebuild + Playwright smoke checks: homepage, map, stats, library detail, login, API docs, API response — all pass with no console errors

… e2e test

- Fix search `q` parameter docs: searches name and description, not address
- Add WEBP to accepted image format docs (submit, report, errors)
- Fix statistics endpoint path prefix in docs and changelog
- Add missing endpoints to rate-limiting table (statistics, community photo)
- Document POST /api/v1/libraries/{slug}/photo endpoint (new docs page)
- Add openapi-spec-validator to CI via nox session
- Fix OpenAPI spec violation: use json_schema_extra for query param examples
- Add end-to-end API integration test covering full user workflow
@andreagrandi andreagrandi merged commit ed6b87f into master Mar 14, 2026
4 checks passed
@andreagrandi andreagrandi deleted the api-docs-parity-contract-validation branch March 14, 2026 09:22
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