Skip to content

Commit 93c50b4

Browse files
authored
Reuse const strings and expose PluralName (#811)
* Reuse const strings and expose PluralName Both in ModelExtensions.cs * Remove quotes
1 parent 9e6e2f0 commit 93c50b4

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/LibKubernetesGenerator/templates/ModelExtensions.cs.template

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,17 @@
11
// <auto-generated>
22
// Code generated by https://github.com/kubernetes-client/csharp/tree/master/gen/KubernetesGenerator
3-
// Changes may cause incorrect behavior and will be lost if the code is
4-
// regenerated.
3+
// Changes may cause incorrect behavior and will be lost if the code is regenerated.
54
// </auto-generated>
65
namespace k8s.Models
76
{
87
{{#.}}
9-
[KubernetesEntity(Group="{{GetGroup . }}", Kind="{{GetKind . }}", ApiVersion="{{GetApiVersion . }}", PluralName={{GetPlural .}})]
8+
[KubernetesEntity(Group=KubeGroup, Kind=KubeKind, ApiVersion=KubeApiVersion, PluralName=KubePluralName)]
109
public partial class {{GetClassName . }} : {{GetInterfaceName . }}
1110
{
1211
public const string KubeApiVersion = "{{GetApiVersion . }}";
1312
public const string KubeKind = "{{GetKind . }}";
1413
public const string KubeGroup = "{{GetGroup . }}";
14+
public const string KubePluralName = {{GetPlural . }};
1515
}
1616

1717
{{/.}}

0 commit comments

Comments
 (0)