Namespace: Consultingwerk.OERA.Swagger
Class 
SwaggerRestEntitiesGenerator Copy to Clipboard
Parent classes:
Inherits: Progress.Lang.Object
Implements: Ccs.Common.IService, Consultingwerk.OERA.Swagger.ISwaggerRestEntitiesGenerator

File:SwaggerRestEntitiesGenerator
Purpose:Swagger REST Entities Generation
Author(s):Martyn Kemp / Consultingwerk Ltd.
Created:Mon Sep 11 13:58:38 BST 2017



Top Method Summary
Options Name Purpose
- AddClassDataset (character, character, JsonObject) Adds a record mapping dataset defined and serialize names
# Progress.Json.ObjectModel.JsonObject AddComponentsSchema (JsonObject) Returns the Catalog for the Restful Services
# AddRestfulFields (handle, JsonObject, IRestAddress, character) Adds Fields to the given JSON Object
# AddRestMethod (IRestMethod, character, character, JsonObject) Documents a RestMethod
# AddSchemaAtPath (JsonObject, character, JsonObject) Adds a JSON object to a path
# AddStatusSchema (JsonObject, integer) Gets a Swagger schema matching the RestResourceFormatService's BuildStatusResponse method
# AddStringField (JsonObject, character) Adds a Type node to the input JSON Object
# AddTagsFromAnnotation (character, character) Adds a simple (no URL info) tag to the temp-table
+ dispose () Destroy/Shutdown/Anti-Initializer
# EnsureJsonArrayExistsAtPath (JsonObject, character) Makes sure that the path exists : so each of the entries is a property in the input JSON object, and that the type of the property is a JSON array
# Progress.Json.ObjectModel.JsonObject GenerateEnumObject (Class, character, character) Generates Enum Object Definition
# Progress.Json.ObjectModel.JsonObject GenerateHeaderObject (character, character, character, character, character) Generates the Definition Header Details
# Progress.Json.ObjectModel.JsonArray GenerateInvokeMethodPathProperties (IRestMethod, character, ListNameValuePair) Generates the Definition Header Details
# Progress.Json.ObjectModel.JsonObject GenerateInvokeMethodProperties (JsonObject, JsonArray, JsonObject, IRestMethod, character, ListNameValuePair) Generates Invoke Method Properties
# Progress.Json.ObjectModel.JsonObject GenerateSwaggerRestfulAnnotations (character, character) Returns the Swagger Restful Services Annotations
# CHARACTER GetAddressDetail (IRestMethod) Builds filters and operation ID from a RestMethod
# CHARACTER GetBasePath () Returns the Url suffix (/web/Entities) appended to the servers address
# GetBusinessServiceEntities () Populates a temp table with Restful Business Tasks Services
# Progress.Json.ObjectModel.JsonObject GetCountOperation (character, character, character, character, character, character, handle) Returns the JSON Count Operation
# Progress.Json.ObjectModel.JsonObject GetDefinitionCount () Returns the JSON Schema Count Definitions for the Entity
# GetFilterParameters (JsonArray, character) Constructs JSON Filter Parameters Array
# Progress.Json.ObjectModel.JsonObject GetInitialValuesOperation (character, IBusinessEntityDescriptor, character, character, character, JsonObject) Returns the JSON InitialValues Operation
# Progress.Json.ObjectModel.JsonObject GetInvokeMethodResponses (JsonObject, IRestMethod) Returns the JSON Invoke Method Response
# Progress.Json.ObjectModel.JsonObject GetInvokeResponseSchema (IRestMethod, JsonObject) Returns the JSON Invoke Method Response Schema
- CHARACTER GetMapKeys (character) Returns the header or cookie names from a list of HeadersMap or CookiesMap from a Business Task.
# Progress.Lang.Class GetMethodParameterClass (IRestMethod) Gets a type to use for a RestMethod parameter
# Progress.Json.ObjectModel.JsonArray GetParameters (character, character, logical, logical, character, character, character, handle) Returns the JSON Parameters Array
# Progress.Json.ObjectModel.JsonObject GetPathOperations (character, handle, character, character, logical, character, character, character, character, logical, logical, logical, character) Returns the JSON Path Operations
# Progress.Json.ObjectModel.JsonObject GetResponseObject (character, character) Returns the JSON Parameters Array
# CHARACTER GetSchemaDefinition (handle, character, character) Returns the Schema Definition value
# GetServiceEntities (character) Populates a temp table with Restful Service Entities
# Progress.Json.ObjectModel.JsonObject GetServiceOperations (JsonObject) Returns the Catalog for the Restful Services
+ LONGCHAR GetSwaggerRestfulHtml (character) Returns the Swagger Web page contents for the Restful Services
+ Progress.Json.ObjectModel.JsonObject GetSwaggerRestfulServices (character) Returns the Catalog for the Restful Services
+ Progress.Json.ObjectModel.JsonObject GetSwaggerRestfulServices (character, character) Returns the Catalog for the Restful Services
# LOGICAL HasPath (JsonObject, character) Looks for a particular path in an object.
+ initialize () Initializer/Startup
- InitializeObjectReferences () Initializes Object References
# CHARACTER ListTablesInDataset (JsonObject) Returns the relative paths for any table definitions in a dataset schema
# ProcessBusinessTasks (JsonObject) Generates Swagger/OpenAPI definitions for Business Tasks
# ProcessLinks (JsonObject, handle, character) Processes the Links
# ProcessRelations (JsonObject, handle, IRestAddress) Processes the child relations of the given record
# ProcessRestfulMethods (JsonObject, JsonObject, character, character, character, character) Processes Restful Methods for the Business Entity
# LOGICAL RegisterClass (character) Adds a simple (no URL info) tag to the temp-table
- Progress.Json.ObjectModel.JsonObject ResolveDatasetSchemas (JsonObject, character) Resolves dataset schemas: flatten dataset parameters and use serialize-name
# CHARACTER ResolveTags (character, character) Determines which tags to use
# Progress.Json.ObjectModel.JsonObject ReturnSingleDatasetSchema (IRestMethod, JsonObject, character, JsonObject) Returns the schema for a single dataset (response="<dataset-name>")
# Progress.Json.ObjectModel.JsonArray SchemaTags () Initializes Object References
# SetQueryParameters (JsonArray) Set the Swagger Response Schema Object
+ SetRestfulResponseSchema (handle, JsonObject, IRestAddress) Set the Swagger Response Schema Object
- VerifyResponseSchema (JsonObject, JsonObject) Checks the resultant Response Schema value and if necessary update the value

