Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Non standard properties in dialogs throw errors. #14

Open
2 tasks
howethomas opened this issue Jan 16, 2025 · 0 comments
Open
2 tasks

Non standard properties in dialogs throw errors. #14

howethomas opened this issue Jan 16, 2025 · 0 comments
Assignees

Comments

@howethomas
Copy link
Contributor

Inbound vCons have non-standard elements like "id" in the parties. Example attached. In order to make it work, we need to do this:
# Move the id from the parties to metadata if it's there
for party in vcon_json["parties"]:
if "id" in party:
party["meta"] = party.get("meta", {})
party["meta"]["id"] = party["id"]
del party["id"]

Improve the library by giving options on how to handle this situation for all embedded objects (Party, Dialog, Analysis and Attachment):

  • By default, add these non-standard properties to the new vCon, do not throw an error
  • Add a property to the constructor to control the alternatives:
  • strict, which removes all non-standard properties
  • meta, which takes all non-standard properties and puts them into the meta object (as above)
@howethomas howethomas self-assigned this Jan 16, 2025
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

No branches or pull requests

1 participant