Open Exchange
Global Masters
Home / Class Reference / ENSLIB namespace / %REST.Spec
Private  Storage   


abstract class %REST.Spec

This superclass is used as a known entry point for OpenAPI REST API Models. Subclasses of this class should override the XData OpenAPI block for storing custom API descriptions.


Parameters Properties Methods Queries Indices ForeignKeys Triggers
2 5


%CreateRESTApplication %DeleteRESTApplication %OnCompile %RemoveXDataBlock

%Api.IAM.v1.spec %Api.Mgmnt.v2.spec


• parameter Strict = 1;
If Strict=0 (false), then only the swagger properties which are needed for code generation are checked during compile. If Strict=1 (true), then all swagger properties are checked during compile.
• parameter XDataName = "OpenAPI";
The name of the XData block which contains the OpenAPI 2.0 specification


• classmethod %CreateRESTApplication(applicationName As %String, swagger="", ByRef features, Output newApplication As %Boolean) as %Status
Create a REST application. If the REST application already exists, then it will be replaced. The swagger argument contains the OpenAPI 2.0 swagger document for the application. If xdataStream="", then the RESTSpec will be empty.
If the request body is empty, the addPing feature determines if a ping method should be added to the empty swagger spec. The REST application package containing 3 classes:
The specification class (.spec) which is created with the specified OpenAPI XData block.
The dispatch class (.disp) which is deleted for a new application and will be created by compile
The implementation class (.impl) which is updated as needed with other contents unchanged.
• classmethod %DeleteRESTApplication(applicationName As %String, Output newApplication As %Boolean) as %Status
Delete a new REST application including the implementation class.
• classmethod %OnCompile()
• classmethod %RemoveXDataBlock(cDef, blockName)
• classmethod CreateParameter(classDef As %Dictionary.ClassDefinition, name As %String, value As %String, desc As %String) as %Status
Create a parameter