Top Property Summary
Options Name Purpose
# Consultingwerk.OERA.RestResource.IRestAddress CurrentRegisteredAddress
# HANDLE DatasetHandle


Method Detail
Top

PRIVATE AddClassDataset (character, character, JsonObject)

Purpose: Adds a record mapping dataset defined and serialize names
Notes: If this method is called multiple times, the last schema passed in's
serialize-name is used.

Parameters:
pcClassName CHARACTER
The class name in which the dataset is defined
pcDatasetName CHARACTER
The define name of the dataset
poSchema Progress.Json.ObjectModel.JsonObject
The Swagger schema for the dataset; includes the serialize name
Top

PROTECTED Progress.Json.ObjectModel.JsonObject AddComponentsSchema (JsonObject)

Purpose: Returns the Catalog for the Restful Services
Notes:

Parameters:
poObject Progress.Json.ObjectModel.JsonObject
The parent JSON Object
Returns Progress.Json.ObjectModel.JsonObject
The JSON Object containing the Restful Services Operations
Top

PROTECTED AddRestfulFields (handle, JsonObject, IRestAddress, character)

Purpose: Adds Fields to the given JSON Object
Notes:

Parameters:
phBuffer HANDLE
The handle of the Buffer
poRecord Progress.Json.ObjectModel.JsonObject
The JsonObject to add the fields to
poRestAddress Consultingwerk.OERA.RestResource.IRestAddress
The IRestAddress instance describing the format of the current record
pcFields CHARACTER
The fields as provided by the consumer
Top

PROTECTED AddRestMethod (IRestMethod, character, character, JsonObject)

Purpose: Documents a RestMethod
Notes:

Parameters:
poRestMethod Consultingwerk.OERA.RestResource.IRestMethod
The RestMethod instance being documented
pcParameters CHARACTER
Any filter parameters
pcOperationId CHARACTER
A unique operation ID
poDocumentRoot Progress.Json.ObjectModel.JsonObject
The complete JSON document
Top

