1
1
// Licensed to the .NET Foundation under one or more agreements.
2
2
// The .NET Foundation licenses this file to you under the MIT license.
3
3
4
+ using System . Text . Json . Serialization ;
4
5
using Docfx . Common ;
5
6
using Docfx . Plugins ;
6
7
@@ -18,24 +19,28 @@ internal class BuildJsonConfig
18
19
/// Contains all the files to generate documentation, including metadata yml files and conceptual md files.
19
20
/// </summary>
20
21
[ JsonProperty ( "content" ) ]
22
+ [ JsonPropertyName ( "content" ) ]
21
23
public FileMapping Content { get ; set ; }
22
24
23
25
/// <summary>
24
26
/// Contains all the resource files that conceptual and metadata files dependent on, e.g. image files.
25
27
/// </summary>
26
28
[ JsonProperty ( "resource" ) ]
29
+ [ JsonPropertyName ( "resource" ) ]
27
30
public FileMapping Resource { get ; set ; }
28
31
29
32
/// <summary>
30
33
/// Contains all the conceptual files which contains yaml header with uid and is intended to override the existing metadata yml files.
31
34
/// </summary>
32
35
[ JsonProperty ( "overwrite" ) ]
36
+ [ JsonPropertyName ( "overwrite" ) ]
33
37
public FileMapping Overwrite { get ; set ; }
34
38
35
39
/// <summary>
36
40
/// Specifies the urls of xrefmap used by content files. Supports local file path and HTTP/HTTPS urls.
37
41
/// </summary>
38
42
[ JsonProperty ( "xref" ) ]
43
+ [ JsonPropertyName ( "xref" ) ]
39
44
public ListWithStringFallback Xref { get ; set ; }
40
45
41
46
/// <summary>
@@ -44,26 +49,30 @@ internal class BuildJsonConfig
44
49
/// </summary>
45
50
[ Obsolete ( "Use output instead." ) ]
46
51
[ JsonProperty ( "dest" ) ]
52
+ [ JsonPropertyName ( "dest" ) ]
47
53
public string Dest { get ; set ; }
48
54
49
55
/// <summary>
50
56
/// Defines the output folder of the generated build files.
51
57
/// Command line --output argument override this value.
52
58
/// </summary>
53
59
[ JsonProperty ( "output" ) ]
60
+ [ JsonPropertyName ( "output" ) ]
54
61
public string Output { get ; set ; }
55
62
56
63
/// <summary>
57
64
/// Contains metadata that will be applied to every file, in key-value pair format.
58
65
/// </summary>
59
66
[ JsonProperty ( "globalMetadata" ) ]
60
- [ JsonConverter ( typeof ( JObjectDictionaryToObjectDictionaryConverter ) ) ]
67
+ [ JsonPropertyName ( "globalMetadata" ) ]
68
+ [ Newtonsoft . Json . JsonConverter ( typeof ( JObjectDictionaryToObjectDictionaryConverter ) ) ]
61
69
public Dictionary < string , object > GlobalMetadata { get ; set ; }
62
70
63
71
/// <summary>
64
72
/// Specify a list of JSON file path containing globalMetadata settings.
65
73
/// </summary>
66
74
[ JsonProperty ( "globalMetadataFiles" ) ]
75
+ [ JsonPropertyName ( "globalMetadataFiles" ) ]
67
76
public ListWithStringFallback GlobalMetadataFiles { get ; set ; } = new ListWithStringFallback ( ) ;
68
77
69
78
/// <summary>
@@ -74,12 +83,14 @@ internal class BuildJsonConfig
74
83
/// The value is the value of the metadata.
75
84
/// </summary>
76
85
[ JsonProperty ( "fileMetadata" ) ]
86
+ [ JsonPropertyName ( "fileMetadata" ) ]
77
87
public Dictionary < string , FileMetadataPairs > FileMetadata { get ; set ; }
78
88
79
89
/// <summary>
80
90
/// Specify a list of JSON file path containing fileMetadata settings.
81
91
/// </summary>
82
92
[ JsonProperty ( "fileMetadataFiles" ) ]
93
+ [ JsonPropertyName ( "fileMetadataFiles" ) ]
83
94
public ListWithStringFallback FileMetadataFiles { get ; set ; } = new ListWithStringFallback ( ) ;
84
95
85
96
/// <summary>
@@ -88,6 +99,7 @@ internal class BuildJsonConfig
88
99
/// If omitted, embedded default template will be used.
89
100
/// </summary>
90
101
[ JsonProperty ( "template" ) ]
102
+ [ JsonPropertyName ( "template" ) ]
91
103
public ListWithStringFallback Template { get ; set ; } = new ListWithStringFallback ( ) ;
92
104
93
105
/// <summary>
@@ -98,6 +110,7 @@ internal class BuildJsonConfig
98
110
/// If omitted, no theme will be applied, the default theme inside the template will be used.
99
111
/// </summary>
100
112
[ JsonProperty ( "theme" ) ]
113
+ [ JsonPropertyName ( "theme" ) ]
101
114
public ListWithStringFallback Theme { get ; set ; }
102
115
103
116
/// <summary>
@@ -110,6 +123,7 @@ internal class BuildJsonConfig
110
123
/// </code>
111
124
/// </example>
112
125
[ JsonProperty ( "postProcessors" ) ]
126
+ [ JsonPropertyName ( "postProcessors" ) ]
113
127
public ListWithStringFallback PostProcessors { get ; set ; } = new ListWithStringFallback ( ) ;
114
128
115
129
/// <summary>
@@ -118,64 +132,74 @@ internal class BuildJsonConfig
118
132
/// If not specified, it is false
119
133
/// </summary>
120
134
[ JsonProperty ( "debug" ) ]
135
+ [ JsonPropertyName ( "debug" ) ]
121
136
public bool ? Debug { get ; set ; }
122
137
123
138
/// <summary>
124
139
/// The output folder for files generated for debugging purpose when in debug mode.
125
140
/// If not specified, it is ${TempPath}/docfx
126
141
/// </summary>
127
142
[ JsonProperty ( "debugOutput" ) ]
143
+ [ JsonPropertyName ( "debugOutput" ) ]
128
144
public string DebugOutput { get ; set ; }
129
145
130
146
/// <summary>
131
147
/// If set to true, data model to run template script will be extracted in .raw.model.json extension.
132
148
/// </summary>
133
149
[ JsonProperty ( "exportRawModel" ) ]
150
+ [ JsonPropertyName ( "exportRawModel" ) ]
134
151
public bool ? ExportRawModel { get ; set ; }
135
152
136
153
/// <summary>
137
154
/// Specify the output folder for the raw model.
138
155
/// If not set, the raw model will be generated to the same folder as the output documentation.
139
156
/// </summary>
140
157
[ JsonProperty ( "rawModelOutputFolder" ) ]
158
+ [ JsonPropertyName ( "rawModelOutputFolder" ) ]
141
159
public string RawModelOutputFolder { get ; set ; }
142
160
143
161
/// <summary>
144
162
/// If set to true, data model to apply template will be extracted in .view.model.json extension.
145
163
/// </summary>
146
164
[ JsonProperty ( "exportViewModel" ) ]
165
+ [ JsonPropertyName ( "exportViewModel" ) ]
147
166
public bool ? ExportViewModel { get ; set ; }
148
167
149
168
/// <summary>
150
169
/// Specify the output folder for the view model.
151
170
/// If not set, the view model will be generated to the same folder as the output documentation.
152
171
/// </summary>
153
172
[ JsonProperty ( "viewModelOutputFolder" ) ]
173
+ [ JsonPropertyName ( "viewModelOutputFolder" ) ]
154
174
public string ViewModelOutputFolder { get ; set ; }
155
175
156
176
/// <summary>
157
177
/// If set to true, template will not be actually applied to the documents.
158
178
/// This option is always used with --exportRawModel or --exportViewModel is set so that only raw model files or view model files are generated.
159
179
/// </summary>
160
180
[ JsonProperty ( "dryRun" ) ]
181
+ [ JsonPropertyName ( "dryRun" ) ]
161
182
public bool ? DryRun { get ; set ; }
162
183
163
184
/// <summary>
164
185
/// Set the max parallelism, 0 is auto.
165
186
/// </summary>
166
187
[ JsonProperty ( "maxParallelism" ) ]
188
+ [ JsonPropertyName ( "maxParallelism" ) ]
167
189
public int ? MaxParallelism { get ; set ; }
168
190
169
191
/// <summary>
170
192
/// Set the parameters for markdown engine, value should be a JSON string.
171
193
/// </summary>
172
194
[ JsonProperty ( "markdownEngineProperties" ) ]
195
+ [ JsonPropertyName ( "markdownEngineProperties" ) ]
173
196
public MarkdownServiceProperties MarkdownEngineProperties { get ; set ; }
174
197
175
198
/// <summary>
176
199
/// Set the name of ICustomHrefGenerator derived class.
177
200
/// </summary>
178
201
[ JsonProperty ( "customLinkResolver" ) ]
202
+ [ JsonPropertyName ( "customLinkResolver" ) ]
179
203
public string CustomLinkResolver { get ; set ; }
180
204
181
205
/// <summary>
@@ -192,25 +216,29 @@ internal class BuildJsonConfig
192
216
/// </code>
193
217
/// </example>
194
218
[ JsonProperty ( "groups" ) ]
219
+ [ JsonPropertyName ( "groups" ) ]
195
220
public Dictionary < string , GroupConfig > Groups { get ; set ; }
196
221
197
222
/// <summary>
198
223
/// If set to true, docfx does not dereference (aka. copy) file to the output folder.
199
224
/// Instead, it saves a link_to_path property inside manifest.json to indicate the physical location of that file.
200
225
/// </summary>
201
226
[ JsonProperty ( "keepFileLink" ) ]
227
+ [ JsonPropertyName ( "keepFileLink" ) ]
202
228
public bool KeepFileLink { get ; set ; }
203
229
204
230
/// <summary>
205
231
/// Specifies the options for the sitemap.xml file.
206
232
/// </summary>
207
233
[ JsonProperty ( "sitemap" ) ]
234
+ [ JsonPropertyName ( "sitemap" ) ]
208
235
public SitemapOptions Sitemap { get ; set ; }
209
236
210
237
/// <summary>
211
238
/// Disable fetching Git related information for articles.
212
239
/// By default it is enabled and may have side effect on performance when the repo is large.
213
240
/// </summary>
214
241
[ JsonProperty ( "disableGitFeatures" ) ]
242
+ [ JsonPropertyName ( "disableGitFeatures" ) ]
215
243
public bool DisableGitFeatures { get ; set ; }
216
244
}
0 commit comments