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.
class function FromClass(AClass: TClass): TJSONObject; 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.
class function FromClass(AClass: TClass; const AOptions: TTMSMCPJSONSchemaOptions): TJSONObject; 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. |