• Get type information for a property from a schema

    Parameters

    • propertyName: string

      The name of the property

    • schema: JSONSchema7

      The schema containing the property

    Returns PropertyTypeInfo

    Property type information or undefined if property not found

    const schema = {
    type: 'object',
    properties: {
    name: { type: 'string' },
    age: { type: 'number' }
    }
    };

    const nameType = getSchemaTypeForProperty('name', schema);
    // { type: 'string', isArray: false, isObject: false, schema: {...} }