prompt: We are currently solving the following issue within our repository. Here is the issue text:
  --- BEGIN ISSUE ---
  The schema is empty for unauthorised users.
  Another problem with this - the schema is empty for unauthorised users. You need to add `public=True` to `get_schema_view`.
  
  _Originally posted by @jmsmkn in https://github.com/comic/grand-challenge.org/issues/1017#issuecomment-567254400_
  
  --- END ISSUE ---
  
  Below are some code segments, each from a relevant file. One or more of these files may contain bugs.
  --- BEGIN FILES ---
  Path: `app/grandchallenge/api/urls.py`
  Content:
  ```
  1 from django.conf import settings
  2 from django.conf.urls import include, url
  3 from django.urls import path
  4 from drf_yasg import openapi
  5 from drf_yasg.views import get_schema_view
  6 from rest_framework import permissions, routers
  7 
  8 from grandchallenge.algorithms.views import (
  9     AlgorithmImageViewSet,
  10     AlgorithmViewSet,
  11     JobViewSet,
  12     ResultViewSet,
  13 )
  14 from grandchallenge.cases.views import (
  15     ImageViewSet,
  16     RawImageUploadSessionViewSet,
  17 )
  18 from grandchallenge.jqfileupload.views import StagedFileViewSet
  19 from grandchallenge.reader_studies.views import (
  20     AnswerViewSet,
  21     QuestionViewSet,
  22     ReaderStudyViewSet,
  23 )
  24 from grandchallenge.retina_api.views import LandmarkAnnotationSetViewSet
  25 from grandchallenge.subdomains.utils import reverse_lazy
  26 from grandchallenge.workstation_configs.views import WorkstationConfigViewSet
  27 from grandchallenge.workstations.views import SessionViewSet
  28 
  29 app_name = "api"
  30 
  31 router = routers.DefaultRouter()
  32 router.register(
  33     r"cases/upload-sessions",
  34     RawImageUploadSessionViewSet,
  35     basename="upload-session",
  36 )
  37 router.register(r"cases/images", ImageViewSet, basename="image")
  38 router.register(r"workstations/sessions", SessionViewSet)
  39 router.register(
  40     r"workstations/configs",
  41     WorkstationConfigViewSet,
  42     basename="workstations-config",
  43 )
  44 router.register(r"algorithms/jobs", JobViewSet, basename="algorithms-job")
  45 router.register(
  46     r"algorithms/results", ResultViewSet, basename="algorithms-result"
  47 )
  48 router.register(
  49     r"algorithms/images", AlgorithmImageViewSet, basename="algorithms-image"
  50 )
  51 router.register(r"algorithms", AlgorithmViewSet, basename="algorithm")
  52 
  53 router.register(
  54     r"reader-studies/answers", AnswerViewSet, basename="reader-studies-answer"
  55 )
  56 router.register(
  57     r"reader-studies/questions",
  58     QuestionViewSet,
  59     basename="reader-studies-question",
  60 )
  61 router.register(r"reader-studies", ReaderStudyViewSet, basename="reader-study")
  62 router.register(r"chunked-uploads", StagedFileViewSet, basename="staged-file")
  63 
  64 router.register(
  65     r"retina/landmark-annotation",
  66     LandmarkAnnotationSetViewSet,
  67     basename="landmark-annotation",
  68 )
  69 
  70 # TODO: add terms_of_service and contact
  71 schema_view = get_schema_view(
  72     openapi.Info(
  73         title=f"{settings.SESSION_COOKIE_DOMAIN.lstrip('.')} API",
  74         default_version="v1",
  75         description=f"The API for {settings.SESSION_COOKIE_DOMAIN.lstrip('.')}.",
  76         license=openapi.License(name="Apache License 2.0"),
  77         terms_of_service=reverse_lazy(
  78             "policies:detail", kwargs={"slug": "terms-of-service"}
  79         ),
  80     ),
  81     permission_classes=(permissions.AllowAny,),
  82     patterns=[path("api/v1/", include(router.urls))],
  83 )
  84 
  85 urlpatterns = [
  86     url(
  87         r"^swagger(?P<format>\.json|\.yaml)$",
  88         schema_view.without_ui(),
  89         name="schema-json",
  90     ),
  91     # Do not namespace the router.urls without updating the view names in
  92     # the serializers
  93     path("v1/", include(router.urls)),
  94     path("auth/", include("rest_framework.urls", namespace="rest_framework")),
  95     path("", schema_view.with_ui("swagger"), name="schema-docs"),
  96 ]
  97
  ```
  --- END FILES ---
  
  Please first localize the bug based on the issue statement, and then generate a patch according to the `git diff` format fenced by three backticks.
  
  Here is an example:
  
  ```diff
  diff --git a/examples/server_async.py b/examples/server_async.py
  --- a/examples/server_async.py
  +++ b/examples/server_async.py
  @@ -313,4 +313,4 @@
   
   
   if __name__ == "__main__":
  -    asyncio.run(run_async_server("."), debug=True)
  +    asyncio.run(run_async_server(), debug=True)
  diff --git a/examples/server_sync.py b/examples/server_sync.py
  --- a/examples/server_sync.py
  +++ b/examples/server_sync.py
  @@ -313,5 +313,5 @@
   
   
   if __name__ == "__main__":
  -    server = run_sync_server(".")
  +    server = run_sync_server()
       server.shutdown()
  
  ```
  
