Learning
Documentation
Community
Open Exchange
Global Masters
Home > Class Reference > ENSLIB namespace > %iKnow.REST.Utils
Private  Storage   

%iKnow.REST.Utils


Utility class for exposing REST API documentation in OpenAPI Specification (also known as Swagger) format, for which extended open-source tooling is available, such as Swagger-UI.

Inventory


Parameters Properties Methods Queries Indices ForeignKeys Triggers
5


Summary


Methods
GenerateSwaggerYAML GenerateSwaggerYAMLInternal GetSwagger GetSwaggerText
MergeHeaders

Subclasses
%UIMA.REST.v1 %iKnow.REST.v1

Methods


• classmethod GenerateSwaggerYAML(Output pYAML As %String, pRESTClass As %String = "", pBasePath As %String = "") as %Status
Generates Swagger YAML based on the <example language="Swagger"> elements in each class method's class reference.
• classmethod GenerateSwaggerYAMLInternal(Output pHeader As %String, Output pPaths As %String, pRESTClass As %String, ByRef pBasePath As %String = "", pPathPrefix As %String = "") as %Status
• classmethod GetSwagger(namespace As %String) as %Status
This method is to be called as an endpoint itself!
      description: Simple endpoint to print this Swagger definition in YAML
      summary: Retrieves Swagger definition in YAML
      produces:
        - application/x-yaml
      responses:
        200:
          description: successful response
• classmethod GetSwaggerText(pDescription As %String, Output pSwaggerText As %String) as %Boolean
Extracts the contents of the first occurrence of <example language="Swagger">, replacing any occurrences of {{{SOMETHING}}} with the value of class parameter ..#SOMETHING.
• classmethod MergeHeaders(ByRef pHeaders As %String, pAdditionalHeader As %String) as %Status