Skip to content

Describe every operation, response and filter parameter in OpenAPI; align comments and docs with the source (0.15.2) - #84

Merged
velis74 merged 3 commits into
mainfrom
compliance-2026-11
Nov 12, 2026
Merged

velis74 merged 3 commits into
mainfrom
compliance-2026-11

Conversation

@velis74

@velis74 velis74 commented Nov 12, 2026

Copy link
Copy Markdown
Contributor

Fixes from the compliance review of the changes since #54.

OpenAPI:

  • Every mixin operation has a description and a success response description; the bulk request bodies are described.
  • PUT and PATCH {base}/bulk declare their 404.
  • Error responses are declared by the endpoints that answer them: the cursor codes on the list endpoint of a viewset serving the cursor shape, event_topic_invalid on subscribe, event_cursors_exceeded on poll. Middleware and collection codes name what answers them.
  • Middleware.openapi_parameters: parameter objects a middleware reads, added by route_viewset to every operation but /schema. Idempotency declares its Idempotency-Key header.
  • make_filter_model describes every query parameter by field and operator.
  • PaginatedList[T], CursorPage[T] and ListOf[T] carry a description; a documented subclass keeps its own. LookupItem.pk and group state their JSON types.
  • Events models say null or absent instead of None.

Comments and documentation:

  • Docstrings and comments that contradicted the code (settings read times, count_records noqa, watch() onChange), docstrings naming their callers, missing docstrings on public symbols (Python and TS).
  • Docs that did not match the source: the sub-viewset watch() example, list_items return type, materialize/take_page as coroutines, Cookie.value default, ListAction.
  • Version history and literary phrasing removed from the guides; README and demo run through uv; TODO cleaned up.
  • Identifiers use US spelling.

Version 0.15.2 (patch) for both packages.

…lign comments and docs with the source (0.15.2)

- Mixin operations get descriptions and success response descriptions; bulk bodies are described.
- PUT and PATCH /bulk declare their 404.
- Error responses are per action: list shape and cursor codes on the list endpoint, event codes on
  subscribe and poll; middleware-dependent codes name their middleware.
- Middleware.openapi_parameters: Idempotency documents its Idempotency-Key header.
- make_filter_model describes every query parameter by field and operator.
- Parametrised page models carry a description; LookupItem.pk/group state their JSON types.
- Comments, docstrings and docs corrected where they contradicted the source.
- Identifiers use US spelling; README and demo run through uv.
…ass page descriptions

The cursor codes are kept only on a viewset serving the cursor shape, the Idempotency-Key header is not added to
/schema, and settings docstrings state when each value is read.
@github-actions

github-actions Bot commented Nov 12, 2026 •

Copy link
Copy Markdown

✅ Incremental coverage — 100%

████████████████████ 97 / 97 changed lines covered · threshold 70% · main → compliance-2026-11

File Coverage Covered Uncovered lines
✅ fastapi_viewsets/conf.py 100% 6 / 6 —
✅ fastapi_viewsets/cursor.py 100% 2 / 2 —
✅ fastapi_viewsets/decorators/celery_viewset/transport.py 100% 0 / 0 no executable lines changed
✅ fastapi_viewsets/decorators/route_viewset.py 100% 10 / 10 —
✅ fastapi_viewsets/events/viewset.py 100% 5 / 5 —
✅ fastapi_viewsets/filters/declaration.py 100% 9 / 9 —
✅ fastapi_viewsets/list_query.py 100% 14 / 14 —
✅ fastapi_viewsets/list_shapes.py 100% 1 / 1 —
✅ fastapi_viewsets/middleware/__init__.py 100% 12 / 12 —
✅ fastapi_viewsets/middleware/idempotency.py 100% 1 / 1 —
✅ fastapi_viewsets/mixins.py 100% 17 / 17 —
✅ fastapi_viewsets/response_classes.py 100% 16 / 16 —
✅ vue/call.ts 100% 0 / 0 no executable lines changed
✅ vue/events/changes.ts 100% 0 / 0 no executable lines changed
✅ vue/events/client.ts 100% 4 / 4 —
✅ vue/muxws-proxy.ts 100% 0 / 0 no executable lines changed
✅ vue/proxy-base.ts 100% 0 / 0 no executable lines changed
✅ vue/rest-proxy.ts 100% 0 / 0 no executable lines changed
✅ vue/sort.ts 100% 0 / 0 no executable lines changed
✅ vue/viewset.ts 100% 0 / 0 no executable lines changed
Total 100% 97 / 97
33 files not graded (14 ignored by pattern, 19 not source files)
File Reason
README.md not a source file
TODO.md not a source file
changelog.md not a source file
demo.py ignored by demo.py
docs/api/idempotency.md not a source file
docs/api/python-mixins.md not a source file
docs/api/route-viewset.md not a source file
docs/api/settings.md not a source file
docs/api/vue-mixins.md not a source file
docs/guide/command-middleware.md not a source file
docs/guide/endpoint-docs.md not a source file
docs/guide/events.md not a source file
docs/guide/idempotency.md not a source file
docs/guide/list-pipeline.md not a source file
docs/guide/routers.md not a source file
docs/guide/vue-events.md not a source file
fastapi_viewsets/decorators/celery_viewset/client_test.py ignored by *_test.py
fastapi_viewsets/decorators/celery_viewset/server_test.py ignored by *_test.py
fastapi_viewsets/decorators/celery_viewset/transport_test.py ignored by *_test.py
fastapi_viewsets/events/delivery_test.py ignored by *_test.py
fastapi_viewsets/events/redis_test.py ignored by *_test.py
fastapi_viewsets/events/scopes_test.py ignored by *_test.py
fastapi_viewsets/events/viewset_test.py ignored by *_test.py
fastapi_viewsets/list_shapes_test.py ignored by *_test.py
fastapi_viewsets/middleware/__init___test.py ignored by *_test.py
fastapi_viewsets/middleware/idempotency_test.py ignored by *_test.py
fastapi_viewsets/openapi_descriptions_test.py ignored by *_test.py
package-lock.json not a source file
package.json not a source file
pyproject.toml not a source file
uv.lock not a source file
vue/events/poll.spec.ts ignored by *.spec.*
vue/muxws-proxy.spec.ts ignored by *.spec.*

Coverage reports: coverage.json (coverage.py, 69 files) · coverage/clover.xml (clover, 13 files) — incremental-coverage-check v3.0.0

@velis74
velis74 merged commit ac2b709 into main Nov 12, 2026
6 checks passed
@velis74
velis74 deleted the compliance-2026-11 branch November 12, 2026 19:20
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