support of XML
Thanks Lorenzo
This is a library for InterSystems ObjectScript.
The objectif of this library is to generate the ObjectScript Class from an OpenApi defintion.
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.
zpm "install objectscript-openapi-definition"
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
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()
The dockerfile, create IRISAPP namespace, install code and the PetShop example.
support of XML
Thanks Lorenzo
Add OpenAPI v3 support
Management of "-" and "_" in object names.
Rollback commit string -> %String to %VarString
Add merge pull from lorenzo.
Add allOf support, simple type definitions support.
Update description
Rollback on underscore changes
Update module.xml
ProcedureBlock to true.
Handle OpenAPI 3.0 enums
Add support of enums
Update with example and community article
Fix module.xml
Update module.xml for zpm
Initial Release