golden_diff: diff --git a/app/grandchallenge/api/urls.py b/app/grandchallenge/api/urls.py
  --- a/app/grandchallenge/api/urls.py
  +++ b/app/grandchallenge/api/urls.py
  @@ -78,6 +78,7 @@
               "policies:detail", kwargs={"slug": "terms-of-service"}
           ),
       ),
  +    public=True,
       permission_classes=(permissions.AllowAny,),
       patterns=[path("api/v1/", include(router.urls))],
   )
  
verification_info: {"golden_diff": "diff --git a/app/grandchallenge/api/urls.py b/app/grandchallenge/api/urls.py\n--- a/app/grandchallenge/api/urls.py\n+++ b/app/grandchallenge/api/urls.py\n@@ -78,6 +78,7 @@\n             \"policies:detail\", kwargs={\"slug\": \"terms-of-service\"}\n         ),\n     ),\n+    public=True,\n     permission_classes=(permissions.AllowAny,),\n     patterns=[path(\"api/v1/\", include(router.urls))],\n )\n", "issue": "The schema is empty for unauthorised users.\nAnother problem with this - the schema is empty for unauthorised users. You need to add `public=True` to `get_schema_view`.\r\n\r\n_Originally posted by @jmsmkn in https://github.com/comic/grand-challenge.org/issues/1017#issuecomment-567254400_\n", "before_files": [{"content": "from django.conf import settings\nfrom django.conf.urls import include, url\nfrom django.urls import path\nfrom drf_yasg import openapi\nfrom drf_yasg.views import get_schema_view\nfrom rest_framework import permissions, routers\n\nfrom grandchallenge.algorithms.views import (\n    AlgorithmImageViewSet,\n    AlgorithmViewSet,\n    JobViewSet,\n    ResultViewSet,\n)\nfrom grandchallenge.cases.views import (\n    ImageViewSet,\n    RawImageUploadSessionViewSet,\n)\nfrom grandchallenge.jqfileupload.views import StagedFileViewSet\nfrom grandchallenge.reader_studies.views import (\n    AnswerViewSet,\n    QuestionViewSet,\n    ReaderStudyViewSet,\n)\nfrom grandchallenge.retina_api.views import LandmarkAnnotationSetViewSet\nfrom grandchallenge.subdomains.utils import reverse_lazy\nfrom grandchallenge.workstation_configs.views import WorkstationConfigViewSet\nfrom grandchallenge.workstations.views import SessionViewSet\n\napp_name = \"api\"\n\nrouter = routers.DefaultRouter()\nrouter.register(\n    r\"cases/upload-sessions\",\n    RawImageUploadSessionViewSet,\n    basename=\"upload-session\",\n)\nrouter.register(r\"cases/images\", ImageViewSet, basename=\"image\")\nrouter.register(r\"workstations/sessions\", SessionViewSet)\nrouter.register(\n    r\"workstations/configs\",\n    WorkstationConfigViewSet,\n    basename=\"workstations-config\",\n)\nrouter.register(r\"algorithms/jobs\", JobViewSet, basename=\"algorithms-job\")\nrouter.register(\n    r\"algorithms/results\", ResultViewSet, basename=\"algorithms-result\"\n)\nrouter.register(\n    r\"algorithms/images\", AlgorithmImageViewSet, basename=\"algorithms-image\"\n)\nrouter.register(r\"algorithms\", AlgorithmViewSet, basename=\"algorithm\")\n\nrouter.register(\n    r\"reader-studies/answers\", AnswerViewSet, basename=\"reader-studies-answer\"\n)\nrouter.register(\n    r\"reader-studies/questions\",\n    QuestionViewSet,\n    basename=\"reader-studies-question\",\n)\nrouter.register(r\"reader-studies\", ReaderStudyViewSet, basename=\"reader-study\")\nrouter.register(r\"chunked-uploads\", StagedFileViewSet, basename=\"staged-file\")\n\nrouter.register(\n    r\"retina/landmark-annotation\",\n    LandmarkAnnotationSetViewSet,\n    basename=\"landmark-annotation\",\n)\n\n# TODO: add terms_of_service and contact\nschema_view = get_schema_view(\n    openapi.Info(\n        title=f\"{settings.SESSION_COOKIE_DOMAIN.lstrip('.')} API\",\n        default_version=\"v1\",\n        description=f\"The API for {settings.SESSION_COOKIE_DOMAIN.lstrip('.')}.\",\n        license=openapi.License(name=\"Apache License 2.0\"),\n        terms_of_service=reverse_lazy(\n            \"policies:detail\", kwargs={\"slug\": \"terms-of-service\"}\n        ),\n    ),\n    permission_classes=(permissions.AllowAny,),\n    patterns=[path(\"api/v1/\", include(router.urls))],\n)\n\nurlpatterns = [\n    url(\n        r\"^swagger(?P<format>\\.json|\\.yaml)$\",\n        schema_view.without_ui(),\n        name=\"schema-json\",\n    ),\n    # Do not namespace the router.urls without updating the view names in\n    # the serializers\n    path(\"v1/\", include(router.urls)),\n    path(\"auth/\", include(\"rest_framework.urls\", namespace=\"rest_framework\")),\n    path(\"\", schema_view.with_ui(\"swagger\"), name=\"schema-docs\"),\n]\n", "path": "app/grandchallenge/api/urls.py"}], "after_files": [{"content": "from django.conf import settings\nfrom django.conf.urls import include, url\nfrom django.urls import path\nfrom drf_yasg import openapi\nfrom drf_yasg.views import get_schema_view\nfrom rest_framework import permissions, routers\n\nfrom grandchallenge.algorithms.views import (\n    AlgorithmImageViewSet,\n    AlgorithmViewSet,\n    JobViewSet,\n    ResultViewSet,\n)\nfrom grandchallenge.cases.views import (\n    ImageViewSet,\n    RawImageUploadSessionViewSet,\n)\nfrom grandchallenge.jqfileupload.views import StagedFileViewSet\nfrom grandchallenge.reader_studies.views import (\n    AnswerViewSet,\n    QuestionViewSet,\n    ReaderStudyViewSet,\n)\nfrom grandchallenge.retina_api.views import LandmarkAnnotationSetViewSet\nfrom grandchallenge.subdomains.utils import reverse_lazy\nfrom grandchallenge.workstation_configs.views import WorkstationConfigViewSet\nfrom grandchallenge.workstations.views import SessionViewSet\n\napp_name = \"api\"\n\nrouter = routers.DefaultRouter()\nrouter.register(\n    r\"cases/upload-sessions\",\n    RawImageUploadSessionViewSet,\n    basename=\"upload-session\",\n)\nrouter.register(r\"cases/images\", ImageViewSet, basename=\"image\")\nrouter.register(r\"workstations/sessions\", SessionViewSet)\nrouter.register(\n    r\"workstations/configs\",\n    WorkstationConfigViewSet,\n    basename=\"workstations-config\",\n)\nrouter.register(r\"algorithms/jobs\", JobViewSet, basename=\"algorithms-job\")\nrouter.register(\n    r\"algorithms/results\", ResultViewSet, basename=\"algorithms-result\"\n)\nrouter.register(\n    r\"algorithms/images\", AlgorithmImageViewSet, basename=\"algorithms-image\"\n)\nrouter.register(r\"algorithms\", AlgorithmViewSet, basename=\"algorithm\")\n\nrouter.register(\n    r\"reader-studies/answers\", AnswerViewSet, basename=\"reader-studies-answer\"\n)\nrouter.register(\n    r\"reader-studies/questions\",\n    QuestionViewSet,\n    basename=\"reader-studies-question\",\n)\nrouter.register(r\"reader-studies\", ReaderStudyViewSet, basename=\"reader-study\")\nrouter.register(r\"chunked-uploads\", StagedFileViewSet, basename=\"staged-file\")\n\nrouter.register(\n    r\"retina/landmark-annotation\",\n    LandmarkAnnotationSetViewSet,\n    basename=\"landmark-annotation\",\n)\n\n# TODO: add terms_of_service and contact\nschema_view = get_schema_view(\n    openapi.Info(\n        title=f\"{settings.SESSION_COOKIE_DOMAIN.lstrip('.')} API\",\n        default_version=\"v1\",\n        description=f\"The API for {settings.SESSION_COOKIE_DOMAIN.lstrip('.')}.\",\n        license=openapi.License(name=\"Apache License 2.0\"),\n        terms_of_service=reverse_lazy(\n            \"policies:detail\", kwargs={\"slug\": \"terms-of-service\"}\n        ),\n    ),\n    public=True,\n    permission_classes=(permissions.AllowAny,),\n    patterns=[path(\"api/v1/\", include(router.urls))],\n)\n\nurlpatterns = [\n    url(\n        r\"^swagger(?P<format>\\.json|\\.yaml)$\",\n        schema_view.without_ui(),\n        name=\"schema-json\",\n    ),\n    # Do not namespace the router.urls without updating the view names in\n    # the serializers\n    path(\"v1/\", include(router.urls)),\n    path(\"auth/\", include(\"rest_framework.urls\", namespace=\"rest_framework\")),\n    path(\"\", schema_view.with_ui(\"swagger\"), name=\"schema-docs\"),\n]\n", "path": "app/grandchallenge/api/urls.py"}]}