iris-json-schema
InterSystems IRIS JSON Schema support
Procedures to use this app
- Clone/git pull the repo into any local directory
$ git clone https://github.com/yurimarx/iris-json-schema.git
- Open the terminal in this directory and run:
$ docker-compose build
- Run the IRIS container with your project:
$ docker-compose up
- Go to the IRIS terminal (open a new VSCode Terminal)
docker exec -it iris-json-schema_iris_1 bash
iris session iris
- Change to the IRISAPP namespace
set $namespace = "IRISAPP"
- Get a sample JSON Schema
set jsonSchema = ##class(dc.irisjsonschema.JSONSchemaValidator).GetJSONSchema()
- Get a sample valid JSON
set jsonContent = ##class(dc.irisjsonschema.JSONSchemaValidator).GetValidSampleJSON()
- Get a validation equals to valid
set st = ##class(dc.irisjsonschema.JSONSchemaValidator).Validate(jsonSchema,jsonContent,.result)
write result
- Now, get a sample INVALID JSON
set jsonContent = ##class(dc.irisjsonschema.JSONSchemaValidator).GetInvalidSampleJSON()
- Now, Get a validation equals to INVALID
set st = ##class(dc.irisjsonschema.JSONSchemaValidator).Validate(jsonSchema,jsonContent,.result)
write result
- Validate any other JSON using any JSON Schema and Enjoy!!