Few corrections in ngsi-ld_generator_keyvalues_v0.93.py
dpatil-fw opened this issue · 1 comments
dpatil-fw commented
-
payload_interger -> Typo here, please remove additional r
-
Should the "type": "object" below be "type": "Relationship"
def payload_relationship(propertyName, dataModel):
return {"type": "object", "value": fake_uri(propertyName, dataModel)}
- Handling email type
Please add the following code to handle emails as well:
elif payload["type"] == "string" and "format" in keys:
if payload["format"] == "date-time":
return payload_date()
elif payload["format"] == "uri":
return payload_uri(prop, dataModel)
> elif payload["format"] == "idn-email":
> return payload_email()
def payload_email():
return {"type": "Property", "value" : {"type": "Property", "value": "abc@abc.com"}}
albertoabellagarcia commented
You are right.
I've implemented what you mention but for the email, I created a new function for being actually randomly generated.
See as version 0.94