-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathSchemaGeneratorOptions.cs
More file actions
49 lines (46 loc) · 1.38 KB
/
Copy pathSchemaGeneratorOptions.cs
File metadata and controls
49 lines (46 loc) · 1.38 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
// Add options for customization
public class SchemaGeneratorOptions
{
public bool InferFormats { get; set; } = true;
public bool MarkAllRequired { get; set; } = true;
public bool AddExamples { get; set; } = false;
public bool AddDescriptions { get; set; } = false;
}
{
"type": "object",
"properties": {
"id": { "type": "integer" },
"name": { "type": "string" },
"email": { "type": "string", "format": "email" },
"website": { "type": "string", "format": "uri" },
"rating": { "type": "number" },
"isActive": { "type": "boolean" },
"createdAt": { "type": "string", "format": "date-time" },
"address": {
"type": "object",
"properties": {
"street": { "type": "string" },
"city": { "type": "string" },
"zip": { "type": "string" }
},
"required": ["street", "city", "zip"]
},
"inspections": {
"type": "array",
"items": {
"type": "object",
"properties": {
"date": { "type": "string", "format": "date-time" },
"score": { "type": "integer" },
"passed": { "type": "boolean" }
},
"required": ["date", "score", "passed"]
}
},
"tags": {
"type": "array",
"items": { "type": "string" }
}
},
"required": ["id", "name", "email", "website", "rating", "isActive", "createdAt", "address", "inspections", "tags"]
}