getSchema Method
Attempts to obtain a schema from this context that matches the specified criteria.
getSchema(schemaKey: SchemaKey, matchType: SchemaMatchType = SchemaMatchType.Latest): Promise<undefined | Schema>
@returns the schema matching the input criteria, or undefined if no such schema could be located.
| Parameter | Type | Description |
|---|---|---|
| schemaKey | SchemaKey | Identifies the schema to obtain. |
| matchType | SchemaMatchType | Criteria by which to identify potentially matching schemas. |
Returns - Promise<undefined | Schema>
the schema matching the input criteria, or undefined if no such schema could be located.
Defined in
- ecschema-metadata/src/Context.ts Line 341
Last Updated: 24 October, 2025
Found something wrong, missing, or unclear on this page? Raise an issue in our repo.