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(),
pm,
c.toIdentifier(p),
p.Notes,
k,
p.NaturalLanguageMap)
return

ファイルの表示

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