Home Applications objectscript-openapi-definition

objectscript-openapi-definition

InterSystems does not provide technical support for this project. Please contact its developer for the technical assistance.
4.5
1 reviews
0
Awards
790
Views
795
IPM installs
4
3
Details
Releases (15)
Reviews (1)
Issues
Articles (1)
Dependants (3)
The objectif of this library is to generate the ObjectScript Class from an OpenApi defintion.

What's new in this version

  • fix model classes with dots in properties

objectscript-openapi-definition

This is a library for InterSystems ObjectScript.

The objectif of this library is to generate the ObjectScript Class from an OpenApi defintion.

HowTo use it

To use class definition generator

Open a terminal and lunch this classmethod as this :

zw ##class(Grongier.OpenApi.Definition).Process("PetShop.spec")

Result is a new package in eg : PetShop.Definition with all the definition class ready to use.

Installation with ZPM

zpm "install objectscript-openapi-definition"

Installation with github

Clone/git pull the repo into any local directory

git clone https://github.com/grongierisc/objectscript-openapi-definition

Open the terminal in this directory and run:

docker-compose build

Run the IRIS container with your project:

docker-compose up -d

How to Test it

Open IRIS terminal:

docker-compose exec iris iris session iris
USER>zn "IRISAPP"
IRISAPP>zw ##class(Grongier.OpenApi.Definition).Process("PetShop.spec")

Version 1.2.0+ support now OpenAPI Version 3, use DefinitionV3 class :

Set specification = <Dynamic Object with the OpenAPI specification v3>
Set generator = ##class(Grongier.OpenApi.DefinitionV3).%New(specification, "targetpackage")
Set sc = generator.GenerateClasses()

What’s inside the repository

Dockerfile

The dockerfile, create IRISAPP namespace, install code and the PetShop example.

Made with
Install
zpm install objectscript-openapi-definition download archive
Version
1.3.228 Sep, 2023
Category
Developer Environment
Works with
InterSystems IRISInterSystems IRIS for Health
First published
06 Apr, 2020
Last edited
28 Sep, 2023
Last checked by moderator
07 Feb, 2025Works