Skip to content

Commit

Permalink
extend json template
Browse files Browse the repository at this point in the history
Signed-off-by: iripiri <[email protected]>
  • Loading branch information
iripiri authored and m-mirz committed Nov 16, 2024
1 parent 68a59c3 commit f260f07
Showing 1 changed file with 27 additions and 21 deletions.
48 changes: 27 additions & 21 deletions json_ld/templates/json_ld_template.mustache
Original file line number Diff line number Diff line change
@@ -1,27 +1,33 @@
{
"$schema": "http://json-schema.org/schema#",
"$schema": "http://json-schema.org/schema#",
"$schemaVersion": "0.0.1",
"modelTags": "",
"title": "{{class_name}}",
"description": "{{class_comment}}",
"type": "object",
"allOf": [
{
"properties": {
"type": {
"type": "string",
"enum": [
"{{class_name}}"
],
"description": "Property, NGSI type. Has to be {{class_name}}."
},
"title": "Smart Data Models - {{class_name}}",
"description": "{{class_comment}}",
"type": "object",
"allOf": [
{
"$ref": "https://smart-data-models.github.io/data-models/common-schema.json#/definitions/GSMA-Commons"
},
{
"$ref": "https://smart-data-models.github.io/data-models/common-schema.json#/definitions/Location-Commons"
},
{
"properties": {
"type": {
"type": "string",
"enum": [
"{{class_name}}"
],
"description": "Property. NGSI type. It has to be {{class_name}}"
},
{{#attributes}}
"{{label}}": {
"description": "{{comment}}",
"type": "number"
},
"{{label}}": {
"description": "Property. Model:'https://schema.org/Number'. {{comment}} Default: {{#setDefault}}{{dataType}}{{/setDefault}}",
"type": "number"
},
{{/attributes}}
}
}
]
}
}
]
}

0 comments on commit f260f07

Please sign in to comment.