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

shorten python case names, handle if payload has an 'id' field. #51

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

Jsyro
Copy link
Contributor

@Jsyro Jsyro commented Jul 6, 2023

service_endpoint is not abbreviated properly as it looking for serviceEndpoint instead, so serivce_endpoint gets added to extra and when it is decoded, this constructor gets passes multiple parameters with the name 1service_endpoint`.

id=ident, type=service_type, service_endpoint=endpoint, **extra

This change would abbreviate python and javascript naming conventions, which would be expanded to the pythonicly named class attributes on service_decode.

A simliar conflict exists if the service entry has an 'id' field, so if one exists, use it, otherwise generate one.

Jsyro added 2 commits July 6, 2023 14:15
if this is not done, service_endpoint is infered, and also included as a kwarg, causing a conflict in the decode_service method and an exception is raised. 

Signed-off-by: Jason Syrotuck <jasyrotuck@gmail.com>
Signed-off-by: Jason Syrotuck <jasyrotuck@gmail.com>
Copy link
Contributor Author

@Jsyro Jsyro left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changing to list has caused a few other small issues, I will resolve those and push changes.

@Jsyro Jsyro marked this pull request as draft July 6, 2023 21:42
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

Successfully merging this pull request may close these issues.

1 participant