awesome-mecheng icon indicating copy to clipboard operation
awesome-mecheng copied to clipboard

API schema has warnings

Open jmsmkn opened this issue 3 years ago • 1 comments

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 custom ChoiceFields 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

jmsmkn avatar Feb 26 '21 17:02 jmsmkn

  • [ ] 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

jmsmkn avatar Jun 02 '22 11:06 jmsmkn