Skip to content

Describe library-owned parameters, models and the /schema response in OpenAPI (0.15.1) - #83

Merged
velis74 merged 1 commit into
mainfrom
openapi-library-params
Nov 12, 2026
Merged

velis74 merged 1 commit into
mainfrom
openapi-library-params

Conversation

@velis74

@velis74 velis74 commented Nov 12, 2026

Copy link
Copy Markdown
Contributor

Closes #82.

  • pk is described by the Field(description=...) of the model's primary key field, else Primary key of the record.; an endpoint's own Path(description=...) is kept.
  • offset, cursor and limit have descriptions; limit states the viewset's default_page_size and max_page_size.
  • @endpoint_docs key parameters: descriptions by schema name, merged per parameter along the MRO; an unknown name raises ValueError.
  • A list without a filter model publishes no fltr parameter (it was type: null). With a filter model, its fields were already published one per parameter with their descriptions.
  • GET {base}/schema answers the named schema OpenAPIDocument and describes itself; overridable under the action name schema.
  • Field descriptions on PaginatedList, CursorPage, LookupItem, LookupFilter, SortStateColumn, Change, RecordsChanged and the events viewset models.
  • openapi_descriptions_test.py checks that every parameter and every schema field of a full viewset plus the events endpoints has a description.

Patch bump to 0.15.1 (Python and npm).

@github-actions

Copy link
Copy Markdown

✅ Incremental coverage — 98.4%

████████████████████ 121 / 123 changed lines covered · threshold 70% · main → openapi-library-params

File Coverage Covered Uncovered lines
⚠️ fastapi_viewsets/decorators/route_viewset.py 96.4% 53 / 55 196, 198
✅ fastapi_viewsets/cursor.py 100% 10 / 10 —
✅ fastapi_viewsets/decorators/build_schema.py 100% 2 / 2 —
✅ fastapi_viewsets/endpoint_docs.py 100% 7 / 7 —
✅ fastapi_viewsets/events/changes.py 100% 6 / 6 —
✅ fastapi_viewsets/events/viewset.py 100% 13 / 13 —
✅ fastapi_viewsets/list_query.py 100% 8 / 8 —
✅ fastapi_viewsets/mixins.py 100% 12 / 12 —
✅ fastapi_viewsets/routing.py 100% 10 / 10 —
Total 98.4% 121 / 123
12 files not graded (3 ignored by pattern, 9 not source files)
File Reason
changelog.md not a source file
docs/api/python-mixins.md not a source file
docs/api/route-viewset.md not a source file
docs/guide/endpoint-docs.md not a source file
docs/guide/list-pipeline.md not a source file
fastapi_viewsets/endpoint_docs_test.py ignored by *_test.py
fastapi_viewsets/list_shapes_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

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

@velis74
velis74 merged commit a8501cb into main Nov 12, 2026
6 checks passed
@velis74
velis74 deleted the openapi-library-params branch November 12, 2026 17:40
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