PROTECTED AddSchemaAtPath (JsonObject, character, JsonObject)

Purpose: Adds a JSON object to a path
Notes:

Parameters:
poSchemas Progress.Json.ObjectModel.JsonObject
The JSON object representing the components/schemas
pcPath CHARACTER
A slash-delimited path to find. Each of the path elements except for the final one must be JSON objects.
poJson Progress.Json.ObjectModel.JsonObject
A JSON object containing the schema to add
Top

PROTECTED AddStatusSchema (JsonObject, integer)

Purpose: Gets a Swagger schema matching the RestResourceFormatService's BuildStatusResponse method
Notes:

Parameters:
poJson Progress.Json.ObjectModel.JsonObject
A JSON object representing the operation
piStatusCode INTEGER
The HTTP status code
Top

PROTECTED AddStringField (JsonObject, character)

Purpose: Adds a Type node to the input JSON Object
Notes:

Parameters:
poJsonObject Progress.Json.ObjectModel.JsonObject
The JSON Object to assign a Type node to
pcValue CHARACTER
The value to assign to the new JSON Object Node
Top

PROTECTED AddTagsFromAnnotation (character, character)

Purpose: Adds a simple (no URL info) tag to the temp-table
Notes:

Parameters:
pcTags CHARACTER
A comma-delimited list of tags
pcDescription CHARACTER
A description for the tag(s)
Top

PUBLIC dispose ()

Purpose: Destroy/Shutdown/Anti-Initializer
Notes:

Top

PROTECTED EnsureJsonArrayExistsAtPath (JsonObject, character)

Purpose: Makes sure that the path exists : so each of the entries is a property
in the input JSON object, and that the type of the property is a JSON array
Notes:

Parameters:
poJson Progress.Json.ObjectModel.JsonObject
The JSON object
pcPath CHARACTER
The path (of object properties) that must exist, and contain a JSON object
Top

PROTECTED Progress.Json.ObjectModel.JsonObject GenerateEnumObject (Class, character, character)

Purpose: Generates Enum Object Definition
Notes:

Parameters:
poClass Progress.Lang.Class
The Enum Class Object
pcRequestMode CHARACTER
The Request Method
pcProperty CHARACTER
The Enum Name Property
Returns Progress.Json.ObjectModel.JsonObject
The JsonObject containing Enum Details
Top

PROTECTED Progress.Json.ObjectModel.JsonObject GenerateHeaderObject (character, character, character, character, character)

Purpose: Generates the Definition Header Details
Notes:

Parameters:
pcEntityName CHARACTER
The Business Entity Name
pcSummary CHARACTER
The Summary Details
pcDescription CHARACTER
The definition description
pcOperationID CHARACTER
The Operation ID
pcTags CHARACTER
A list of tags for the operation
Returns Progress.Json.ObjectModel.JsonObject
The JsonObject containing Definition Header Details
Top

PROTECTED Progress.Json.ObjectModel.JsonArray GenerateInvokeMethodPathProperties (IRestMethod, character, ListNameValuePair)

Purpose: Generates the Definition Header Details
Notes:

Parameters:
poRestMethod Consultingwerk.OERA.RestResource.IRestMethod
The RestMethod for which to create parameters
pcParameters CHARACTER
The definition path parameters
poParameterDescriptions Consultingwerk.ListNameValuePair
A list of parameter names and their descriptions
Returns Progress.Json.ObjectModel.JsonArray
The JsonArray containing Path Parameters
Top

PROTECTED Progress.Json.ObjectModel.JsonObject GenerateInvokeMethodProperties (JsonObject, JsonArray, JsonObject, IRestMethod, character, ListNameValuePair)

Purpose: Generates Invoke Method Properties
Notes: - If the pcParameterClassName is blank, then the developer is signalling that
the method has no parameters
- If the "request" input is blank, then the input is assumed to be "parameter"

