File tree Expand file tree Collapse file tree 2 files changed +14
-0
lines changed
kubernetes-model-generator/kubernetes-model-core/src/main/java/io/fabric8/kubernetes/api/model Expand file tree Collapse file tree 2 files changed +14
-0
lines changed Original file line number Diff line number Diff line change 99* Fix #6886 : Remove invalid JUnit 4 references
1010
1111#### Improvements
12+
13+ * Fix #6313 : Add HasMetadata.getDefaultPluralFor method
1214* Fix #6863 : ensuring SerialExecutor does not throw RejectedExecutionException to prevent unnecessary error logs
1315* Fix #6763 : (crd-generator) YAML output customization
1416* Fix #6880 : LogWatch interface provides listeners on close stream event
Original file line number Diff line number Diff line change @@ -122,6 +122,18 @@ static String getPlural(Class<?> clazz) {
122122 : Pluralize .toPlural (getSingular (clazz )));
123123 }
124124
125+ /**
126+ * Retrieves the default plural form associated with the specified kind. Note that this is a best-effort attempt based on only
127+ * the provided kind and might not correspond to the actual plural form if defined in a different way than the linguistic
128+ * plural derived from the kind.
129+ *
130+ * @param kind the kind which default plural form we want to retrieve
131+ * @return the default plural form associated with the specified kind
132+ */
133+ static String getDefaultPluralFor (String kind ) {
134+ return kind != null ? Pluralize .toPlural (kind .toLowerCase (Locale .ROOT )) : null ;
135+ }
136+
125137 /**
126138 * Retrieves the singular form associated with the specified class as defined by the
127139 * {@link Singular} annotation or computes a default value (lower-cased version of the value
You can’t perform that action at this time.
0 commit comments