Skip to content

Make Swagger UI 'Try it out' optional, disabled by default#1236

Merged
anfimovdm merged 1 commit into
masterfrom
disable-swagger-try-it-out
Jun 27, 2026
Merged

Make Swagger UI 'Try it out' optional, disabled by default#1236
anfimovdm merged 1 commit into
masterfrom
disable-swagger-try-it-out

Conversation

@anfimovdm

Copy link
Copy Markdown
Contributor

Add a swagger_try_it_out_enabled setting (default False). When it's not enabled, the FastAPI app is created with supportedSubmitMethods=[] so the Swagger UI execute button is removed and endpoints can't be run against the live server from /docs. The schema stays browsable.

Closes AlmaLinux/build-system#538

Add a swagger_try_it_out_enabled setting (default False). When it's not
enabled, the FastAPI app is created with supportedSubmitMethods=[] so the
Swagger UI execute button is removed and endpoints can't be run against the
live server from /docs. The schema stays browsable.

Closes AlmaLinux/build-system#538
@anfimovdm anfimovdm merged commit d6c2e7b into master Jun 27, 2026
2 of 4 checks passed
@anfimovdm anfimovdm deleted the disable-swagger-try-it-out branch June 27, 2026 23:02
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.

Make "Try it out" button for Swagger UI optional

1 participant