Skip to content

Render OpenAPI Schema with Swagger UI#427

Draft
Abh1ramManugur1 wants to merge 6 commits into
scimma:mainfrom
Abh1ramManugur1:418-openapi-spec
Draft

Render OpenAPI Schema with Swagger UI#427
Abh1ramManugur1 wants to merge 6 commits into
scimma:mainfrom
Abh1ramManugur1:418-openapi-spec

Conversation

@Abh1ramManugur1

Copy link
Copy Markdown
Collaborator

Addresses #418

Incorporated new drf-spectacular module to render OpenAPI Spec, as a result new nested serializers had to be added to serializers.py

Extended schema to incorporate view functions not automatically caught by drf-spectacular, excluded transient get legacy endpoint

modern support for generating OpenAPI Schema
excluded get_transient legacy endpoint due to plans for removal
…erializers

avoid incorrect output by drf-spectacular
Comment thread app/app/settings.py Outdated
@manning-ncsa

Copy link
Copy Markdown
Collaborator

This looks great so far! I'm experimenting with the interactive feature. By copying the sessionId from the auth cookie, I was able to interactively query and create an Alias object. I also verified that it appears on the transient result page.

Screenshot from 2026-06-22 13-02-12 Screenshot from 2026-06-22 13-05-26 Screenshot from 2026-06-22 13-06-10 Screenshot from 2026-06-22 13-06-49

Comment thread app/app/urls.py Outdated
@manning-ncsa

Copy link
Copy Markdown
Collaborator

Please use a code linter like flake8 and autopep8 in your IDE so we don't have to make commits like cfb5d4e.

@manning-ncsa

Copy link
Copy Markdown
Collaborator

Are the new serializer functions like CutoutNestedSerializer independent of the originals like CutoutSerializer used by the /api/[object] endpoints? We need to ensure if possible that there is only one serializer defined per model because otherwise we risk a divergence between the OpenAPI spec and the actual API responses.

@manning-ncsa manning-ncsa marked this pull request as draft June 23, 2026 15:35
@Abh1ramManugur1

Copy link
Copy Markdown
Collaborator Author

They are independent. I introduced the nested serializers to address warnings with the drf-spectacular module that were occurring due to the default name for nested serializers simply being 'NestedSerializer' leading to conflict and incorrect output on swagger-ui. That being said these aren't strictly necessary, as without them swagger ui would not display nested serializers properly which may be acceptable for our usage of it.

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