Skip to content

Swagger generation on edx-platform CMS broken due to ObjectTag serializer has a "name" field #272

Description

@schenedx

Symptom:

If you go to the edx-platform CMS/Studio api-docs page (example: localhost:18010/api-docs), you will see the docs are showing 500 error

Root cause:

The cause is that, the model object ObjectTags (link here) has no field name. However, in the serializer ObjectTagSerializer (Link Here), it would reference a field name.

This discrepancy would result in the following error upon swagger generation:

File "/edx/app/edxapp/venvs/edxapp/lib/python3.11/site-packages/rest_framework/serializers.py", line 1340, in build_unknown_field
raise ImproperlyConfigured(django.core.exceptions.ImproperlyConfigured: Field name `name` is not valid for model `ObjectTag`.

Acceptance Criteria:

Please update the serializer or the model. Please test this out on edx-platform CMS/Studio api-docs URL to ensure the api-docs page renders successfully.

Tagging:

@rpenido

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions