File tree 8 files changed +82
-8
lines changed
JsonSchema.Net.Generation.DataAnnotations
8 files changed +82
-8
lines changed Original file line number Diff line number Diff line change @@ -10,6 +10,8 @@ order: "10.12.004"
10
10
** Inheritance:**
11
11
` InterpreterException `
12
12
🡒
13
+ ` JsonEException `
14
+ 🡒
13
15
` Exception `
14
16
🡒
15
17
` object `
Original file line number Diff line number Diff line change @@ -4,5 +4,5 @@ bookmark: JsonE.Net
4
4
permalink : /api/JsonE.Net/:title/
5
5
folder : true
6
6
order : " 10.12"
7
- version : " 2.1.1 "
7
+ version : " 2.1.2 "
8
8
---
Original file line number Diff line number Diff line change @@ -34,7 +34,7 @@ Represents a JSON Pointer IAW RFC 6901.
34
34
| ---| ---| ---|
35
35
| ** Count** | int | Gets the number of segments in the pointer. |
36
36
| ** Item** | string | Gets a segment value by index. |
37
- | ** Item** | JsonPointer | Creates a new pointer with the indicated segments. |
37
+ | ** Item** | JsonPointer | |
38
38
39
39
## Methods
40
40
@@ -246,22 +246,16 @@ A new pointer.
246
246
247
247
### GetSubPointer(Range range)
248
248
249
- Creates a new pointer with the indicated segments.
250
249
251
250
#### Declaration
252
251
253
252
``` c#
254
253
public JsonPointer GetSubPointer (Range range )
255
254
```
256
255
257
- | Parameter | Type | Description |
258
- | ---| ---| ---|
259
- | range | Range | The segment range for the new pointer. |
260
-
261
256
262
257
#### Returns
263
258
264
- A new pointer.
265
259
266
260
### Parse(string source)
267
261
Original file line number Diff line number Diff line change @@ -17,16 +17,34 @@ order: "10.06.000"
17
17
- IAttributeHandler\< AllowedValuesAttribute\>
18
18
- IAttributeHandler
19
19
20
+ Adds an ` enum ` keyword for the indicated values.
21
+
22
+ ## Remarks
23
+
24
+ For NativeAOT scenarios, only primitive JSON types are supported.
20
25
21
26
## Methods
22
27
23
28
### AddConstraints(SchemaGenerationContextBase context, Attribute attribute)
24
29
30
+ Processes the type and any attributes (present on the context), and adds
31
+ intents to the context.
25
32
26
33
#### Declaration
27
34
28
35
``` c#
29
36
public void AddConstraints (SchemaGenerationContextBase context , Attribute attribute )
30
37
```
31
38
39
+ | Parameter | Type | Description |
40
+ | ---| ---| ---|
41
+ | context | SchemaGenerationContextBase | The generation context. |
42
+ | attribute | Attribute | The attribute. |
43
+
44
+
45
+ #### Remarks
46
+
47
+ A common pattern is to implement ** Json.Schema.Generation.IAttributeHandler** on the
48
+ attribute itself. In this case, the <paramref name =" attribute " /> parameter
49
+ will be the same instance as the handler and can likely be ignored.
32
50
Original file line number Diff line number Diff line change @@ -19,4 +19,24 @@ order: "10.06.001"
19
19
- IAttributeHandler\< Base64StringAttribute\>
20
20
- IAttributeHandler
21
21
22
+ Adds a ` format ` keyword with ` base64 ` .
23
+
24
+ ## Remarks
25
+
26
+ By default, ` format ` is an annotation only. No validation will occur unless configured to do so.
27
+
28
+ The ` base64 ` format is defined by the OpenAPI 3.1 specification.
29
+
30
+ ## Constructors
31
+
32
+ ### Base64StringAttributeAttributeHandler()
33
+
34
+ Creates a new ** Json.Schema.Generation.DataAnnotations.Base64StringAttributeAttributeHandler** .
35
+
36
+ #### Declaration
37
+
38
+ ``` c#
39
+ public Base64StringAttributeAttributeHandler ()
40
+ ```
41
+
22
42
Original file line number Diff line number Diff line change @@ -17,16 +17,34 @@ order: "10.06.003"
17
17
- IAttributeHandler\< DeniedValuesAttribute\>
18
18
- IAttributeHandler
19
19
20
+ Adds a ` not: {enum} ` construct for the indicated values.
21
+
22
+ ## Remarks
23
+
24
+ For NativeAOT scenarios, only primitive JSON types are supported.
20
25
21
26
## Methods
22
27
23
28
### AddConstraints(SchemaGenerationContextBase context, Attribute attribute)
24
29
30
+ Processes the type and any attributes (present on the context), and adds
31
+ intents to the context.
25
32
26
33
#### Declaration
27
34
28
35
``` c#
29
36
public void AddConstraints (SchemaGenerationContextBase context , Attribute attribute )
30
37
```
31
38
39
+ | Parameter | Type | Description |
40
+ | ---| ---| ---|
41
+ | context | SchemaGenerationContextBase | The generation context. |
42
+ | attribute | Attribute | The attribute. |
43
+
44
+
45
+ #### Remarks
46
+
47
+ A common pattern is to implement ** Json.Schema.Generation.IAttributeHandler** on the
48
+ attribute itself. In this case, the <paramref name =" attribute " /> parameter
49
+ will be the same instance as the handler and can likely be ignored.
32
50
Original file line number Diff line number Diff line change @@ -17,16 +17,34 @@ order: "10.06.007"
17
17
- IAttributeHandler\< LengthAttribute\>
18
18
- IAttributeHandler
19
19
20
+ Adds ` minLength ` and ` maxLength ` keywords.
21
+
22
+ ## Remarks
23
+
24
+ ` minLength ` will be not be added if the value is less than or equal to zero.
20
25
21
26
## Methods
22
27
23
28
### AddConstraints(SchemaGenerationContextBase context, Attribute attribute)
24
29
30
+ Processes the type and any attributes (present on the context), and adds
31
+ intents to the context.
25
32
26
33
#### Declaration
27
34
28
35
``` c#
29
36
public void AddConstraints (SchemaGenerationContextBase context , Attribute attribute )
30
37
```
31
38
39
+ | Parameter | Type | Description |
40
+ | ---| ---| ---|
41
+ | context | SchemaGenerationContextBase | The generation context. |
42
+ | attribute | Attribute | The attribute. |
43
+
44
+
45
+ #### Remarks
46
+
47
+ A common pattern is to implement ** Json.Schema.Generation.IAttributeHandler** on the
48
+ attribute itself. In this case, the <paramref name =" attribute " /> parameter
49
+ will be the same instance as the handler and can likely be ignored.
32
50
Original file line number Diff line number Diff line change @@ -4,6 +4,10 @@ title: JsonE.Net
4
4
icon : fas fa-tag
5
5
order : " 09.12"
6
6
---
7
+ # [ 2.1.2] ( https://github.com/gregsdennis/json-everything/commits/6a426380c5597312945d4e743d44c3f530f7f18e ) {#release-e-2.1.2}
8
+
9
+ ` InterpreterException ` now derives from ` JsonEException ` like all of the other exceptions.
10
+
7
11
# [ 2.1.1] ( https://github.com/gregsdennis/json-everything/pull/714 ) {#release-e-2.1.1}
8
12
9
13
[ #713 ] ( https://github.com/gregsdennis/json-everything/issues/713 ) - Fixes an issue where branches of ` $if ` and ` $switch ` would be evaluated whether they were needed or not. Thanks to [ @mi25iw ] ( https://github.com/mi25iw ) for finding and fixing this.
You can’t perform that action at this time.
0 commit comments