added code to support array type Properties#34
Conversation
| "writable": true, | ||
| "schema": { | ||
| "@type": "Array", | ||
| "elementSchema": "string" |
There was a problem hiding this comment.
Why are you not including this schema in the model?
| [JsonPropertyName("capabilities")] | ||
| public IDictionary<string, bool>? Capabilities { get; set; } | ||
| [JsonPropertyName("geometry")] | ||
| public Array? Geometry { get; set; } |
There was a problem hiding this comment.
You need to provide a unit test on how this property can be used including: deserialization, iterating, adding or removing elements, etc.
| "name": "geometry", | ||
| "writable": true, | ||
| "schema": { | ||
| "@type": "Array", |
There was a problem hiding this comment.
For GeoJSON Geometry purposes, we don't want 1 array property; Geometry should be its own model and have 4 sub-types: point, line, polygon, multi-polygon. Then the space model can have a relationship to the geometry object (that could happen to be a polygon or a multi-polygon.
The other alternative is to use the generic Array as you do here, but still has to be the type of the coordinates, not the geometry (geometry should have a type property as well).
Whichever approach you use, it's important to see it in action in the unit tests before we can move forward.
Added support for Array Types