Parameters:
poOperation Progress.Json.ObjectModel.JsonObject
The JsonObject representing the operation
poArray Progress.Json.ObjectModel.JsonArray
Input / Output Json Array of Invoke Method Properties
poDocumentRoot Progress.Json.ObjectModel.JsonObject
The JsonObject representing the Master
poRestMethod Consultingwerk.OERA.RestResource.IRestMethod
The metadata for the rest method
pcParameters CHARACTER
The Parameter list for the Invoke Method
poParameterDescriptions Consultingwerk.ListNameValuePair
A list of parameter names and their descriptions
Returns Progress.Json.ObjectModel.JsonObject
The Request object
Top

PROTECTED Progress.Json.ObjectModel.JsonObject GenerateSwaggerRestfulAnnotations (character, character)

Purpose: Returns the Swagger Restful Services Annotations
Notes:

Parameters:
pcServiceURI CHARACTER
The Service URI
pcEntity CHARACTER
The Business Entity
Returns Progress.Json.ObjectModel.JsonObject
The JSON Object describing the Swagger Restful Services Annotations
Top

PROTECTED CHARACTER GetAddressDetail (IRestMethod)

Purpose: Builds filters and operation ID from a RestMethod
Notes:
[2] = OperationID

Parameters:
poRestMethod Consultingwerk.OERA.RestResource.IRestMethod
The RestMethod to describe
Returns CHARACTER
CHARACTER[2], where [1] = FilterFields / Parameters
Top

PROTECTED CHARACTER GetBasePath ()

Purpose: Returns the Url suffix (/web/Entities) appended to the
servers address
Notes: Taken from .restapplicationsettings, either swagger.RestfulEntitiesAddress or RestfulEntitiesAddress

Returns CHARACTER
The Url suffix
Top

PROTECTED GetBusinessServiceEntities ()

Purpose: Populates a temp table with Restful Business Tasks Services
Notes: Any tags for the entities, and their operations, will be added to the ttTags table

Top

PROTECTED Progress.Json.ObjectModel.JsonObject GetCountOperation (character, character, character, character, character, character, handle)

Purpose: Returns the JSON Count Operation
Notes:

Parameters:
pcEntityName CHARACTER
The Business Entity name
pcDatasetName CHARACTER
The Dataset Name
pcParameters CHARACTER
The Parameters
pcSchemaDefinition CHARACTER
The schema definition
pcOperationId CHARACTER
A unique operation ID
pcTags CHARACTER
The tags for the count operation
phDataset HANDLE
The dataset
Returns Progress.Json.ObjectModel.JsonObject
The JsonObject for the Path Operation
Top

PROTECTED Progress.Json.ObjectModel.JsonObject GetDefinitionCount ()

Purpose: Returns the JSON Schema Count Definitions for the Entity
Notes:

Returns Progress.Json.ObjectModel.JsonObject
The JsonObject representing the Definitions Count schema
Top

PROTECTED GetFilterParameters (JsonArray, character)

Purpose: Constructs JSON Filter Parameters Array
Notes:

Parameters:
poParameters Progress.Json.ObjectModel.JsonArray
The JsonArray for Filter Parameters
pcTypeName CHARACTER
The name of the Business Entity
Top

PROTECTED Progress.Json.ObjectModel.JsonObject GetInitialValuesOperation (character, IBusinessEntityDescriptor, character, character, character, JsonObject)

Purpose: Returns the JSON InitialValues Operation
Notes:

Parameters:
pcEntityName CHARACTER
The Business Entity name
poBusinessEntityDescriptor Consultingwerk.OERA.BusinessEntityDescriptor.IBusinessEntityDescriptor
The Business Entity's descriptor
pcTableName CHARACTER
The table for which to find initial values
pcOperationId CHARACTER
A unique operation ID
pcTags CHARACTER
The tags for the count operation
poComponentsSchemas Progress.Json.ObjectModel.JsonObject
The components/schemas root
Returns Progress.Json.ObjectModel.JsonObject
The JsonObject for the InitialValues operation
Top

PROTECTED Progress.Json.ObjectModel.JsonObject GetInvokeMethodResponses (JsonObject, IRestMethod)

Purpose: Returns the JSON Invoke Method Response
Notes:

Parameters:
poDocumentRoot Progress.Json.ObjectModel.JsonObject
The reference to the response Json Object so far
poRestMethod Consultingwerk.OERA.RestResource.IRestMethod
Metadata about the RestMethod
Returns Progress.Json.ObjectModel.JsonObject
The JsonObject containing Invoke Method Response Details
Top

