Skip to content

Conversation

@sai-prajeet
Copy link
Collaborator

Added support for Array Types

"writable": true,
"schema": {
"@type": "Array",
"elementSchema": "string"
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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; }
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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",
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants