This repository was archived by the owner on Dec 19, 2023. It is now read-only.
File tree Expand file tree Collapse file tree 5 files changed +15
-31
lines changed
playground-spring-boot-autoconfigure/src/main
java/com/oembedler/moon/playground/boot Expand file tree Collapse file tree 5 files changed +15
-31
lines changed Original file line number Diff line number Diff line change 3
3
import com .oembedler .moon .playground .boot .properties .PlaygroundProperties ;
4
4
import lombok .Data ;
5
5
import org .springframework .boot .context .properties .ConfigurationProperties ;
6
+ import org .springframework .boot .context .properties .NestedConfigurationProperty ;
6
7
import org .springframework .validation .annotation .Validated ;
7
8
8
9
@ Data
9
10
@ ConfigurationProperties (prefix = "graphql" )
10
11
@ Validated
11
12
public class PlaygroundPropertiesConfiguration {
12
13
14
+ @ NestedConfigurationProperty
13
15
private PlaygroundProperties playground = new PlaygroundProperties ();
14
16
}
Original file line number Diff line number Diff line change 3
3
import com .fasterxml .jackson .annotation .JsonIgnore ;
4
4
import com .fasterxml .jackson .annotation .JsonInclude ;
5
5
import lombok .Data ;
6
+ import org .springframework .boot .context .properties .NestedConfigurationProperty ;
6
7
7
8
import javax .validation .constraints .NotEmpty ;
8
9
import java .util .Collections ;
@@ -19,15 +20,18 @@ public class PlaygroundProperties {
19
20
@ NotEmpty
20
21
private String subscriptionEndpoint = "/subscriptions" ;
21
22
23
+ @ NestedConfigurationProperty
22
24
@ JsonIgnore
23
25
private PlaygroundCdn cdn = new PlaygroundCdn ();
24
26
25
27
@ JsonIgnore
26
28
private String pageTitle = "Playground" ;
27
29
30
+ @ NestedConfigurationProperty
28
31
private PlaygroundSettings settings ;
29
32
30
33
private Map <String , String > headers = Collections .emptyMap ();
31
34
35
+ @ NestedConfigurationProperty
32
36
private List <PlaygroundTab > tabs = Collections .emptyList ();
33
37
}
Original file line number Diff line number Diff line change 8
8
import com .oembedler .moon .playground .boot .properties .settings .PlaygroundSchemaSettings ;
9
9
import com .oembedler .moon .playground .boot .properties .settings .PlaygroundTracingSettings ;
10
10
import lombok .Data ;
11
+ import org .springframework .boot .context .properties .NestedConfigurationProperty ;
11
12
12
13
@ Data
13
14
@ JsonInclude (JsonInclude .Include .NON_NULL )
14
15
public class PlaygroundSettings {
15
16
17
+ @ NestedConfigurationProperty
16
18
@ JsonUnwrapped (prefix = "editor." )
17
19
private PlaygroundEditorSettings editor ;
18
20
21
+ @ NestedConfigurationProperty
19
22
@ JsonUnwrapped (prefix = "prettier." )
20
23
private PlaygroundPrettierSettings prettier ;
21
24
25
+ @ NestedConfigurationProperty
22
26
@ JsonUnwrapped (prefix = "request." )
23
27
private PlaygroundRequestSettings request ;
24
28
29
+ @ NestedConfigurationProperty
25
30
@ JsonUnwrapped (prefix = "schema." )
26
31
private PlaygroundSchemaSettings schema ;
27
32
33
+ @ NestedConfigurationProperty
28
34
@ JsonUnwrapped (prefix = "tracing." )
29
35
private PlaygroundTracingSettings tracing ;
30
36
}
Original file line number Diff line number Diff line change 3
3
import com .fasterxml .jackson .annotation .JsonInclude ;
4
4
import com .fasterxml .jackson .annotation .JsonUnwrapped ;
5
5
import lombok .Data ;
6
+ import org .springframework .boot .context .properties .NestedConfigurationProperty ;
6
7
7
8
@ Data
8
9
@ JsonInclude (JsonInclude .Include .NON_NULL )
9
10
public class PlaygroundSchemaSettings {
10
11
11
12
private Boolean disableComments ;
12
13
14
+ @ NestedConfigurationProperty
13
15
@ JsonUnwrapped (prefix = "polling." )
14
16
private PlaygroundSchemaPollingSettings polling ;
15
17
}
Original file line number Diff line number Diff line change 1
1
{
2
- "groups" : [
3
- {
4
- "name" : " playground"
5
- }
6
- ],
7
2
"properties" : [
8
3
{
9
- "name" : " playground.mapping" ,
4
+ "name" : " graphql. playground.mapping" ,
10
5
"defaultValue" : " /playground" ,
11
6
"type" : " java.lang.String"
12
- },
13
- {
14
- "name" : " playground.endpoint.graphql" ,
15
- "defaultValue" : " /graphql" ,
16
- "type" : " java.lang.String"
17
- },
18
- {
19
- "name" : " playground.endpoint.subscriptions" ,
20
- "defaultValue" : " /subscriptions" ,
21
- "type" : " java.lang.String"
22
- },
23
- {
24
- "name" : " playground.cdn.enabled" ,
25
- "defaultValue" : false ,
26
- "type" : " java.lang.Boolean"
27
- },
28
- {
29
- "name" : " playground.cdn.version" ,
30
- "defaultValue" : " latest" ,
31
- "type" : " java.lang.String"
32
- },
33
- {
34
- "name" : " playground.pageTitle" ,
35
- "defaultValue" : " Playground" ,
36
- "type" : " java.lang.String"
37
7
}
38
8
]
39
9
}
You can’t perform that action at this time.
0 commit comments