PROTECTED Progress.Json.ObjectModel.JsonObject GetInvokeResponseSchema (IRestMethod, JsonObject)

Purpose: Returns the JSON Invoke Method Response Schema
Notes:

Parameters:
poRestMethod Consultingwerk.OERA.RestResource.IRestMethod
Metadata about the RestMethod
poComponentsSchemas Progress.Json.ObjectModel.JsonObject
A Json object into which schemas can be added
Returns Progress.Json.ObjectModel.JsonObject
The JsonObject containing Invoke Method Response Schema Details
Top

PRIVATE CHARACTER GetMapKeys (character)

Purpose: Returns the header or cookie names from a list of HeadersMap
or CookiesMap from a Business Task.
Notes: This method ensures that the list always has the format
header-or-cookie-name1,property-name1,header-or-cookie-name2,property-name2,...header-or-cookie-nameN,property-nameN

Parameters:
pcMap CHARACTER
The value of the RestMethod's HeadersMap or CookiesMap
Returns CHARACTER
A comma-separated list of mapped header or cookie names
Top

PROTECTED Progress.Lang.Class GetMethodParameterClass (IRestMethod)

Purpose: Gets a type to use for a RestMethod parameter
Notes:
the ParameterClassName is empty/blank

Parameters:
poRestMethod Consultingwerk.OERA.RestResource.IRestMethod
The RestMethod
Returns Progress.Lang.Class
The Progress.Lang.Class instance of the method. May be unknown if
Top

PROTECTED Progress.Json.ObjectModel.JsonArray GetParameters (character, character, logical, logical, character, character, character, handle)

Purpose: Returns the JSON Parameters Array
Notes:

Parameters:
pcEntityName CHARACTER
The name of the Business Entity
pcParameters CHARACTER
The comma delimited list of Filter Parameters
plCollection LOGICAL
Is the Parameter request type a record or collection
plParameters LOGICAL
Are Body Response Parameters required
pcName CHARACTER
The Parameter ID Name
pcSchema CHARACTER
The Scheme Definition Name
pcDescription CHARACTER
The Parameter Description
phDataset HANDLE
The dataset for the operation
Returns Progress.Json.ObjectModel.JsonArray
The JsonArray for Parameters Array
Top

PROTECTED Progress.Json.ObjectModel.JsonObject GetPathOperations (character, handle, character, character, logical, character, character, character, character, logical, logical, logical, character)

Purpose: Returns the JSON Path Operations
Notes:

Parameters:
pcEntityName CHARACTER
The Business Entity name
phDataset HANDLE
The dataset
pcTableName CHARACTER
The Top Level Dataset Table Name
pcSchemaDefinition CHARACTER
The schema definition
plNonStandardDefinition LOGICAL
Indicate whether Standard or Non Standard Schema
pcVerb CHARACTER
The Verb
pcDescription CHARACTER
The Description
pcOperationId CHARACTER
The Operation ID
pcParameters CHARACTER
The Parameters
plCollection LOGICAL
Collection
plConsumes LOGICAL
Consumable
plParameters LOGICAL
Has parameters
pcTags CHARACTER
The annotation tags
Returns Progress.Json.ObjectModel.JsonObject
The JsonObject for the Path Operation
Top

PROTECTED Progress.Json.ObjectModel.JsonObject GetResponseObject (character, character)

Purpose: Returns the JSON Parameters Array
Notes:

Parameters:
pcSchema CHARACTER
The Scheme Definition Name
pcDescription CHARACTER
The Parameter Description
Returns Progress.Json.ObjectModel.JsonObject
The JsonObject for the Response Object
Top

PROTECTED CHARACTER GetSchemaDefinition (handle, character, character)

Purpose: Returns the Schema Definition value
Notes:

Parameters:
phDataset HANDLE
The Dataset handle
pcSchemaName CHARACTER
The Schema Name to be defined within the Schema Definition
pcTable CHARACTER
The Table to be defined within the Schema Definition
Returns CHARACTER
The Schema Definition value
Top

PROTECTED GetServiceEntities (character)

