Skip to content

Remove unused swagger_auto_schema import and decorator#2

Closed
Copilot wants to merge 2 commits intofeature/dockerizefrom
copilot/sub-pr-1
Closed

Remove unused swagger_auto_schema import and decorator#2
Copilot wants to merge 2 commits intofeature/dockerizefrom
copilot/sub-pr-1

Conversation

Copy link

Copilot AI commented Nov 27, 2025

Addresses feedback from #1: the swagger_auto_schema decorator doesn't work properly for function-based views without additional wrapper configuration.

Changes

  • Remove @swagger_auto_schema(method='get') decorator from health view
  • Remove unused swagger_auto_schema import

The @require_http_methods(["GET"]) decorator already restricts the endpoint to GET requests.

# Before
@require_http_methods(["GET"])
@swagger_auto_schema(method='get')  # Non-functional for FBVs
def health(request: HttpRequest):
    return HttpResponse(status=200)

# After
@require_http_methods(["GET"])
def health(request: HttpRequest):
    return HttpResponse(status=200)

✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

Co-authored-by: hepheir <19310326+hepheir@users.noreply.github.com>
Copilot AI changed the title [WIP] Update Dockerfile based on review feedback Remove unused swagger_auto_schema import and decorator Nov 27, 2025
Copilot AI requested a review from hepheir November 27, 2025 05:08
@hepheir
Copy link
Member

hepheir commented Nov 27, 2025

swagger auto schema가 정상동작하지 않는다고 해서 제거하기보다는, 다른 방법으로 Swagger 적용이 이루어 질 수 있도록 해볼 것이기에 본 PR은 반려하겠습니다.

@hepheir hepheir closed this Nov 27, 2025
hepheir added a commit that referenced this pull request Nov 27, 2025
…BV -> CBV 전환)

Function Based View에는 `swagger_auto_schema` 가 정상적으로 적용되지 않는 이슈를 해결했습니다. (#2)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants