Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Sign in / Register
Toggle navigation
S
spring-boot
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
DEMO
spring-boot
Commits
29202593
Commit
29202593
authored
Jan 24, 2018
by
Andy Wilkinson
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Omit null properties from actuator endpoint API response examples
Closes gh-11757
parent
41bfe079
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
11 additions
and
8 deletions
+11
-8
AbstractEndpointDocumentationTests.java
...web/documentation/AbstractEndpointDocumentationTests.java
+2
-1
LiquibaseEndpointDocumentationTests.java
...eb/documentation/LiquibaseEndpointDocumentationTests.java
+6
-3
MockMvcEndpointDocumentationTests.java
.../web/documentation/MockMvcEndpointDocumentationTests.java
+1
-2
ThreadDumpEndpointDocumentationTests.java
...b/documentation/ThreadDumpEndpointDocumentationTests.java
+2
-2
No files found.
spring-boot-project/spring-boot-actuator-autoconfigure/src/test/java/org/springframework/boot/actuate/autoconfigure/endpoint/web/documentation/AbstractEndpointDocumentationTests.java
View file @
29202593
...
@@ -56,7 +56,8 @@ import static org.springframework.restdocs.payload.PayloadDocumentation.fieldWit
...
@@ -56,7 +56,8 @@ import static org.springframework.restdocs.payload.PayloadDocumentation.fieldWit
* @author Andy Wilkinson
* @author Andy Wilkinson
*/
*/
@TestPropertySource
(
properties
=
{
"spring.jackson.serialization.indent_output=true"
,
@TestPropertySource
(
properties
=
{
"spring.jackson.serialization.indent_output=true"
,
"management.endpoints.web.expose=*"
})
"management.endpoints.web.expose=*"
,
"spring.jackson.default-property-inclusion=non_null"
})
public
class
AbstractEndpointDocumentationTests
{
public
class
AbstractEndpointDocumentationTests
{
protected
String
describeEnumValues
(
Class
<?
extends
Enum
<?>>
enumType
)
{
protected
String
describeEnumValues
(
Class
<?
extends
Enum
<?>>
enumType
)
{
...
...
spring-boot-project/spring-boot-actuator-autoconfigure/src/test/java/org/springframework/boot/actuate/autoconfigure/endpoint/web/documentation/LiquibaseEndpointDocumentationTests.java
View file @
29202593
...
@@ -31,6 +31,7 @@ import org.springframework.context.annotation.Configuration;
...
@@ -31,6 +31,7 @@ import org.springframework.context.annotation.Configuration;
import
org.springframework.context.annotation.Import
;
import
org.springframework.context.annotation.Import
;
import
org.springframework.restdocs.mockmvc.MockMvcRestDocumentation
;
import
org.springframework.restdocs.mockmvc.MockMvcRestDocumentation
;
import
org.springframework.restdocs.payload.FieldDescriptor
;
import
org.springframework.restdocs.payload.FieldDescriptor
;
import
org.springframework.restdocs.payload.JsonFieldType
;
import
static
org
.
springframework
.
restdocs
.
payload
.
PayloadDocumentation
.
fieldWithPath
;
import
static
org
.
springframework
.
restdocs
.
payload
.
PayloadDocumentation
.
fieldWithPath
;
import
static
org
.
springframework
.
restdocs
.
payload
.
PayloadDocumentation
.
responseFields
;
import
static
org
.
springframework
.
restdocs
.
payload
.
PayloadDocumentation
.
responseFields
;
...
@@ -80,9 +81,11 @@ public class LiquibaseEndpointDocumentationTests
...
@@ -80,9 +81,11 @@ public class LiquibaseEndpointDocumentationTests
fieldWithPath
(
"labels"
)
fieldWithPath
(
"labels"
)
.
description
(
"Labels associated with the change set."
),
.
description
(
"Labels associated with the change set."
),
fieldWithPath
(
"checksum"
).
description
(
"Checksum of the change set."
),
fieldWithPath
(
"checksum"
).
description
(
"Checksum of the change set."
),
fieldWithPath
(
"orderExecuted"
)
fieldWithPath
(
"orderExecuted"
).
description
(
.
description
(
"Order of the execution of the change set."
),
"Order of the execution of the change set."
),
fieldWithPath
(
"tag"
).
description
(
"Tag associated with the change set."
));
fieldWithPath
(
"tag"
)
.
description
(
"Tag associated with the change set, if any."
)
.
optional
().
type
(
JsonFieldType
.
STRING
));
}
}
@Configuration
@Configuration
...
...
spring-boot-project/spring-boot-actuator-autoconfigure/src/test/java/org/springframework/boot/actuate/autoconfigure/endpoint/web/documentation/MockMvcEndpointDocumentationTests.java
View file @
29202593
...
@@ -36,8 +36,7 @@ import org.springframework.web.context.WebApplicationContext;
...
@@ -36,8 +36,7 @@ import org.springframework.web.context.WebApplicationContext;
* @author Andy Wilkinson
* @author Andy Wilkinson
*/
*/
@RunWith
(
SpringRunner
.
class
)
@RunWith
(
SpringRunner
.
class
)
@SpringBootTest
(
properties
=
{
"spring.jackson.serialization.indent_output=true"
,
@SpringBootTest
"management.endpoints.web.expose=*"
})
public
abstract
class
MockMvcEndpointDocumentationTests
public
abstract
class
MockMvcEndpointDocumentationTests
extends
AbstractEndpointDocumentationTests
{
extends
AbstractEndpointDocumentationTests
{
...
...
spring-boot-project/spring-boot-actuator-autoconfigure/src/test/java/org/springframework/boot/actuate/autoconfigure/endpoint/web/documentation/ThreadDumpEndpointDocumentationTests.java
View file @
29202593
...
@@ -123,8 +123,8 @@ public class ThreadDumpEndpointDocumentationTests
...
@@ -123,8 +123,8 @@ public class ThreadDumpEndpointDocumentationTests
fieldWithPath
(
"threads.[].lockOwnerName"
)
fieldWithPath
(
"threads.[].lockOwnerName"
)
.
description
(
"Name of the thread that owns the "
.
description
(
"Name of the thread that owns the "
+
"object on which the thread is "
+
"object on which the thread is "
+
"blocked."
)
+
"blocked
, if any
."
)
.
optional
(),
.
optional
()
.
type
(
JsonFieldType
.
STRING
)
,
fieldWithPath
(
"threads.[].priority"
)
fieldWithPath
(
"threads.[].priority"
)
.
description
(
"Priority of the thread. Only "
.
description
(
"Priority of the thread. Only "
+
"available on Java 9 or later."
)
+
"available on Java 9 or later."
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment