Server side generator
1. Setup a new OpenEdge project
- Open Progress Developer studio
- Create a new OpenEdge project "openapi_server"
Project name: openapi_server
General project: OpenEdge Basic
- Press finish
2. Launch VsCode plugin
VSCode Command Palette (Ctrl + Shift + P) and chose "Launch OpenAPI generator 😎 (vscode sync)"
Example specs
Download this example spec and select this file in the plugin
Generation: Server
Languages: abl-pasoe
Select file: ...
Extraction directory: <oe project dir>
Excluded files/patterns: Use this when files are customized.
Package hierarchy:
{package}/ # Base package (e.g., OpenAPI-server)
├── BusinessLogic/ # Business logic implementation
├── Helpers/ # Helper classes
├── Models/ # Data models
├── ApiRequests/ # API request models
├── Builder/ # Model builders
├── Resources/ # Helper files
└── ServiceAdapters/ # PASOE mode service adapters
3. Execute generated PASOE resources
Under {package}/Resources there is a file "setup_pasoe_windows.ps1" Check configuration alligns with your envrionment:
$env:dlc="C:\Progress\OpenEdge\128"
$env:path="$env:dlc\bin;$env:path"
$env:wrkdir="C:\work\dlc128"
# Set pasoe config
$pasoe_name="pas_openapi"
$abl_app="abl_openapi"
$web_app="ROOT"
# Set PDS project path
$pds_project_openapi_path="G:\Progress Software\workspace\kh-it\demo_openapi\openapi_server" # This will be used to add to the propath of our pasoe
Execution flags:
$execute_create_pasoe=$true
$execute_pasoe_add_to_propath=$true
$execute_pasoe_set_handlers=$true
$execute_pasoe_start=$true
Run the powershell and the pasoe is up and running to serve the openapi web calls.
4. Working demo in postman
Instantly you have a working demo in postman.
- Drag & drop your openapi spec in postman
- Change in the collection the variable baseUrl to
http://localhost:28000/web
- Run request