def _convert_properties(schema):
    """
    Converts the "patternProperty" into the "x-patternProperty".
    Always explicitly sets the "additionalProperties" property.
    Only applies to schemas with `type="object"`.
    """
    if schema.get('type') != 'object':
        return schema
    pattern_properties = schema.get('patternProperties')
    if pattern_properties:
        del schema['patternProperties']
        schema['x-patternProperties'] = pattern_properties
    additonal_properties = schema.get('additionalProperties')
    if additonal_properties is None:
        schema['additionalProperties'] = True
    return schema
