def resource(name)
      if @schema['definitions'].has_key?(name)
        ResourceSchema.new(@schema, name)
      else
        raise SchemaError.new("Unknown resource '#{name}'.")
      end
    end
def resource(name)
      if @schema['definitions'].has_key?(name)
        ResourceSchema.new(@schema, name)
      else
        raise SchemaError.new("Unknown resource '#{name}'.")
      end
    end
Get a schema for a named resource.

 @param name [String] The name of the resource.
 @raise [SchemaError] Raised if an unknown resource name is provided.