
Initial Release
This tool is an OpenAPI Generator designed specifically for Intersystems IRIS. It ingests an OpenAPI Specification (Swagger) document and automatically produces robust, maintainable, and executable ObjectScript code to validate your IRIS REST APIs.
🚧 Note: Some data types aren’t still covered, like List and File. Those will be added in the next releases.
Key Features:
Target Audience: IRIS developers, QA engineers, and DevOps teams looking to integrate automated testing into their Intersystems IRIS ObjectScript projects.
Make sure you have git and Docker desktop installed.
Clone/git pull the repo into any local directory
git clone https://github.com/musketeers-br/iris-oas-test-gen.git
cd iris-oas-test-gen
chmod -R o+w tests # allow container processes to write in the tests directory
Build and run InterSystems IRIS in container:
Note: Users running containers on a Linux CLI, should use “docker compose” instead of “docker-compose”
See Install the Compose plugin
docker-compose up -d
With the container built and running, let’s access the IRIS terminal
docker exec -it iris-oas-test-gen-iris-1 /bin/bash
iris session iris -U IRISAPP
Now, we can generate the tests classes. For this example, this toy REST API specification will be used.
Set openapiFile = "/home/irisowner/dev/assets/person-api.json"
Set outputDir = "/tmp/output"
Write ##class(dc.musketeers.irisOasTestGen.Main).Run(openapiFile, outputDir)
Halt
By default the output files are stored in /tmp/output/src. Let’s copy them to the mounted volume and allow edition.
cp -r /tmp/output/src /home/irisowner/dev/tests
chmod -R o+w /home/irisowner/dev/tests/src # allow edition in the host machine
exit
Now open VSCode on the project dir.
code .
You can check the generated files inside dir tests.

