Open Exchange
Global Masters
Home > Class Reference > %SYS namespace > %REST.OpenAPI
Private  Storage   


%REST.OpenAPI is the class which manages the OpenAPI 2.0 swagger description.


Parameters Properties Methods Queries Indices ForeignKeys Triggers
6 39


IgnoreUnexpectedFields InternalError JSONPath Strict

%%OIDGet %AddToSaveSet %BindExport %BuildObjectGraph
%ClassIsLatestVersion %ClassName %Close %ConstructClone
%DispatchClassMethod %DispatchGetModified %DispatchGetProperty %DispatchMethod
%DispatchSetModified %DispatchSetMultidimProperty %DispatchSetProperty %Extends
%GetParameter %IncrementCount %IsA %IsModified
%New %NormalizeObject %ObjectModified %OriginalNamespace
%PackageName %RemoveFromSaveSet %SerializeObject %SetModified
%ValidateObject ArrayToList CheckExtraFields CheckURL
ConvertOpenAPIToRESTSpec ConvertURL CreateReferencedObject FindParamater
FindReferencedObject FromContact FromDefinitions FromExamples
FromExternalDocumentation FromHeader FromHeaders FromInfo
FromItems FromLicense FromOperation FromParameter
FromParameterDefinitions FromParameters FromPath FromPaths
FromResponse FromResponseDefinitions FromResponses FromSchema
FromSchemaCommon FromSchemaOpenAPI FromSecurityDefinition FromSecurityDefinitions
FromSecurityRequirement FromSecurityRequirements FromSwagger FromTag
FromTags FromXML GetReferencedObject Location


• property IgnoreUnexpectedFields as %Boolean;
If IgnoreUnexpectedFields is true, then unexpected fields will be ignored. If IgnoreUnexpectedFields is false, then unexpected fields will result in an error. If Strict=true, IgnoreUnexpectedFields defaults to false. Otherwise IgnoreUnexpectedFields defaults to true.
• property InternalError as %Boolean [ InitialExpression = 0 ];
The InternalError property is set to true if an internal error is trapped.
• property JSONPath as %String;
The JSON path of the current property. JSONPath is built up as we go along in order to be used in error messages.
• property Strict as %Boolean [ InitialExpression = 1 ];
Determine how strict error checking is for the swagger definition. If Strict=0 (false), then only the swagger properties which are needed for code generation are checked. If Strict=1 (true), then all swagger properties are checked. The value of the strict parameter defaults to 1 (true)."
• property internalIgnoreUnexpectedFields as %Boolean [ Private ];
• property referenceIndex as %RegisteredObject [ MultiDimensional ];
Index of globally defined OpenAPI objects:
referenceIndex(,)=object where type is "parameters","responses", "securityDefinitions" or "schema"


