awesome-mecheng
awesome-mecheng copied to clipboard
API schema has warnings
In #1737 we added an OpenAPI3.0 schema, but we should go through this and ensure that the spec is complete, things I know are missing:
- The
CharField(source="get_*_display",...)
should be replaced with customChoiceFields
that use the display values for their representations, so that we get enums for these back in the schema - The Schemas for JSONFields with validators should be included in the top level schema
- There are warnings where return types have been inferred, these are mostly correct anyway but need to be fixed, see the TODO in
app/tests/api_tests/test_schema.py
- [ ] We're on quite an old version of
drf-spectacular
, this also needs to be updated https://github.com/comic/grand-challenge.org/blob/e5145fd991740aa45f9ed56483205c8590900d6b/pyproject.toml#L89