Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(core): Sort PropertyGroups by groupName #107

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
import java.io.InputStream;
import java.util.ArrayList;
import java.util.Collection;
import java.util.Comparator;
import java.util.List;
import java.util.Map;
import java.util.Objects;
Expand Down Expand Up @@ -99,6 +100,7 @@ private List<PropertyGroup> flattenValues(Map<String, List<PropertyGroup>> prope
return propertyGroupsByType.values()
.stream()
.flatMap(Collection::stream)
.sorted(Comparator.comparing(PropertyGroup::getGroupName))
.collect(Collectors.toList());
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,26 +10,11 @@
|Key |Type |Description |Default value |Deprecation


|this.is.your.property
|java.lang.String
|This is YOUR property.
|
|
|this.is.a.bean.configuration.configuration-value
|java.lang.String
|A field inside a class that is not property by default by within a Configuration class.
|
|
|this.is.my.nested.nested-value
|java.lang.String
|Nested value.
|
|
|this.is.my.first-level-nested-property.second-level-nested-class.second-level-value
|java.lang.String
|Custom nested
|
|
|this.is.my.another-variable
|java.lang.String
|
Expand Down Expand Up @@ -70,6 +55,21 @@
|Name of the custom property.
|ABC
|
|this.is.my.first-level-nested-property.second-level-nested-class.second-level-value
|java.lang.String
|Custom nested
|
|
|this.is.my.nested.nested-value
|java.lang.String
|Nested value.
|
|
|this.is.your.property
|java.lang.String
|This is YOUR property.
|
|

|===

Original file line number Diff line number Diff line change
Expand Up @@ -139,17 +139,17 @@ <h1 class="center center-text">single-module-example</h1>

<li><a href="#Unknown group">Unknown group - <code>Unknown</code></a></li>

<li><a href="#this.is.your">this.is.your - <code>org.rodnansol.YourProperties</code></a></li>

<li><a href="#this.is.a.bean.configuration">this.is.a.bean.configuration - <code>org.rodnansol.PropertiesForConfiguration</code></a></li>

<li><a href="#this.is.my.nested">this.is.my.nested - <code>org.rodnansol.TopLevelClassNestedProperty</code></a></li>
<li><a href="#this.is.my">this.is.my - <code>org.rodnansol.MyProperties</code></a></li>

<li><a href="#this.is.my.first-level-nested-property">this.is.my.first-level-nested-property - <code>org.rodnansol.FirstLevelNestedProperty</code></a></li>

<li><a href="#this.is.my.first-level-nested-property.second-level-nested-class">this.is.my.first-level-nested-property.second-level-nested-class - <code>org.rodnansol.FirstLevelNestedProperty$SecondLevelNestedClass</code></a></li>

<li><a href="#this.is.my">this.is.my - <code>org.rodnansol.MyProperties</code></a></li>
<li><a href="#this.is.my.nested">this.is.my.nested - <code>org.rodnansol.TopLevelClassNestedProperty</code></a></li>

<li><a href="#this.is.my.first-level-nested-property">this.is.my.first-level-nested-property - <code>org.rodnansol.FirstLevelNestedProperty</code></a></li>
<li><a href="#this.is.your">this.is.your - <code>org.rodnansol.YourProperties</code></a></li>

</ul>

Expand All @@ -171,34 +171,13 @@ <h1 class="center center-text">single-module-example</h1>

</tr>
</thead>
<tr>
<td>this.is.your.property</td>
<td>java.lang.String</td>
<td>This is YOUR property.</td>
<td></td>
<td></td>
</tr>
<tr>
<td>this.is.a.bean.configuration.configuration-value</td>
<td>java.lang.String</td>
<td>A field inside a class that is not property by default by within a Configuration class.</td>
<td></td>
<td></td>
</tr>
<tr>
<td>this.is.my.nested.nested-value</td>
<td>java.lang.String</td>
<td>Nested value.</td>
<td></td>
<td></td>
</tr>
<tr>
<td>this.is.my.first-level-nested-property.second-level-nested-class.second-level-value</td>
<td>java.lang.String</td>
<td>Custom nested</td>
<td></td>
<td></td>
</tr>
<tr>
<td>this.is.my.another-variable</td>
<td>java.lang.String</td>
Expand Down Expand Up @@ -255,6 +234,27 @@ <h1 class="center center-text">single-module-example</h1>
<td>ABC</td>
<td></td>
</tr>
<tr>
<td>this.is.my.first-level-nested-property.second-level-nested-class.second-level-value</td>
<td>java.lang.String</td>
<td>Custom nested</td>
<td></td>
<td></td>
</tr>
<tr>
<td>this.is.my.nested.nested-value</td>
<td>java.lang.String</td>
<td>Nested value.</td>
<td></td>
<td></td>
</tr>
<tr>
<td>this.is.your.property</td>
<td>java.lang.String</td>
<td>This is YOUR property.</td>
<td></td>
<td></td>
</tr>

</table>
<hr>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,19 +1,16 @@
# single-module-example
## Table of Contents
* [**Unknown group** - `Unknown`](#Unknown group)
* [**this.is.your** - `org.rodnansol.YourProperties`](#this.is.your)
* [**this.is.a.bean.configuration** - `org.rodnansol.PropertiesForConfiguration`](#this.is.a.bean.configuration)
* [**this.is.my.nested** - `org.rodnansol.TopLevelClassNestedProperty`](#this.is.my.nested)
* [**this.is.my.first-level-nested-property.second-level-nested-class** - `org.rodnansol.FirstLevelNestedProperty$SecondLevelNestedClass`](#this.is.my.first-level-nested-property.second-level-nested-class)
* [**this.is.my** - `org.rodnansol.MyProperties`](#this.is.my)
* [**this.is.my.first-level-nested-property** - `org.rodnansol.FirstLevelNestedProperty`](#this.is.my.first-level-nested-property)
* [**this.is.my.first-level-nested-property.second-level-nested-class** - `org.rodnansol.FirstLevelNestedProperty$SecondLevelNestedClass`](#this.is.my.first-level-nested-property.second-level-nested-class)
* [**this.is.my.nested** - `org.rodnansol.TopLevelClassNestedProperty`](#this.is.my.nested)
* [**this.is.your** - `org.rodnansol.YourProperties`](#this.is.your)

|Key|Type|Description|Default value|Deprecation|
|---|----|-----------|-------------|-----------|
| this.is.your.property| java.lang.String| This is YOUR property.| | |
| this.is.a.bean.configuration.configuration-value| java.lang.String| A field inside a class that is not property by default by within a Configuration class.| | |
| this.is.my.nested.nested-value| java.lang.String| Nested value.| | |
| this.is.my.first-level-nested-property.second-level-nested-class.second-level-value| java.lang.String| Custom nested| | |
| this.is.my.another-variable| java.lang.String| | with default value| Reason: null, use for replacement: null|
| this.is.my.date| java.time.LocalDate| | | |
| this.is.my.date-time| java.time.LocalDateTime| | | |
Expand All @@ -22,4 +19,7 @@
| this.is.my.variable| java.lang.String| This is my variable.| | |
| this.is.my.first-level-nested-property.desc| java.lang.String| Description of this thing.| 123| |
| this.is.my.first-level-nested-property.name| java.lang.String| Name of the custom property.| ABC| |
| this.is.my.first-level-nested-property.second-level-nested-class.second-level-value| java.lang.String| Custom nested| | |
| this.is.my.nested.nested-value| java.lang.String| Nested value.| | |
| this.is.your.property| java.lang.String| This is YOUR property.| | |

Original file line number Diff line number Diff line change
Expand Up @@ -22,30 +22,6 @@ endif::[]
|===
// end::Unknown group[]

// tag::this.is.your[]
ifndef::property-group-simple-title,property-group-discrete-heading[=== this.is.your +]
ifdef::property-group-simple-title[.*_this.is.your_* +]
ifdef::property-group-discrete-heading[]
[discrete]
=== this.is.your
endif::[]
*Class:* `org.rodnansol.YourProperties`
[cols="2,1,3,1,1,1"]
|===
|Key |Type |Description |Default value |Deprecation|Environment variable


|property
|java.lang.String
|This is YOUR property.
|
|
|`THIS_IS_YOUR_PROPERTY`


|===
// end::this.is.your[]

// tag::this.is.a.bean.configuration[]
ifndef::property-group-simple-title,property-group-discrete-heading[=== this.is.a.bean.configuration +]
ifdef::property-group-simple-title[.*_this.is.a.bean.configuration_* +]
Expand All @@ -70,29 +46,36 @@ endif::[]
|===
// end::this.is.a.bean.configuration[]

// tag::this.is.my.nested[]
ifndef::property-group-simple-title,property-group-discrete-heading[=== this.is.my.nested +]
ifdef::property-group-simple-title[.*_this.is.my.nested_* +]
// tag::this.is.my.first-level-nested-property[]
ifndef::property-group-simple-title,property-group-discrete-heading[=== this.is.my.first-level-nested-property +]
ifdef::property-group-simple-title[.*_this.is.my.first-level-nested-property_* +]
ifdef::property-group-discrete-heading[]
[discrete]
=== this.is.my.nested
=== this.is.my.first-level-nested-property
endif::[]
*Class:* `org.rodnansol.TopLevelClassNestedProperty`
*Class:* `org.rodnansol.FirstLevelNestedProperty`
[cols="2,1,3,1,1,1"]
|===
|Key |Type |Description |Default value |Deprecation|Environment variable


|nested-value
|desc
|java.lang.String
|Nested value.
|Description of this thing.
|123
|
|`THIS_IS_MY_FIRSTLEVELNESTEDPROPERTY_DESC`

|name
|java.lang.String
|Name of the custom property.
|ABC
|
|`THIS_IS_MY_NESTED_NESTEDVALUE`
|`THIS_IS_MY_FIRSTLEVELNESTEDPROPERTY_NAME`


|===
// end::this.is.my.nested[]
// end::this.is.my.first-level-nested-property[]

// tag::this.is.my.first-level-nested-property.second-level-nested-class[]
ifndef::property-group-simple-title,property-group-discrete-heading[=== this.is.my.first-level-nested-property.second-level-nested-class +]
Expand All @@ -118,35 +101,52 @@ endif::[]
|===
// end::this.is.my.first-level-nested-property.second-level-nested-class[]

// tag::this.is.my.first-level-nested-property[]
ifndef::property-group-simple-title,property-group-discrete-heading[=== this.is.my.first-level-nested-property +]
ifdef::property-group-simple-title[.*_this.is.my.first-level-nested-property_* +]
// tag::this.is.my.nested[]
ifndef::property-group-simple-title,property-group-discrete-heading[=== this.is.my.nested +]
ifdef::property-group-simple-title[.*_this.is.my.nested_* +]
ifdef::property-group-discrete-heading[]
[discrete]
=== this.is.my.first-level-nested-property
=== this.is.my.nested
endif::[]
*Class:* `org.rodnansol.FirstLevelNestedProperty`
*Class:* `org.rodnansol.TopLevelClassNestedProperty`
[cols="2,1,3,1,1,1"]
|===
|Key |Type |Description |Default value |Deprecation|Environment variable


|desc
|nested-value
|java.lang.String
|Description of this thing.
|123
|Nested value.
|
|`THIS_IS_MY_FIRSTLEVELNESTEDPROPERTY_DESC`
|
|`THIS_IS_MY_NESTED_NESTEDVALUE`

|name

|===
// end::this.is.my.nested[]

// tag::this.is.your[]
ifndef::property-group-simple-title,property-group-discrete-heading[=== this.is.your +]
ifdef::property-group-simple-title[.*_this.is.your_* +]
ifdef::property-group-discrete-heading[]
[discrete]
=== this.is.your
endif::[]
*Class:* `org.rodnansol.YourProperties`
[cols="2,1,3,1,1,1"]
|===
|Key |Type |Description |Default value |Deprecation|Environment variable


|property
|java.lang.String
|Name of the custom property.
|ABC
|This is YOUR property.
|
|`THIS_IS_MY_FIRSTLEVELNESTEDPROPERTY_NAME`
|
|`THIS_IS_YOUR_PROPERTY`


|===
// end::this.is.my.first-level-nested-property[]
// end::this.is.your[]


Loading