Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Embed swagger UI #314

Merged
merged 11 commits into from
Apr 14, 2024
Merged

Embed swagger UI #314

merged 11 commits into from
Apr 14, 2024

Conversation

caco3
Copy link
Contributor

@caco3 caco3 commented Apr 13, 2024

This PR embeds the Swagger UI into the Web Interface. To keep the additionally required flash usage low, most files get pulled from a CDN.

I also renamed the last tab Forum to Help and extended the tab with a section for the REST API documentation.
The great advantage for an embedded Swagger UI is to be able to directly send the cmds to the device.

Updated UI

grafik

Swagger UI

grafik

Direct calls to the device

grafik

@caco3 caco3 marked this pull request as ready for review April 13, 2024 19:59
@tueddy
Copy link
Collaborator

tueddy commented Apr 13, 2024

Just tested, works fine!

@tueddy
Copy link
Collaborator

tueddy commented Apr 14, 2024

@caco3 Looks good so far!
One issue i found, Web.cpp is getting recompiled even nothing has changed:

Building in release mode
Compiling .pio\build\lolin_d32_pro_sdmmc_pe\src\Web.cpp.o
Linking .pio\build\lolin_d32_pro_sdmmc_pe\firmware.elf

We had this before and #293 fixed the issue.
Maybe same here?

@caco3
Copy link
Contributor Author

caco3 commented Apr 14, 2024

Good point, I changed it to make sure the mtime does not change.

BTW, this PR adds 3544 bytes to the flash usage. If this is a problem, we could create a define in settings.h so it could be added optionally. The static RAM usage is unchanged although we added 3 extra files to the webserver.

@tueddy
Copy link
Collaborator

tueddy commented Apr 14, 2024

Tested against Lolin D32 (without PSRAM) & additional flash usage is OK

@tueddy tueddy merged commit 8c80d84 into biologist79:dev Apr 14, 2024
10 checks passed
@caco3 caco3 deleted the embed-swagger-ui branch April 14, 2024 18:36
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