<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def compile_swagger_schema(schema_dir, resource_listing):
 """Build a SwaggerSchema from various files. :param schema_dir: the directory schema files live inside :type schema_dir: string :returns: a SwaggerSchema object """

    mapping = build_schema_mapping(schema_dir, resource_listing)
    resource_validators = ingest_resources(mapping, schema_dir)
    endpoints = list(build_swagger_12_endpoints(resource_listing, mapping))
    return SwaggerSchema(endpoints, resource_validators)