Purpose: Populates a temp table with Restful Service Entities
Notes: The Business Entity Parameter is optional, if left empty, then ALL Entities are defined
Any tags for the entities, and their operations, will be added to the ttTags table

Parameters:
pcEntity CHARACTER
The Business Entity to be used for Definition File Generation
Top

PROTECTED Progress.Json.ObjectModel.JsonObject GetServiceOperations (JsonObject)

Purpose: Returns the Catalog for the Restful Services
Notes:

Parameters:
poDocumentRoot Progress.Json.ObjectModel.JsonObject
The complete Swagger doc as JSON
Returns Progress.Json.ObjectModel.JsonObject
The JSON Object containing the Restful Services Operations
Top

PUBLIC LONGCHAR GetSwaggerRestfulHtml (character)

Purpose: Returns the Swagger Web page contents for the Restful Services
Notes: Defaults to the count method type of the .restapplicationsettings file

Parameters:
pcServiceURI CHARACTER
The Service URI
Returns LONGCHAR
The Longchar containing the Swagger Web page contents
Top

PUBLIC Progress.Json.ObjectModel.JsonObject GetSwaggerRestfulServices (character)

Purpose: Returns the Catalog for the Restful Services
Notes:

Parameters:
pcServiceURI CHARACTER
The Service URI
Returns Progress.Json.ObjectModel.JsonObject
The JSON Object describing the Catalog for the Restful Services
Top

PUBLIC Progress.Json.ObjectModel.JsonObject GetSwaggerRestfulServices (character, character)

Purpose: Returns the Catalog for the Restful Services
Notes:

Parameters:
pcServiceURI CHARACTER
The Service URI
pcEntity CHARACTER
The Business Entity
Returns Progress.Json.ObjectModel.JsonObject
The JSON Object describing the Catalog for the Restful Services
Top

PROTECTED LOGICAL HasPath (JsonObject, character)

Purpose: Looks for a particular path in an object.
Notes: Used to determine if a schema has already been written into the components/schemas object
or if any part of the path - except for the last entry - is not a JSON object

Parameters:
poJson Progress.Json.ObjectModel.JsonObject
The JSON object representing the components/schemas
pcPath CHARACTER
A slash-delimited path to find. Each of the path elements except for the final one must be JSON objects.
Returns LOGICAL
TRUE If the path exists in the input JSON object. FALSE if the path does not exist,
Top

PUBLIC initialize ()

Purpose: Initializer/Startup
Notes:

Top

PRIVATE InitializeObjectReferences ()

Purpose: Initializes Object References
Notes:

Top

PROTECTED CHARACTER ListTablesInDataset (JsonObject)

Purpose: Returns the relative paths for any table definitions in a dataset schema
Notes: Temp-table schemas may be nested (eg eOrder -> eOrderLine -> eItem ). Tables
schemas are assumed to have a type of "array"

Parameters:
poDatasetSchema Progress.Json.ObjectModel.JsonObject
The schema of the dataset
Returns CHARACTER
A comma-delimited list of paths
Top

PROTECTED ProcessBusinessTasks (JsonObject)

Purpose: Generates Swagger/OpenAPI definitions for Business Tasks
Notes:

Parameters:
poDocumentRoot Progress.Json.ObjectModel.JsonObject
The complete Swagger doc as JSON
Top

PROTECTED ProcessLinks (JsonObject, handle, character)

Purpose: Processes the Links
Notes:

Parameters:
poJson Progress.Json.ObjectModel.JsonObject
The JsonObject to add the links to
phBuffer HANDLE
The parent record buffer
pcLinks CHARACTER
The list of links
Top

PROTECTED ProcessRelations (JsonObject, handle, IRestAddress)

Purpose: Processes the child relations of the given record
Notes:

Parameters:
poJson Progress.Json.ObjectModel.JsonObject
The Json of the parent record
phBuffer HANDLE
The handle of the parent record
poRestAddress Consultingwerk.OERA.RestResource.IRestAddress
The IRestAddress instance describing the REST Address
Top

PROTECTED ProcessRestfulMethods (JsonObject, JsonObject, character, character, character, character)

Purpose: Processes Restful Methods for the Business Entity
Notes:

