Added component definitions to add weight as a valid definition (#1061)

Added the required validation information
Updated the readme
This commit is contained in:
Daniel W. Anner
2023-01-19 11:40:40 -05:00
committed by GitHub
parent cdc3581843
commit 9f546df7fe
4 changed files with 50 additions and 0 deletions

View File

@@ -594,6 +594,27 @@
}
},
"required": ["name"]
},
"weight": {
"type": "object",
"properties": {
"value": {
"type": "number",
"minimum": 0,
"multipleOf": 0.01
},
"unit": {
"type": "string",
"enum": [
"kg",
"g",
"lb",
"oz"
]
}
},
"required": ["value", "unit"]
}
}