• method ArrayToList(array As %DynamicArray, propertyName As %String, Output arrayString As %String) as %Status
Convert a dynamic array to a comma separated list
• method CheckExtraFields(obj As %DynamicObject, fieldList As %List, objectName As %String) as %Status
Return an error if any fields not in the specified fieldList are present.
• classmethod CheckURL(url As %String) as %Boolean
Check for valid OpenAPI 2.0 URL
• method ConvertOpenAPIToRESTSpec(openAPI As %DynamicObject, Output RESTSpecClass As %REST.RESTSpec.RESTSpecObject) as %Status
Convert an OpenAPI description to a set of classes specifying the RESTSpec.
openAPI is the OpenAPI 2.0 specification to convert to a RESTSpec. openAPI may be expressed as a dynamic object, a stfream or a string.
The oref of the class containing the new RESTSpec is returned in RESTSpecClass
• classmethod ConvertURL(url As %String, ByRef modifiedUrl, ByRef parameters) as %Boolean
Convert OpenAPI 2.0 URL to form needed for UrlMap with regular expressions. The parameters argument is returned as a local array of parameter names.
• method CreateReferencedObject(ref As %DynamicObject, definitionType As %String, key As %String, referencedObject As %RegisteredObject) as %Status
Create a globally referenced object
• classmethod FindParamater(parameterList As %ListOfObjects, name As %String, in As %String) as %REST.RESTSpec.ParameterObject
Find the parameter specified by 'name' and 'in' in the parameter list.
• method FindReferencedObject(reference As %String, definitionType As %String, Output referencedObject As %RegisteredObject) as %Status
Find the previously defined schema definition paceholder object. Currently only local references are supported
• method FromContact(contact As %DynamicObject) as %Status
Convert swagger.info.contact to RESTSpec apiInfo.contact
• method FromDefinitions(definitions As %DynamicObject, definitionList As %ListOfObjects) as %Status
Convert swagger.definitions to RESTSpec schemas
• method FromExamples(examples As %DynamicObject) as %Status
Convert response examples to RESTSpec Examples Object
• method FromExternalDocumentation(externalDocs As %DynamicObject) as %Status
Convert swagger externalDocs to RESTSpec External Documentation Object
• method FromHeader(header As %DynamicObject) as %Status
Convert swagger header to RESTSpec Header Object
• method FromHeaders(headers As %DynamicObject) as %Status
Convert swagger headers to RESTSpec headers
• method FromInfo(info As %DynamicObject, apiInfo As %REST.RESTSpec.APIInfoObject) as %Status
Convert swagger.info to RESTSpec apiInfo
• method FromItems(items As %DynamicObject, itemsObject As %REST.RESTSpec.ItemsObject, ByRef allowedFields As %String) as %Status
Convert swagger items to RESTSpec Items Object
• method FromLicense(license As %DynamicObject) as %Status
Convert swagger.info.license to RESTSpec apiInfo.license
• method FromOperation(operation As %DynamicObject, route As %REST.RESTSpec.RouteItemObject, parameterList As %ListOfObjects) as %Status
Convert swagger operation to RESTSpec route
• method FromParameter(parameter As %DynamicObject, parameterObject As %REST.RESTSpec.ParameterObject, isDefinition As %Boolean) as %Status
Convert swagger parameter to RESTSpec ParameterObject
• method FromParameterDefinitions(parameters As %DynamicObject, parameterList As %ListOfObjects) as %Status
Convert swagger.parameters to RESTSpec parameters
• method FromParameters(parameters As %DynamicArray, parameterList As %ListOfObjects) as %Status
Convert swagger parameters to RESTSpec list of ParameterObjects
• method FromPath(path As %DynamicObject, url As %String, routes As %REST.RESTSpec.RoutesObject) as %Status
Convert swagger path to RESTSpec route
• method FromPaths(paths As %DynamicObject, routes As %REST.RESTSpec.RoutesObject) as %Status
Convert swagger.paths to RESTSpec RoutesObject
• method FromResponse(response As %DynamicObject, responseObject As %REST.RESTSpec.ResponseObject, isDefinition As %Boolean) as %Status
Convert swagger response to RESTSpec Response Object
• method FromResponseDefinitions(responses As %DynamicObject, responseList As %ListOfObjects) as %Status
Convert swagger.responses to RESTSpec responses
• method FromResponses(responses As %DynamicObject, responsesObject As %REST.RESTSpec.ResponsesObject) as %Status
Convert operation responses to RESTSpec responses
• method FromSchema(schema As %DynamicObject, schemaObject As %REST.RESTSpec.SchemaObject = "", isDefinition As %Boolean, containerType As %String = "", mapKey As %String = "") as %Status
Convert swagger schema to RESTSpec Schema Object
• method FromSchemaCommon(schema As %DynamicObject, schemaObject As %REST.RESTSpec.SchemaObject, isSchema As %Boolean, ByRef allowedFields As %String) as %Status
Convert common fields of swagger parameter and schema to RESTSpec ParameterObject or SchemaObject properties.
• method FromSchemaOpenAPI(schema As %DynamicObject, ByRef allowedFields As %String) as %Status
Check fields which are unique to OpenAPI use of schema
• method FromSecurityDefinition(securityDefinition As %DynamicObject, securityDefinitionObject As %REST.RESTSpec.SecuritySchemeObject) as %Status
Convert swagger securityDefinitions to RESTSpec FromSecurityDefinition Object
• method FromSecurityDefinitions(securityDefinitions As %DynamicObject, securityDefinitionList As %ListOfObjects) as %Status
Convert swagger.securityDefinitions to RESTSpec securitySchemes
• method FromSecurityRequirement(securityRequirement As %DynamicObject, securityRequirementObject As %REST.RESTSpec.SecurityRequirementObject) as %Status
Convert swagger securityDefinitions to RESTSpec Security Requirements Object
• method FromSecurityRequirements(securityRequirements As %DynamicObject, securityRequirementsList As %ListOfObjects) as %Status
Convert swagger security array to RESTSpec Security Requirements Object
• method FromSwagger(openAPI As %DynamicObject, restSpec As %REST.RESTSpec.RESTSpecObject) as %Status
Convert swagger to RESTSpec class tree.
• method FromTag(tag As %DynamicObject) as %Status
Convert swagger tag to RESTSpec Tag Object
• method FromTags(tags As %DynamicObject) as %Status
Convert swagger tags to RESTSpec Tags Object
• method FromXML(xml As %DynamicObject) as %Status
Convert schema xml properties to RESTSpec schema XML Object
• method GetReferencedObject(ref As %DynamicObject, definitionType As %String, Object As %RegisteredObject, Output referencedObject As %RegisteredObject) as %Status
Get the object referenced by $ref. Currently only local references are supported
• method Location(current As %String = "") as %String