Skip to main content
Table of Contents

TTMSMCPJSONSchemaGenerator.FromClass Method

Generates a schema from a class reference resolved at run time, using the default settings.

API unit family: TMS.MCP.JSONSchema Declaring type: TTMSMCPJSONSchemaGenerator

Overloads

Overload 1

Generates a schema from a class reference resolved at run time, using the default settings.

TMS.MCP.JSONSchema.hppPascalC++
class function FromClass(AClass: TClass): TJSONObject; overload;
__classmethod System::Json::TJSONObject* __fastcall FromClass(System::TClass AClass)/* overload */;

Parameters

Name Description
AClass The class to reflect. It must not be nil.

Returns

A newly created schema object owned by the caller.

Exceptions

Exception Description
EArgumentException Raised when the class reference is nil.

Overload 2

Generates a schema from a class reference resolved at run time, using the given settings.

TMS.MCP.JSONSchema.hppPascalC++
class function FromClass(AClass: TClass; const AOptions: TTMSMCPJSONSchemaOptions): TJSONObject; overload;
__classmethod System::Json::TJSONObject* __fastcall FromClass(System::TClass AClass, const TTMSMCPJSONSchemaOptions &AOptions)/* overload */;

Parameters

Name Description
AClass The class to reflect. It must not be nil.
AOptions Settings controlling which members are reflected and how the root object is emitted.

Returns

A newly created schema object owned by the caller.

Exceptions

Exception Description
EArgumentException Raised when the class reference is nil.