Home Applications openapi-server-gen

openapi-server-gen

This application is not supported by InterSystems Corporation. Please be notified that you use it at your own risk.
5
1 reviews
0
Awards
193
Views
46
IPM installs
2
0
Details
Releases
Reviews
Issues
Pull requests
Dependencies
Dependants
IRIS server-side REST class generator from OpenAPI specification

What's new in this version

  • Add missing %JSON.Adaptor super class to generated models.

Gitter
Quality Gate Status
Reliability Rating

License: MIT

openapi-server-gen

Important : To make maintenance easier, this package has been merged with openapi-suite ( Link to GitHub repository ). Consider this package deprecated and replaced by openapi-suite (classes have kept the same name)

This is a library to generate server-side REST classes for intersystems IRIS.
openapi-server-gen is piece of a bigger project openapi-suite ( OEX Link - GitHub ).

Installation zpm

zpm "install openapi-server-gen"

optional swagger-ui

zpm "install swagger-ui"

Installation docker

git clone git@github.com:lscalese/openapi-server-gen.git
cd openapi-server-gen
docker-compose up -d

Usage

Generate petstore server-side class from OpenAPI 3 specification

Open an IRIS terminal :

Set applicationName = "petstoresrv" ; this is the package name for the generated classes.  
Set webApplication = "/petstore/api" ; webapplication name to create, leave empty if you don't want create the web apps
Set sc = ##class(dc.openapi.server.ServerAppGenerator).Generate(applicationName, "https://petstore3.swagger.io/api/v3/openapi.json", webApplication)

Explorer generated class in petstoresrv package.

If you install swagger-ui you can open this page http://localhost:52797/swagger-ui/index.html and then explore http://localhost:52796/petstore/api/_spec

More information about this package will be available soon on OpenExchange.

Made with
Install
zpm install openapi-server-gen download archive
Version
1.0.127 Sep, 2023
ObjectScript quality test
Category
Solutions
Works with
InterSystems IRIS
First published
24 Jan, 2023
Last checked by moderator
05 Mar, 2024Works