diff --git a/jsonschema2pojo-core/src/main/java/org/jsonschema2pojo/util/Inflector.java b/jsonschema2pojo-core/src/main/java/org/jsonschema2pojo/util/Inflector.java index 0cb6ba14b..cd05535d7 100644 --- a/jsonschema2pojo-core/src/main/java/org/jsonschema2pojo/util/Inflector.java +++ b/jsonschema2pojo-core/src/main/java/org/jsonschema2pojo/util/Inflector.java @@ -88,6 +88,7 @@ public static Inflector.Builder createDefaultBuilder() .singular("(o)es$", "$1") .singular("(shoe)s$", "$1") .singular("(cris|ax|test)es$", "$1is") + .singular("(tax)es$", "$1") .singular("([octop|vir])i$", "$1us") .singular("(alias|status)es$", "$1") .singular("^(ox)en", "$1") diff --git a/jsonschema2pojo-core/src/test/java/org/jsonschema2pojo/util/InflectorTest.java b/jsonschema2pojo-core/src/test/java/org/jsonschema2pojo/util/InflectorTest.java index 4fe150264..b07e66061 100644 --- a/jsonschema2pojo-core/src/test/java/org/jsonschema2pojo/util/InflectorTest.java +++ b/jsonschema2pojo-core/src/test/java/org/jsonschema2pojo/util/InflectorTest.java @@ -61,6 +61,7 @@ public void testSingularize() { assertThat(Inflector.getInstance().singularize("s"), is("s")); assertThat(Inflector.getInstance().singularize("status"), is("status")); assertThat(Inflector.getInstance().singularize("statuses"), is("status")); + assertThat(Inflector.getInstance().singularize("LineItemTaxes"), is("LineItemTax")); assertThat(Inflector.getInstance().pluralize("mattress"), is("mattresses")); assertThat(Inflector.getInstance().pluralize("address"), is("addresses"));