Skip to content

Conversation

@sindrehan
Copy link
Member

@sindrehan sindrehan commented Sep 25, 2023

This way
inline
instead of this way
redoc

Some considerations:

  • The example code snippets are an extension of the OpenAPI protocol and aren't supported by the swagger-ui plugin
  • Bundling the docs for offline use does not appear to work when doing it this way
  • The render_swagger plugin supports output from redoc, but it's even more obvious that it's just an iframe with external content. Here's an example.

@codecov
Copy link

codecov bot commented Sep 25, 2023

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 76.50%. Comparing base (2d5ce98) to head (31c9623).
⚠️ Report is 33 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #152      +/-   ##
==========================================
+ Coverage   76.37%   76.50%   +0.12%     
==========================================
  Files          11       11              
  Lines        1672     1664       -8     
==========================================
- Hits         1277     1273       -4     
+ Misses        395      391       -4     
Flag Coverage Δ
macos-latest_3.10 76.50% <ø> (+0.12%) ⬆️
macos-latest_3.11 76.50% <ø> (+0.12%) ⬆️
macos-latest_3.12 76.50% <ø> (+0.12%) ⬆️
macos-latest_3.13 76.50% <ø> (+0.12%) ⬆️
ubuntu-latest_3.10 76.50% <ø> (+0.12%) ⬆️
ubuntu-latest_3.11 76.50% <ø> (+0.12%) ⬆️
ubuntu-latest_3.12 76.50% <ø> (+0.12%) ⬆️
ubuntu-latest_3.13 76.50% <ø> (+0.12%) ⬆️
windows-latest_3.10 76.50% <ø> (+0.12%) ⬆️
windows-latest_3.11 76.50% <ø> (+0.12%) ⬆️
windows-latest_3.12 76.50% <ø> (+0.12%) ⬆️
windows-latest_3.13 76.50% <ø> (+0.12%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@sindrehan
Copy link
Member Author

sindrehan commented Sep 25, 2023

Figured out how to use the render_swagger plugin to show the output from redoc
redoc-light
Doesn't work very well with dark mode though
redoc-dark

Pretty sure that's fixable with some css/js magic.

Here's an example of a dark mode for redoc, redark

@sindrehan
Copy link
Member Author

I came across this plugin for mkdocs:
https://www.neoteroi.dev/mkdocs-plugins/web/oad/

Might be a better approach than trying to inline the redoc output.

@follesoe
Copy link
Member

Great work @sindrehan 🙌

@sindrehan
Copy link
Member Author

I have two PRs open to add custom templates (Neoteroi/essentials-openapi#61 / Neoteroi/mkdocs-plugins#78), but with those implemented rendering the openapi docs works quite well.

Screenshot_2025-11-19_12-40-12

@sindrehan sindrehan marked this pull request as ready for review December 17, 2025 10:59
@sindrehan sindrehan merged commit b2c5a2e into master Dec 17, 2025
18 checks passed
@sindrehan sindrehan deleted the inline-http-docs branch December 17, 2025 11:22
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.

3 participants