-
Notifications
You must be signed in to change notification settings - Fork 50
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Replace django-rest-swagger
with drf-spectacular
#698
Comments
Using
|
@jochenklar @MyPyDavid: Do you know, if the swagger UI used or is this just for convenience? I want to switch out the deprecated library, that generates 100+ warnings when running the tests. Is it important to generate the exact same UI under the exact same URL? |
Hi @afuetterer thanks for the effort! No I don't think we need swagger, I never liked it anyway. But I guess we need something like this, meaning a browsable API explorer thingy. |
Alright, thanks. drf-spectacular generates the openapi schema in json/yaml and renders those in swagger/redoc. I will submit a PR, then you can test it. |
Regarding the versioning here: There is the RDMO version, e.g. What is the difference here? Is the "version" of the API always "v1"? |
Yes, the version is always v1, and its there in case we have another one and need to run them both in parallel. A lot of people say that it is super important to version apis in this way, so I try to do it all the time. An I needed it once. |
$ python manage.py spectacular --color --file schema.yml --validate
[...]
Schema generation summary:
Warnings: 237 (109 unique)
Errors: 28 (5 unique) |
This is the swagger schema generated by django-rest-swagger: https://github.com/afuetterer/rdmo/blob/698-drf-spectacular/django-rest-swagger.yaml npx open-swagger-ui --open django-rest-swagger.yaml |
What about this repo? |
django-rest-swagger
with drf-spectacular
I think https://github.com/rdmorganiser/rdmo-openapi was used by @triole a long time ago. If I understood correctly, we need to include the schema into the |
Can we please archive https://github.com/rdmorganiser/rdmo-openapi then and add a reference, that this is out of date? |
The schema is auto generated by drf-spectacular when the URL of the schema browser is accessed. I thought it could be inserted, but that does not seem to be possible. |
Ok so it is like with swagger before, fine for me. |
It spits out a billion warnings though. Mostly about typing. But to be honest I am not in the mood to fix those. Let me open and rebase the PR again and you can look at it. django rest swagger is deprecated and should go in my opinion. Is the swagger view used a lot? Maybe this could be optional, in case an instance will not use it? Anyway this stops us from supporting Python 3.13, which is bad. |
thanks @afuetterer for setting this up, I checked it out with the We could first make this upgrade to WARNINGS:
/rdmo/conditions/serializers/v1.py:13:, [ConditionViewSet > ConditionSerializer]: unable to resolve type hint for function "get_model". Consider using a type hint or @extend_schema_field. Defaulting to string.
/rdmo/conditions/viewsets.py:20:, [ConditionViewSet]: could not derive type of path parameter "var" because model "rdmo.conditions.models.Condition" contained no such field. Consider annotating parameter with @extend_schema. Defaulting to "string".
/rdmo/core/serializers.py:23:, [RelationViewSet > ChoicesSerializer]: unable to resolve type hint for function "get_id". Consider using a type hint or @extend_schema_field. Defaulting to string.
/rdmo/core/serializers.py:23:, [RelationViewSet > ChoicesSerializer]: unable to resolve type hint for function "get_text". Consider using a type hint or @extend_schema_field. Defaulting to string.
/rdmo/core/serializers.py:252:, [GroupViewSet > GroupSerializer]: Encountered 2 components with identical names "Group" and different classes <class 'rdmo.core.serializers.GroupSerializer'> and <class 'rdmo.accounts.serializers.v1.GroupSerializer'>. This will very likely result in an incorrect schema. Try renaming one.
/rdmo/core/viewsets.py:17: Error [SettingsViewSet]: exception raised while getting serializer. Hint: Is get_serializer_class() returning None or is get_queryset() not working without a request? Ignoring the view for now. (Exception: 'SettingsViewSet' should either include a `serializer_class` attribute, or override the `get_serializer_class()` method.)
/rdmo/core/serializers.py:235:, [SitesViewSet > SiteSerializer]: Encountered 2 components with identical names "Site" and different classes <class 'rdmo.core.serializers.SiteSerializer'> and <class 'rdmo.accounts.serializers.v1.SiteSerializer'>. This will very likely result in an incorrect schema. Try renaming one.
/rdmo/core/viewsets.py:39: Error [TemplatesViewSet]: exception raised while getting serializer. Hint: Is get_serializer_class() returning None or is get_queryset() not working without a request? Ignoring the view for now. (Exception: 'TemplatesViewSet' should either include a `serializer_class` attribute, or override the `get_serializer_class()` method.)
/rdmo/domain/serializers/v1.py:77:, [AttributeViewSet > AttributeListSerializer]: unable to resolve type hint for function "get_model". Consider using a type hint or @extend_schema_field. Defaulting to string.
/rdmo/domain/serializers/v1.py:77:, [AttributeViewSet > AttributeListSerializer]: unable to resolve type hint for function "is_leaf_node". Consider using a type hint or @extend_schema_field. Defaulting to string.
/rdmo/domain/serializers/v1.py:37:, [AttributeViewSet > AttributeSerializer]: unable to resolve type hint for function "get_model". Consider using a type hint or @extend_schema_field. Defaulting to string.
/rdmo/domain/serializers/v1.py:37:, [AttributeViewSet > AttributeSerializer]: unable to resolve type hint for function "get_tasks". Consider using a type hint or @extend_schema_field. Defaulting to string.
/rdmo/domain/serializers/v1.py:37:, [AttributeViewSet > AttributeSerializer]: unable to resolve type hint for function "get_attributes". Consider using a type hint or @extend_schema_field. Defaulting to string.
/rdmo/domain/viewsets.py:25:, [AttributeViewSet]: could not derive type of path parameter "var" because model "rdmo.domain.models.Attribute" contained no such field. Consider annotating parameter with @extend_schema. Defaulting to "string".
/rdmo/management/viewsets.py:67: Error [ImportViewSet]: unable to guess serializer. This is graceful fallback handling for APIViews. Consider using GenericAPIView as view base class, if view is under your control. Either way you may want to add a serializer_class (or method). Ignoring view for now.
/rdmo/management/viewsets.py:24: Error [MetaViewSet]: unable to guess serializer. This is graceful fallback handling for APIViews. Consider using GenericAPIView as view base class, if view is under your control. Either way you may want to add a serializer_class (or method). Ignoring view for now.
/rdmo/management/viewsets.py:32: Error [UploadViewSet]: unable to guess serializer. This is graceful fallback handling for APIViews. Consider using GenericAPIView as view base class, if view is under your control. Either way you may want to add a serializer_class (or method). Ignoring view for now.
/rdmo/options/serializers/v1/option.py:16:, [OptionViewSet > OptionSerializer]: unable to resolve type hint for function "get_model". Consider using a type hint or @extend_schema_field. Defaulting to string.
/rdmo/options/serializers/v1/option.py:16:, [OptionViewSet > OptionSerializer]: unable to resolve type hint for function "text". Consider using a type hint or @extend_schema_field. Defaulting to string.
/rdmo/options/serializers/v1/option.py:16:, [OptionViewSet > OptionSerializer]: unable to resolve type hint for function "help". Consider using a type hint or @extend_schema_field. Defaulting to string.
/rdmo/options/serializers/v1/option.py:16:, [OptionViewSet > OptionSerializer]: unable to resolve type hint for function "view_text". Consider using a type hint or @extend_schema_field. Defaulting to string.
/rdmo/options/serializers/v1/option.py:16:, [OptionViewSet > OptionSerializer]: unable to resolve type hint for function "label". Consider using a type hint or @extend_schema_field. Defaulting to string.
/rdmo/options/serializers/v1/option.py:16:, [OptionViewSet > OptionSerializer]: unable to resolve type hint for function "get_warning". Consider using a type hint or @extend_schema_field. Defaulting to string.
/rdmo/options/viewsets.py:93:, [OptionViewSet]: could not derive type of path parameter "var" because model "rdmo.options.models.Option" contained no such field. Consider annotating parameter with @extend_schema. Defaulting to "string".
/rdmo/options/serializers/v1/optionset.py:25:, [OptionSetViewSet > OptionSetSerializer]: unable to resolve type hint for function "get_model". Consider using a type hint or @extend_schema_field. Defaulting to string.
/rdmo/options/serializers/v1/optionset.py:25:, [OptionSetViewSet > OptionSetSerializer]: unable to resolve type hint for function "get_condition_uris". Consider using a type hint or @extend_schema_field. Defaulting to string.
/rdmo/options/viewsets.py:29:, [OptionSetViewSet]: could not derive type of path parameter "var" because model "rdmo.options.models.OptionSet" contained no such field. Consider annotating parameter with @extend_schema. Defaulting to "string".
/rdmo/overlays/viewsets.py:13: Error [OverlayViewSet]: unable to guess serializer. This is graceful fallback handling for APIViews. Consider using GenericAPIView as view base class, if view is under your control. Either way you may want to add a serializer_class (or method). Ignoring view for now.
/rdmo/projects/serializers/v1/overview.py:9:, [CatalogViewSet > CatalogSerializer]: unable to resolve type hint for function "title". Consider using a type hint or @extend_schema_field. Defaulting to string.
/rdmo/projects/viewsets.py:756:, [MembershipViewSet]: Failed to obtain model through view's queryset due to raised exception. Prevent this either by setting "queryset = Model.objects.none()" on the view, checking for "getattr(self, "swagger_fake_view", False)" in get_queryset() or by simply using @extend_schema. (Exception: 'MembershipQuerySet' object has no attribute 'objects')
/rdmo/projects/serializers/v1/__init__.py:319:, [MembershipViewSet > MembershipSerializer]: Encountered 2 components with identical names "Membership" and different classes <class 'rdmo.projects.serializers.v1.MembershipSerializer'> and <class 'rdmo.accounts.serializers.v1.MembershipSerializer'>. This will very likely result in an incorrect schema. Try renaming one.
/rdmo/projects/viewsets.py:756:, [MembershipViewSet]: could not derive type of path parameter "id" because it is untyped and obtaining queryset from the viewset failed. Consider adding a type to the path (e.g. <int:id>) or annotating the parameter type with @extend_schema. Defaulting to "string".
/rdmo/projects/serializers/v1/__init__.py:44:, [ProjectViewSet > ProjectSerializer]: unable to resolve type hint for function "catalog_uri". Consider using a type hint or @extend_schema_field. Defaulting to string.
/rdmo/projects/serializers/v1/__init__.py:28:, [ProjectViewSet > ProjectSerializer > UserSerializer]: Encountered 2 components with identical names "User" and different classes <class 'rdmo.projects.serializers.v1.UserSerializer'> and <class 'rdmo.accounts.serializers.v1.UserSerializer'>. This will very likely result in an incorrect schema. Try renaming one.
/rdmo/projects/viewsets.py:435:, [ProjectIntegrationViewSet]: could not derive type of path parameter "parent_lookup_project" because model "rdmo.projects.models.integration.Integration" contained no such field. Consider annotating parameter with @extend_schema. Defaulting to "string".
/rdmo/projects/viewsets.py:452:, [ProjectInviteViewSet]: could not derive type of path parameter "parent_lookup_project" because model "rdmo.projects.models.invite.Invite" contained no such field. Consider annotating parameter with @extend_schema. Defaulting to "string".
/rdmo/projects/viewsets.py:482:, [ProjectIssueViewSet]: could not derive type of path parameter "parent_lookup_project" because model "rdmo.projects.models.issue.Issue" contained no such field. Consider annotating parameter with @extend_schema. Defaulting to "string".
/rdmo/projects/viewsets.py:411:, [ProjectMembershipViewSet]: could not derive type of path parameter "parent_lookup_project" because model "rdmo.projects.models.membership.Membership" contained no such field. Consider annotating parameter with @extend_schema. Defaulting to "string".
/rdmo/projects/viewsets.py:677:, [ProjectPageViewSet]: could not derive type of path parameter "parent_lookup_project" because model "rdmo.questions.models.page.Page" contained no such field. Consider annotating parameter with @extend_schema. Defaulting to "string".
/rdmo/projects/serializers/v1/page.py:153:, [ProjectPageViewSet > PageSerializer]: unable to resolve type hint for function "get_model". Consider using a type hint or @extend_schema_field. Defaulting to string.
/rdmo/projects/serializers/v1/page.py:153:, [ProjectPageViewSet > PageSerializer]: unable to resolve type hint for function "title". Consider using a type hint or @extend_schema_field. Defaulting to string.
/rdmo/projects/serializers/v1/page.py:153:, [ProjectPageViewSet > PageSerializer]: unable to resolve type hint for function "help". Consider using a type hint or @extend_schema_field. Defaulting to string.
/rdmo/projects/serializers/v1/page.py:153:, [ProjectPageViewSet > PageSerializer]: unable to resolve type hint for function "get_verbose_name". Consider using a type hint or @extend_schema_field. Defaulting to string.
/rdmo/projects/serializers/v1/page.py:153:, [ProjectPageViewSet > PageSerializer]: unable to resolve type hint for function "get_elements". Consider using a type hint or @extend_schema_field. Defaulting to string.
/rdmo/projects/serializers/v1/page.py:153:, [ProjectPageViewSet > PageSerializer]: unable to resolve type hint for function "get_section". Consider using a type hint or @extend_schema_field. Defaulting to string.
/rdmo/projects/serializers/v1/page.py:153:, [ProjectPageViewSet > PageSerializer]: unable to resolve type hint for function "get_prev_page". Consider using a type hint or @extend_schema_field. Defaulting to string.
/rdmo/projects/serializers/v1/page.py:153:, [ProjectPageViewSet > PageSerializer]: unable to resolve type hint for function "get_next_page". Consider using a type hint or @extend_schema_field. Defaulting to string.
/rdmo/projects/serializers/v1/page.py:153:, [ProjectPageViewSet > PageSerializer]: unable to resolve type hint for function "has_conditions". Consider using a type hint or @extend_schema_field. Defaulting to string.
/rdmo/projects/viewsets.py:502:, [ProjectSnapshotViewSet]: could not derive type of path parameter "parent_lookup_project" because model "rdmo.projects.models.snapshot.Snapshot" contained no such field. Consider annotating parameter with @extend_schema. Defaulting to "string".
/rdmo/projects/viewsets.py:515:, [ProjectValueViewSet]: could not derive type of path parameter "parent_lookup_project" because model "rdmo.projects.models.value.Value" contained no such field. Consider annotating parameter with @extend_schema. Defaulting to "string".
/rdmo/projects/serializers/v1/__init__.py:289:, [ProjectValueViewSet > ProjectValueSerializer]: unable to resolve type hint for function "attribute_uri". Consider using a type hint or @extend_schema_field. Defaulting to string.
/rdmo/projects/serializers/v1/__init__.py:289:, [ProjectValueViewSet > ProjectValueSerializer]: unable to resolve type hint for function "option_uri". Consider using a type hint or @extend_schema_field. Defaulting to string.
/rdmo/projects/serializers/v1/__init__.py:289:, [ProjectValueViewSet > ProjectValueSerializer]: unable to resolve type hint for function "file_name". Consider using a type hint or @extend_schema_field. Defaulting to string.
/rdmo/projects/serializers/v1/__init__.py:289:, [ProjectValueViewSet > ProjectValueSerializer]: unable to resolve type hint for function "file_url". Consider using a type hint or @extend_schema_field. Defaulting to string.
/rdmo/projects/viewsets.py:98:, [ProjectViewSet]: could not derive type of path parameter "var" because model "rdmo.projects.models.project.Project" contained no such field. Consider annotating parameter with @extend_schema. Defaulting to "string".
/rdmo/projects/serializers/v1/__init__.py:416:, [ValueViewSet > ValueSerializer]: unable to resolve type hint for function "attribute_uri". Consider using a type hint or @extend_schema_field. Defaulting to string.
/rdmo/projects/serializers/v1/__init__.py:416:, [ValueViewSet > ValueSerializer]: unable to resolve type hint for function "option_uri". Consider using a type hint or @extend_schema_field. Defaulting to string.
/rdmo/projects/serializers/v1/__init__.py:416:, [ValueViewSet > ValueSerializer]: unable to resolve type hint for function "file_name". Consider using a type hint or @extend_schema_field. Defaulting to string.
/rdmo/projects/serializers/v1/__init__.py:416:, [ValueViewSet > ValueSerializer]: unable to resolve type hint for function "file_url". Consider using a type hint or @extend_schema_field. Defaulting to string.
/rdmo/questions/serializers/v1/catalog.py:27:, [CatalogViewSet > CatalogSerializer]: Encountered 2 components with identical names "Catalog" and different classes <class 'rdmo.questions.serializers.v1.catalog.CatalogSerializer'> and <class 'rdmo.projects.serializers.v1.overview.CatalogSerializer'>. This will very likely result in an incorrect schema. Try renaming one.
/rdmo/questions/serializers/v1/catalog.py:27:, [CatalogViewSet > CatalogSerializer]: unable to resolve type hint for function "get_model". Consider using a type hint or @extend_schema_field. Defaulting to string.
/rdmo/questions/serializers/v1/catalog.py:27:, [CatalogViewSet > CatalogSerializer]: unable to resolve type hint for function "title". Consider using a type hint or @extend_schema_field. Defaulting to string.
/rdmo/questions/serializers/v1/catalog.py:27:, [CatalogViewSet > CatalogSerializer]: unable to resolve type hint for function "help". Consider using a type hint or @extend_schema_field. Defaulting to string.
/rdmo/questions/serializers/v1/catalog.py:27:, [CatalogViewSet > CatalogSerializer]: unable to resolve type hint for function "get_warning". Consider using a type hint or @extend_schema_field. Defaulting to string.
/rdmo/questions/viewsets.py:46:, [CatalogViewSet]: could not derive type of path parameter "var" because model "rdmo.questions.models.catalog.Catalog" contained no such field. Consider annotating parameter with @extend_schema. Defaulting to "string".
/rdmo/questions/serializers/v1/page.py:38:, [PageViewSet > PageSerializer]: Encountered 2 components with identical names "Page" and different classes <class 'rdmo.questions.serializers.v1.page.PageSerializer'> and <class 'rdmo.projects.serializers.v1.page.PageSerializer'>. This will very likely result in an incorrect schema. Try renaming one.
/rdmo/questions/serializers/v1/page.py:38:, [PageViewSet > PageSerializer]: unable to resolve type hint for function "get_model". Consider using a type hint or @extend_schema_field. Defaulting to string.
/rdmo/questions/serializers/v1/page.py:38:, [PageViewSet > PageSerializer]: unable to resolve type hint for function "title". Consider using a type hint or @extend_schema_field. Defaulting to string.
/rdmo/questions/serializers/v1/page.py:38:, [PageViewSet > PageSerializer]: unable to resolve type hint for function "short_title". Consider using a type hint or @extend_schema_field. Defaulting to string.
/rdmo/questions/serializers/v1/page.py:38:, [PageViewSet > PageSerializer]: unable to resolve type hint for function "help". Consider using a type hint or @extend_schema_field. Defaulting to string.
/rdmo/questions/serializers/v1/page.py:38:, [PageViewSet > PageSerializer]: unable to resolve type hint for function "verbose_name". Consider using a type hint or @extend_schema_field. Defaulting to string.
/rdmo/questions/serializers/v1/page.py:38:, [PageViewSet > PageSerializer]: unable to resolve type hint for function "get_warning". Consider using a type hint or @extend_schema_field. Defaulting to string.
/rdmo/questions/serializers/v1/page.py:38:, [PageViewSet > PageSerializer]: unable to resolve type hint for function "get_condition_uris". Consider using a type hint or @extend_schema_field. Defaulting to string.
/rdmo/questions/viewsets.py:194:, [PageViewSet]: could not derive type of path parameter "var" because model "rdmo.questions.models.page.Page" contained no such field. Consider annotating parameter with @extend_schema. Defaulting to "string".
/rdmo/questions/serializers/v1/question.py:19:, [QuestionViewSet > QuestionSerializer]: unable to resolve type hint for function "get_model". Consider using a type hint or @extend_schema_field. Defaulting to string.
/rdmo/questions/serializers/v1/question.py:19:, [QuestionViewSet > QuestionSerializer]: unable to resolve type hint for function "text". Consider using a type hint or @extend_schema_field. Defaulting to string.
/rdmo/questions/serializers/v1/question.py:19:, [QuestionViewSet > QuestionSerializer]: unable to resolve type hint for function "help". Consider using a type hint or @extend_schema_field. Defaulting to string.
/rdmo/questions/serializers/v1/question.py:19:, [QuestionViewSet > QuestionSerializer]: unable to resolve type hint for function "default_text". Consider using a type hint or @extend_schema_field. Defaulting to string.
/rdmo/questions/serializers/v1/question.py:19:, [QuestionViewSet > QuestionSerializer]: unable to resolve type hint for function "verbose_name". Consider using a type hint or @extend_schema_field. Defaulting to string.
/rdmo/questions/serializers/v1/question.py:19:, [QuestionViewSet > QuestionSerializer]: unable to resolve type hint for function "get_warning". Consider using a type hint or @extend_schema_field. Defaulting to string.
/rdmo/questions/serializers/v1/question.py:19:, [QuestionViewSet > QuestionSerializer]: unable to resolve type hint for function "get_condition_uris". Consider using a type hint or @extend_schema_field. Defaulting to string.
/rdmo/questions/serializers/v1/question.py:19:, [QuestionViewSet > QuestionSerializer]: unable to resolve type hint for function "get_optionset_uris". Consider using a type hint or @extend_schema_field. Defaulting to string.
/rdmo/questions/viewsets.py:355:, [QuestionViewSet]: could not derive type of path parameter "var" because model "rdmo.questions.models.question.Question" contained no such field. Consider annotating parameter with @extend_schema. Defaulting to "string".
/rdmo/questions/serializers/v1/questionset.py:37:, [QuestionSetViewSet > QuestionSetSerializer]: unable to resolve type hint for function "get_model". Consider using a type hint or @extend_schema_field. Defaulting to string.
/rdmo/questions/serializers/v1/questionset.py:37:, [QuestionSetViewSet > QuestionSetSerializer]: unable to resolve type hint for function "title". Consider using a type hint or @extend_schema_field. Defaulting to string.
/rdmo/questions/serializers/v1/questionset.py:37:, [QuestionSetViewSet > QuestionSetSerializer]: unable to resolve type hint for function "help". Consider using a type hint or @extend_schema_field. Defaulting to string.
/rdmo/questions/serializers/v1/questionset.py:37:, [QuestionSetViewSet > QuestionSetSerializer]: unable to resolve type hint for function "verbose_name". Consider using a type hint or @extend_schema_field. Defaulting to string.
/rdmo/questions/serializers/v1/questionset.py:37:, [QuestionSetViewSet > QuestionSetSerializer]: unable to resolve type hint for function "get_warning". Consider using a type hint or @extend_schema_field. Defaulting to string.
/rdmo/questions/serializers/v1/questionset.py:37:, [QuestionSetViewSet > QuestionSetSerializer]: unable to resolve type hint for function "get_condition_uris". Consider using a type hint or @extend_schema_field. Defaulting to string.
/rdmo/questions/viewsets.py:274:, [QuestionSetViewSet]: could not derive type of path parameter "var" because model "rdmo.questions.models.questionset.QuestionSet" contained no such field. Consider annotating parameter with @extend_schema. Defaulting to "string".
/rdmo/questions/serializers/v1/section.py:27:, [SectionViewSet > SectionSerializer]: unable to resolve type hint for function "get_model". Consider using a type hint or @extend_schema_field. Defaulting to string.
/rdmo/questions/serializers/v1/section.py:27:, [SectionViewSet > SectionSerializer]: unable to resolve type hint for function "title". Consider using a type hint or @extend_schema_field. Defaulting to string.
/rdmo/questions/serializers/v1/section.py:27:, [SectionViewSet > SectionSerializer]: unable to resolve type hint for function "short_title". Consider using a type hint or @extend_schema_field. Defaulting to string.
/rdmo/questions/serializers/v1/section.py:27:, [SectionViewSet > SectionSerializer]: unable to resolve type hint for function "get_warning". Consider using a type hint or @extend_schema_field. Defaulting to string.
/rdmo/questions/viewsets.py:121:, [SectionViewSet]: could not derive type of path parameter "var" because model "rdmo.questions.models.section.Section" contained no such field. Consider annotating parameter with @extend_schema. Defaulting to "string".
/rdmo/tasks/serializers/v1.py:15:, [TaskViewSet > TaskSerializer]: unable to resolve type hint for function "get_model". Consider using a type hint or @extend_schema_field. Defaulting to string.
/rdmo/tasks/serializers/v1.py:15:, [TaskViewSet > TaskSerializer]: unable to resolve type hint for function "title". Consider using a type hint or @extend_schema_field. Defaulting to string.
/rdmo/tasks/serializers/v1.py:15:, [TaskViewSet > TaskSerializer]: unable to resolve type hint for function "text". Consider using a type hint or @extend_schema_field. Defaulting to string.
/rdmo/tasks/serializers/v1.py:15:, [TaskViewSet > TaskSerializer]: unable to resolve type hint for function "get_warning". Consider using a type hint or @extend_schema_field. Defaulting to string.
/rdmo/tasks/serializers/v1.py:15:, [TaskViewSet > TaskSerializer]: unable to resolve type hint for function "get_condition_uris". Consider using a type hint or @extend_schema_field. Defaulting to string.
/rdmo/tasks/viewsets.py:21:, [TaskViewSet]: could not derive type of path parameter "var" because model "rdmo.tasks.models.Task" contained no such field. Consider annotating parameter with @extend_schema. Defaulting to "string".
/rdmo/views/serializers/v1.py:17:, [ViewViewSet > ViewSerializer]: unable to resolve type hint for function "get_model". Consider using a type hint or @extend_schema_field. Defaulting to string.
/rdmo/views/serializers/v1.py:17:, [ViewViewSet > ViewSerializer]: unable to resolve type hint for function "title". Consider using a type hint or @extend_schema_field. Defaulting to string.
/rdmo/views/serializers/v1.py:17:, [ViewViewSet > ViewSerializer]: unable to resolve type hint for function "help". Consider using a type hint or @extend_schema_field. Defaulting to string.
/rdmo/views/serializers/v1.py:17:, [ViewViewSet > ViewSerializer]: unable to resolve type hint for function "get_warning". Consider using a type hint or @extend_schema_field. Defaulting to string.
/rdmo/views/viewsets.py:21:, [ViewViewSet]: could not derive type of path parameter "var" because model "rdmo.views.models.View" contained no such field. Consider annotating parameter with @extend_schema. Defaulting to "string".
Warning: operationId "conditions_conditions_export_retrieve" has collisions [('/api/v1/conditions/conditions/{id}/export{var}/', 'get'), ('/api/v1/conditions/conditions/export{var}/', 'get')]. resolving with numeral suffixes.
Warning: operationId "domain_attributes_export_retrieve" has collisions [('/api/v1/domain/attributes/{id}/export{var}/', 'get'), ('/api/v1/domain/attributes/export{var}/', 'get')]. resolving with numeral suffixes.
Warning: operationId "options_options_export_retrieve" has collisions [('/api/v1/options/options/{id}/export{var}/', 'get'), ('/api/v1/options/options/export{var}/', 'get')]. resolving with numeral suffixes.
Warning: operationId "options_optionsets_export_retrieve" has collisions [('/api/v1/options/optionsets/{id}/export{var}/', 'get'), ('/api/v1/options/optionsets/export{var}/', 'get')]. resolving with numeral suffixes.
Warning: operationId "questions_catalogs_export_retrieve" has collisions [('/api/v1/questions/catalogs/{id}/export{var}/', 'get'), ('/api/v1/questions/catalogs/export{var}/', 'get')]. resolving with numeral suffixes.
Warning: operationId "questions_pages_export_retrieve" has collisions [('/api/v1/questions/pages/{id}/export{var}/', 'get'), ('/api/v1/questions/pages/export{var}/', 'get')]. resolving with numeral suffixes.
Warning: operationId "questions_questions_export_retrieve" has collisions [('/api/v1/questions/questions/{id}/export{var}/', 'get'), ('/api/v1/questions/questions/export{var}/', 'get')]. resolving with numeral suffixes.
Warning: operationId "questions_questionsets_export_retrieve" has collisions [('/api/v1/questions/questionsets/{id}/export{var}/', 'get'), ('/api/v1/questions/questionsets/export{var}/', 'get')]. resolving with numeral suffixes.
Warning: operationId "questions_sections_export_retrieve" has collisions [('/api/v1/questions/sections/{id}/export{var}/', 'get'), ('/api/v1/questions/sections/export{var}/', 'get')]. resolving with numeral suffixes.
Warning: operationId "tasks_tasks_export_retrieve" has collisions [('/api/v1/tasks/tasks/{id}/export{var}/', 'get'), ('/api/v1/tasks/tasks/export{var}/', 'get')]. resolving with numeral suffixes.
Warning: operationId "views_views_export_retrieve" has collisions [('/api/v1/views/views/{id}/export{var}/', 'get'), ('/api/v1/views/views/export{var}/', 'get')]. resolving with numeral suffixes.
Schema generation summary:
Warnings: 240 (111 unique)
Errors: 32 (6 unique) |
Feel free to take over. I just wanted to give an up to date alternative to django rest swagger. |
Rationale / Begründung
django-rest-swagger
is deprecated since 2019. Should rdmo switch to an alternative openapi library?drf-spectacular
looks promising.Affected
Software group
References / Verweise
The text was updated successfully, but these errors were encountered: