Ensure all interfaces have comments from the spec.

このコミットが含まれているのは:
Cory Slep 2019-01-07 21:31:36 +01:00
コミット 9369a8ad79
2個のファイルの変更4行の追加2行の削除

ファイルの表示

@ -423,6 +423,7 @@ func (c Converter) convertNonFunctionalProperty(p rdf.VocabularyProperty,
v.GetName(), v.GetName(),
pm, pm,
c.toIdentifier(p), c.toIdentifier(p),
p.Notes,
k, k,
p.NaturalLanguageMap) p.NaturalLanguageMap)
return return

ファイルの表示

@ -30,6 +30,7 @@ type NonFunctionalPropertyGenerator struct {
func NewNonFunctionalPropertyGenerator(vocabName string, func NewNonFunctionalPropertyGenerator(vocabName string,
pm *PackageManager, pm *PackageManager,
name Identifier, name Identifier,
comment string,
kinds []Kind, kinds []Kind,
hasNaturalLanguageMap bool) *NonFunctionalPropertyGenerator { hasNaturalLanguageMap bool) *NonFunctionalPropertyGenerator {
return &NonFunctionalPropertyGenerator{ return &NonFunctionalPropertyGenerator{
@ -38,6 +39,7 @@ func NewNonFunctionalPropertyGenerator(vocabName string,
PackageManager: pm, PackageManager: pm,
HasNaturalLanguageMap: hasNaturalLanguageMap, HasNaturalLanguageMap: hasNaturalLanguageMap,
Name: name, Name: name,
Comment: comment,
Kinds: kinds, Kinds: kinds,
}, },
} }
@ -47,8 +49,7 @@ func NewNonFunctionalPropertyGenerator(vocabName string,
func (p *NonFunctionalPropertyGenerator) InterfaceDefinitions(pkg Package) []*codegen.Interface { func (p *NonFunctionalPropertyGenerator) InterfaceDefinitions(pkg Package) []*codegen.Interface {
s, t := p.Definitions() s, t := p.Definitions()
return []*codegen.Interface{ return []*codegen.Interface{
// TODO: Comments s.ToInterface(pkg.Path(), p.elementTypeGenerator().InterfaceName(), fmt.Sprintf("%s represents a single value for the %q property.", p.elementTypeGenerator().InterfaceName(), p.PropertyName())),
s.ToInterface(pkg.Path(), p.elementTypeGenerator().InterfaceName(), ""),
t.ToInterface(pkg.Path(), p.InterfaceName(), p.Comments()), t.ToInterface(pkg.Path(), p.InterfaceName(), p.Comments()),
} }
} }