Parameters:
poJson Progress.Json.ObjectModel.JsonObject
The Json of the parent record
poDocumentRoot Progress.Json.ObjectModel.JsonObject
INPUT-OUTPUT Parent Json Object
pcEntityName CHARACTER
The Business Entity Name
pcEntityAddress CHARACTER
The Entity REST Address
pcParameters CHARACTER
List of Query Parameters
pcSchemaName CHARACTER
The Entity Schema Name
Top

PROTECTED LOGICAL RegisterClass (character)

Purpose: Adds a simple (no URL info) tag to the temp-table
Notes: The class annotations are read, to cache class tags and descriptions

Parameters:
pcClassName CHARACTER
The class name to register
Returns LOGICAL
TRUE if the ttClass record was created; FALSE if it already exists
Top

PRIVATE Progress.Json.ObjectModel.JsonObject ResolveDatasetSchemas (JsonObject, character)

Purpose: Resolves dataset schemas: flatten dataset parameters and use serialize-name
Notes: The default schema references point to the parent of the dataset (so classname-datasetname). The parameter
name is also the dataset name and so there's a duplication: datasetname/datasetname/tablename is what's
generated.

Parameters:
poSchemaProperties Progress.Json.ObjectModel.JsonObject
The properties of the schema to be returned.
pcClassName CHARACTER
The class name
Returns Progress.Json.ObjectModel.JsonObject
The updated schema properties
Top

PROTECTED CHARACTER ResolveTags (character, character)

Purpose: Determines which tags to use
Notes:

Parameters:
pcTags CHARACTER
A set of tags from, say, a RestMethod
pcEntityName CHARACTER
The entity name
Returns CHARACTER
CHARACTER The resolved tags to use
Top

PROTECTED Progress.Json.ObjectModel.JsonObject ReturnSingleDatasetSchema (IRestMethod, JsonObject, character, JsonObject)

Purpose: Returns the schema for a single dataset (response="<dataset-name>")
Notes: Single-response datasets may have modifiers: no-envelope or <table-name>[:first]
which influence how the data is returned

Parameters:
poRestMethod Consultingwerk.OERA.RestResource.IRestMethod
The RestMethod annotations for which the schema is being built
poSchema Progress.Json.ObjectModel.JsonObject
The schema object of the response
pcDatasetPropertyName CHARACTER
The name of the dataset property in the generated schema
poComponentsSchemas Progress.Json.ObjectModel.JsonObject
The schema for all components/schema
Returns Progress.Json.ObjectModel.JsonObject
The Swagger schema for the dataset
Top

PROTECTED Progress.Json.ObjectModel.JsonArray SchemaTags ()

Purpose: Initializes Object References
Notes:

Returns Progress.Json.ObjectModel.JsonArray
The JSON Array for the Schema Tags
Top

PROTECTED SetQueryParameters (JsonArray)

Purpose: Set the Swagger Response Schema Object
Notes:

Parameters:
poParameters Progress.Json.ObjectModel.JsonArray
The Parameters JSON Array to add the Query Parameters
Top

PUBLIC SetRestfulResponseSchema (handle, JsonObject, IRestAddress)

Purpose: Set the Swagger Response Schema Object
Notes:

Parameters:
phDataset HANDLE
The Dataset handle
poResponse Progress.Json.ObjectModel.JsonObject
The Current JSON Object to set the Response Schema to
poRestAddress Consultingwerk.OERA.RestResource.IRestAddress
The Current Rest Address
Top

PRIVATE VerifyResponseSchema (JsonObject, JsonObject)

Purpose: Checks the resultant Response Schema value and if necessary update the value
Notes:

Parameters:
poDocumentRoot Progress.Json.ObjectModel.JsonObject
The Master JSON Object to set the Response Schema to
poType Progress.Json.ObjectModel.JsonObject
The Response Schema JSON Object


Property Detail
Top

PROTECTED Consultingwerk.OERA.RestResource.IRestAddress CurrentRegisteredAddress


Returns Consultingwerk.OERA.RestResource.IRestAddress
Top

PROTECTED HANDLE DatasetHandle


Returns HANDLE


©2006-2023 Consultingwerk Ltd.         info@consultingwerk.de         http://www.consultingwerk.de       27.03.2024 00:29:13