Skip to content

Commit

Permalink
fix: extend schema for meta properties (#607)
Browse files Browse the repository at this point in the history
Extend the schema to cover the cases where meta contains
schema data for object valued properties like

  "meta": {
    "description": "The position of the vessel in 2 or 3 dimensions (WGS84 datum)",
    "properties": {
      "longitude": {
        "type": "number",
        "description": "Longitude",
        "units": "deg",
        "example": 4.98765245
      },
      "latitude": {
        "type": "number",
        "description": "Latitude",
        "units": "deg",
        "example": 52.0987654
      },
      "altitude": {
        "type": "number",
        "description": "Altitude",
        "units": "m"
      }
    }
  },
  • Loading branch information
tkurki authored Mar 27, 2021
1 parent 713e3c3 commit c71c367
Showing 1 changed file with 32 additions and 0 deletions.
32 changes: 32 additions & 0 deletions schemas/definitions.json
Original file line number Diff line number Diff line change
Expand Up @@ -572,6 +572,38 @@
"example": ["stopped", "started", "unusable"]
},

"properties": {
"type": "object",
"title": "Properties for object valued properties",
"patternProperties": {
".*": {
"type": "object",
"properties": {
"type": {
"type": "string"
},
"title": {
"type": "string"
},
"description": {
"type": "string"
},
"units": {
"type": "string"
},
"example": {
"type": [
"string",
"number",
"boolean",
"object"
]
}
}
}
}
},

"gaugeType": {
"type": "string",
"title": "gaugeType schema.",
Expand Down

0 comments on commit c71c367

Please sign in to comment.