B4J Library [Web] WebApiUtils

Version : 6.99 (last version)
A utility class to simplify the development for server app using project template Pakai Server v6 (f.k.a. Web API Server).

GitHub:
https://github.com/pyhoon/WebApiUtils-B4J

HelpHandler, the API Documentation class is now included as a class template.
It depends on MiniHtml2, MiniCSS and MiniJS.
The HelpHandler is now using Bootstrap 5, HTMX and AlpineJS for the frontend.
Alternatively, a swagger-ui can be added to Pakai Server project.

Files:
  • swagger.zip
  • WebApiUtils.b4xlib
Depends on:
  • JavaObject
  • Json
  • jStringUtils
  • Xml2Map

Please report bugs if you found any or start a new thread for any question.
 

Attachments

  • swagger.zip
    511.3 KB · Views: 2
  • WebApiUtils.b4xlib
    26.6 KB · Views: 2
Last edited:

aeric

Expert
Licensed User
Longtime User
Version: 5.70

What's New​

  1. Updated ProcessOrderedXmlFromList sub
  2. Updated ProcessOrderedXmlFromMap sub
 

aeric

Expert
Licensed User
Longtime User
Version: 5.80

What's New​

  1. Update ProcessOrderedXmlFromList sub
  2. Added Snippets
    • MiniHtml Class Global
    • MiniHtml Handler
 

aeric

Expert
Licensed User
Longtime User
Version : 6.00

What's New​


HelpHandler, the API Documentation class is now included as a class template.
It depends on MiniHtml2, MiniCSS and MiniJS.
The HelpHandler is now using Bootstrap 5, HTMX and AlpineJS for the frontend.
 

aeric

Expert
Licensed User
Longtime User
Version : 6.01

What's New​

  1. Fixed MiniHtml Handler.txt snippet

Version : 6.30

What's New​

  1. Changes in Code Snippets
  • (added) MiniHtml Helper Module.txt
  • (added) MiniORM Model Type.txt
  • (updated) MiniHtml Handler.txt
  • (updated) Api Handler.txt
  • (updated) Web Handler.txt
  • (removed) SetApiMessage.txt
  • (removed) Api Class Globals.txt
  • (removed) Web Class Globals.txt
  • (removed) MiniHtml Class Globals.txt
 

aeric

Expert
Licensed User
Longtime User
Version : 6.80

What's New​

  1. Changes in Code Snippets to support Pakai Server v6.80
  • (added) Handler (Api).txt
  • (added) Handler (Web).txt
  • (removed) Api Handler.txt
  • (removed) Web Handler.txt
  • (removed) MiniHtml Handler.txt
  • (removed) MiniHtml Helper Module.txt
  • (removed) MiniHtml Model Type.txt
 

aeric

Expert
Licensed User
Longtime User
Version : 6.96

What's New​

  1. OpenAPI 3.0 Spec (Swagger-UI) integration
  2. Updated HelpHandler.b4x_excluded

A detail README.md is added on GitHub repo.
 
Last edited:

aeric

Expert
Licensed User
Longtime User
Version : 6.99 (last version)

What's New​

  1. New /help?format=snippets endpoint generates B4X HttpJob client code for every API endpoint
  2. New GenerateAppSnippet sub in HelpHandler builds ready-to-use B4X subroutines with URL construction, path params, auth headers, and async job handling
  3. Redesigned Swagger UI with split-pane layout (Swagger console left, B4X snippet sidebar right)
  4. Live B4X code panel with Sync, Copy All, Hide buttons
  5. "Toggle B4X Snippets" button injected into Swagger top bar (desktop)
  6. Mobile slide-out drawer with floating toggle and dark mode buttons
  7. Authenticate = "token" demo added to PostProduct in BuildMethods
  8. Cleaned up dead comments in ServeOpenApiJson
  9. Version bumped to 6.99 across all modules
New B4X Snippet Panel and Mobile responsive view with theme toggler

Desktop mode
Mobile mode
 
Top