Skip to content

Move from drf-yasg to drf-spectacular #1340

Merged
sambles merged 26 commits intomainfrom
feature/drg_yasg_to_spectacular__claude
Mar 31, 2026
Merged

Move from drf-yasg to drf-spectacular #1340
sambles merged 26 commits intomainfrom
feature/drg_yasg_to_spectacular__claude

Conversation

@sambles
Copy link
Copy Markdown
Contributor

@sambles sambles commented Feb 12, 2026

Move from drg-yasg to spectacular

  • Updated API spec to use OpenAPI 3
  • Swagger generator is now drf-spectacular
  • Update API spec tester

@sambles sambles changed the title Move from drg-yasg to spectacular Move from drf-yasg to drf-spectacular Feb 12, 2026
@sambles sambles requested review from SkylordA and vinulw February 16, 2026 10:24
Copy link
Copy Markdown
Contributor

@SkylordA SkylordA left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So I've tested it locally.
Logging in on http://ui.oasis.local/ seems to work fine
Logging in via the "Authorize" button on http://ui.oasis.local/api/ doesn't work

Not sure what the fix exactly would be, whether it's a spectacular config issue or authentik (and maybe keycloak).

P.S. I think by default drf-spectacular uses authorizationCode WITH PKCE, which is why there is that extra "code=" bit at the end of the URL. I don't think this is important for now but it's just worth noting that the OIDC was setup for authorizationCode WITHOUT PKCE, so maybe the spectacular settings should be updated for consistency too.

@SkylordA
Copy link
Copy Markdown
Contributor

Forgot to mention, but there is an extra cookieAuth section added now on the Authorize button popup. I've ignored this for now, not sure if you want to keep this or not.

@sambles sambles force-pushed the feature/drg_yasg_to_spectacular__claude branch from ef86094 to 26989c1 Compare March 11, 2026 10:25
@sambles sambles requested a review from SkylordA March 11, 2026 10:58
Copy link
Copy Markdown
Contributor

@SkylordA SkylordA left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks good now, auth working on api and ui pages

@SkylordA SkylordA linked an issue Mar 17, 2026 that may be closed by this pull request
Comment thread src/server/oasisapi/analyses/v2_api/viewsets.py
@sambles sambles requested a review from vinulw March 30, 2026 15:56
Copy link
Copy Markdown
Contributor

@vinulw vinulw left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚀

@sambles sambles merged commit 8f49f47 into main Mar 31, 2026
28 of 30 checks passed
@sambles sambles deleted the feature/drg_yasg_to_spectacular__claude branch March 31, 2026 15:13
This was referenced Apr 2, 2026
@awsbuild awsbuild added this to the 2.5.2 milestone Apr 3, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

Convert drf-yasg to drf-spectacular.

4 participants