From 7aad1608e06cb2defbaaeff2fa0b431555e057a8 Mon Sep 17 00:00:00 2001 From: Raj Joshi Date: Fri, 8 Nov 2024 16:21:54 -0500 Subject: [PATCH 1/3] :wrench: chore: add additional troubleshooting instructions --- develop-docs/backend/api/public.mdx | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/develop-docs/backend/api/public.mdx b/develop-docs/backend/api/public.mdx index 0bda5e778bbf1..97e1c56f1f364 100644 --- a/develop-docs/backend/api/public.mdx +++ b/develop-docs/backend/api/public.mdx @@ -481,6 +481,28 @@ NOTE: The `openapi-diff` test is supposed to fail when CI runs on your pull requ **Solution**: You need to add the endpoint to a [sidebar tab](/backend/api/public/#3-sidebar-tab) with the decorator `@extend_schema(tags=['
'])`. +**Problem**: `drf_spectacular.plumbing.UnableToProceedError' ... raise UnableToProceedError(hint)` + +**Solution**: Check that the response of your API documentation is using a TypedDict rather than a serializer. + +If the scheme looks something like this: +```python +... +200: inline_sentry_response_serializer( + "ListDocIntegrationResponse", list[FooSerializer] + ), +``` + +Then you need to change it to use a TypedDict by first typing the serializer, then updating the schema to use the TypedDict: +```python +... +200: inline_sentry_response_serializer( + "ListDocIntegrationResponse", list[FooSerializerResponse] + ), +``` + +Refer to the section above on [Success Responses](#success-responses) for more information. + --- ## Requesting an API to be public From 3ab664244b8d2edb9a1bd5550513b171a184608b Mon Sep 17 00:00:00 2001 From: Raj Joshi Date: Fri, 8 Nov 2024 18:45:19 -0500 Subject: [PATCH 2/3] Update develop-docs/backend/api/public.mdx Co-authored-by: Isabella Enriquez --- develop-docs/backend/api/public.mdx | 2 ++ 1 file changed, 2 insertions(+) diff --git a/develop-docs/backend/api/public.mdx b/develop-docs/backend/api/public.mdx index 97e1c56f1f364..e2cba2ef4530f 100644 --- a/develop-docs/backend/api/public.mdx +++ b/develop-docs/backend/api/public.mdx @@ -481,6 +481,8 @@ NOTE: The `openapi-diff` test is supposed to fail when CI runs on your pull requ **Solution**: You need to add the endpoint to a [sidebar tab](/backend/api/public/#3-sidebar-tab) with the decorator `@extend_schema(tags=['
'])`. +--- + **Problem**: `drf_spectacular.plumbing.UnableToProceedError' ... raise UnableToProceedError(hint)` **Solution**: Check that the response of your API documentation is using a TypedDict rather than a serializer. From 65b1992265121122ff1a9bcaef01ce0267f9be19 Mon Sep 17 00:00:00 2001 From: Raj Joshi Date: Fri, 8 Nov 2024 18:45:37 -0500 Subject: [PATCH 3/3] Apply suggestions from code review Co-authored-by: Isabella Enriquez --- develop-docs/backend/api/public.mdx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/develop-docs/backend/api/public.mdx b/develop-docs/backend/api/public.mdx index e2cba2ef4530f..2100b00a15453 100644 --- a/develop-docs/backend/api/public.mdx +++ b/develop-docs/backend/api/public.mdx @@ -483,11 +483,11 @@ NOTE: The `openapi-diff` test is supposed to fail when CI runs on your pull requ --- -**Problem**: `drf_spectacular.plumbing.UnableToProceedError' ... raise UnableToProceedError(hint)` +**Problem**: `drf_spectacular.plumbing.UnableToProceedError' ... raise UnableToProceedError(hint)` **Solution**: Check that the response of your API documentation is using a TypedDict rather than a serializer. -If the scheme looks something like this: +If the schema looks something like this: ```python ... 200: inline_sentry_response_serializer(