fix(traits): perfected trait recognition.

However, they are not listed as traits of the youtube api. What we
really want is to list common implementation types as part of ourselves.

This doesn't work though as long as we don't have the common impl
as part of our sources.
This commit is contained in:
Sebastian Thiel
2015-03-03 09:37:23 +01:00
parent c1eeee0591
commit 8dc5e2a53d
2 changed files with 4 additions and 3 deletions

View File

@@ -34,12 +34,13 @@ ${s.get('description', 'There is no detailed description.')}
# Activities
This type is used in activities, which are methods you may call on this type or where this type is involved in.
The list links the activity name, along with information about where it is used (one of ${util.put_and(util.IO_TYPES)}.
The list links the activity name, along with information about where it is used (one of ${util.put_and(list('*%s*' % t
for t in util.IO_TYPES))}).
${''.join("* %s (%s)\n" % (util.activity_split(a)[1], iot and '|'.join(iot) or 'none')
for a, iot in c.sta_map[s.id].iteritems())}
% else:
This schema type is not used in any activity, and only used as *part* of another schema.
This type is not used in any activity, and only used as *part* of another schema.
% endif
</%def>

View File

@@ -149,7 +149,7 @@ def schema_markers(s, c):
else:
# it should have at least one activity that matches it's type to qualify for the Resource trait
for fqan, iot in activities.iteritems():
if activity_name_to_type_name(activity_split(fqan)[0]) == s.id:
if activity_name_to_type_name(activity_split(fqan)[0]).lower() == s.id.lower():
res.add('Resource')
if IO_RESPONSE in iot:
res.add('ResponseResult')