Releases: pyhoon/web-api-server-b4j
Web API Server v3.20
What's New:
- Changed in UI and Theme
- Moved CSS and JS in main.html to separate files (main.css and main.js)
- Colour changed using custom CSS in main.css instead of Bootstrap variables
- Replace label for collapsible button with endpoint description instead of showing the url link
- Same for authentication indicator is put next to the description - showing Basic or Token when applicable
- New BuildMethods sub is used to build API documentation programmatically
- Now works when building project straight in Release mode
- ReadHandlers sub is no longer required
- However, BuildMethods sub can be use together with ReadHandlers sub to override its generated properties
- All commented hashtags are now removed for a cleaner template
- Note that commented hashtags are still working in Debug mode and can be used to generate static help.html for production in old ways
- New commented hashtag (e.g ' #POST) *Note: all commented hashtags are case insensitive
- Allow to use any name for naming Method sub in API handlers
- Not necessary to start the Method name with a Verb e.g CreateNewCategory instead of PostCategory
- The hashtag must be put on the same line with sub definition
- Support for multi-line json body format (for POST and PUT endpoints)
- (old way) HTML syntax in one line (i.e using <br> and tags)
- (new) String Literals
- (new) JSON Map *must be valid
- New Utility module to generate JS files
- Works during Debug or Release mode
- It is executed by calling CreateJSFiles sub when InitServer is executed
- The files are generated based on SimpleResponse settings
- New Configurable sub for additional configuration
- This helps to simplify a bit on configs in Main module
- Developer only need to focus on 3 subs (in Main module) in most use cases
- AppStart
- Configurable
- CreateDatabase
Web API Server v3.10
What's New:
- Fix error in Main module (line #129) when selecting MySQL
- New ServerUrl in ServerConfigurations type
- ConfigurePort sub replaces ConfigureSSL
- Remove ApplySettings sub
- Updated HelpHandler
- New VerbSection type to simplify some methods signature
- GenerateVerbSection now accepting a single Verbsection type
- GenerateDocItem now accept a single Map
- GenerateLink sub updated using ServerUrl
- GenerateNoApiLink sub added for adding non api handler to documentation
- ReadHandlers sub updated
- JavaScript updated
- fade-out and fade-in animation on bootstrap alert when submitting the endpoint again
- html elements using id instead of button id
- Some code for basic and token authentication support
- Standardize coding format (removed ending semicolons and replaced single quote with double quotes)
- help.html loads server url based on config.ini during production
Web API Server v3.00
What's New
Version: 3.00
- (new) depends on WebApiUtils v3.02
- (new) depends on MiniORMUtils v1.14
- (fix) issue with SSL settings in Release
- (fix) issue in FindApiHandler to check missing keywords key in request body
- (update) new Code Snippets to WebApiUtils for creating new Web and Api handlers
- (update) rename JavaScripts files name and move from js to scripts folder inside www/assetst inside B4J additional libraries folder.
Web API Server v2.08
What's New
Version: 2.08
- (new) WebApiUtils v2.08
- (new) MiniORMUtils v1.13
- (new) WebAPIController v1.07
- (change) Use DbFile instead of DbName for SQLite in config.ini
- (change) Move code from ConfigureDatabase sub to Initialize sub in DatabaseConfiguration class
- (remove) Code for Firebird, PostgreSQL and MS SQL
Rename to "Web API Server (2.08).b4xtemplate" and put inside B4J additional libraries folder.
Web API Server v2.07
What's New
Version: 2.07
- (new) WebApiUtils v2.07
- (new) MiniORMUtils v1.11
- (new) WebAPIController v1.06
- (new) Main module
- SHOW_API_ICON to control API icon visible on frontend top navbar
- (new) ServerConfiguration class
- setEnableHelp to disable API Documentation and icon in frontend top navbar
- setSimpleResponse replaces 3 old variables
- (change) ServerConfiguration class
- rename some variables
- change some Public subs to Private
- (change) Some index.html files deleted
Web API Server v2.06
What's New
Version: 2.06
(new) WebApiUtils v2.06
(new) MiniORMUtils v1.10
(new) WebAPIController v1.05
(new) Main module is cleaner
(new) Added ServerConfiguration class
(new) Added DatabaseConfiguration class
(new) Added empty index.html files into assets folders
(new) FindController - case insensitive and wildcard search
(change) Table tbl_category renamed to tbl_categories
(change) ServerConfiguration Update sub renamed to Finalize
(change) better handling of default values in config.ini
(fix) bug in v2.06 beta 1, no database set by default in config.ini
(fix) bug in v2.06 beta 2, PostProduct line#233 in ProductsController causing all data inserted as Timestamp
Web API Server v2.05
What's New
Version: 2.05
- (new) MinimaList API Server (version 2.05) as a separate template
- (new) MiniORMUtils (version 1.07)
- (new) MinimaListUtils (version 1.02)
- (new) WebApiController (version 1.04)
- (new) Use a single public variable SimpleResponse instead of 3 different public variables.
- (update) HelpHandler - JavaScript files for search is no longer generated during compilation.
The files are now keep inside assets/js folder instead. SimpleResponse and standard JSON are supported.
Thanks to projects Support Ticketing System and Shao.
- (update) Some JavaScript files have been renamed using period instead of dash.
Web API Server v2.04
Web API Template 2
version: 2.04
Size: 447KB +
What's New?
- (new) Web Front-end with CRUD demo (similar to version 1)
- (new) B4X Web API Client (version 1.05) supported (note: set ConfigureResponse(False))
- (new) WebApiUtils.b4xlib (version 2.04) (Utility and WebUtils modules merged)
- (new) WebAPIController (version 1.03) is backed
- (new) MinimaListUtils.b4xlib (version 1.00)
- (new) Database support (tested with SQLite and MySQL)
- (new) Build Standalone Package supported
- (new) Additional library for jdbc connector is set by selecting a Build configuration during Debug
- (new) ConfigureServer subs are now enabled by passing Boolean value instead of commenting the line
- (new) Utilize B4J v10.00 Code Snippets feature
- (new) DatabaseConnector (for SQLite, MySQL, SQL Server, Firebird, PostgreSQL, DBF)
- (new) SeedData for MinimaList
- (new) ConfigureResponse added SimpleResponseDataKey (when SimpleResponseFormat = "Map", default is data)
- (new) JavaScript files for supporting SimpleResponseFormat
- (new) ReturnApiResponse sub added
- (fixed) ConfigureServer subs order changed
- (fixed) ConfigurePort
- (fixed) ConfigurePaths
- (fixed) ConfigureElements list element indices during Debug
- (fixed) ConfigureHandlers
- (fixed) ConfigureResponse added SimpleResponseFormat = "Auto"
- (removed) Timezone setting
- (removed) DataController class
- (removed) ReturnSimpleHttpResponse
- (removed) MinimaListController (version 1.05) -> succeeded by WebAPIController
- (updated) MinimaList subs are renamed
- (updated) ReturnHttpResponse
- (updated) All Controllers
- (updated) All Handlers
- (other) Clean up unused code and many other bugs fixes
I am happy to release this major update on this project template!
To use this template, copy all the attachments in post #1 to B4J additional libraries folder and create a new project from B4J menu New. Default database is SQLite.
To seed dummy data (when using MinimaList), browse to:
http://127.0.0.1:19800/web/?seed=1
This project has been tested many many times. Please report bugs if you found any.
Web API Server v2.03
Update README.md