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

feat: helpers for problem repository, merge, update problem, etc #3

Open
imabp opened this issue Jul 14, 2022 · 2 comments
Open

feat: helpers for problem repository, merge, update problem, etc #3

imabp opened this issue Jul 14, 2022 · 2 comments
Labels
enhancement New feature or request

Comments

@imabp
Copy link
Owner

imabp commented Jul 14, 2022

So far, we are doing really good with Problem Interface. One major feature that will be helpful is having different kind of helpers available for Problem.

We currently have in the working branch, a helper, toJSON which converts the problem class to json output.
We need to find out, some more  helper functions, we need for AsyncAPI tools.

merge, updateProblem are few of them.

Let's keep this issue open for discussion about helper functions.
cc: @magicmatatjahu

@imabp imabp added the enhancement New feature or request label Jul 14, 2022
@magicmatatjahu
Copy link
Collaborator

My suggestions:

  • copy - to create new Problem instance based on existing one (implementation is in progress)
  • toJSON - create from Problem instance normal JSON object with data from existing Problem instance (implementation is in progress)
  • is - check if Problem instance is instance of given type
  • update - update Problem instance with additional properties

We can also implement merge, but I do not yet know how it could work.

@imabp
Copy link
Owner Author

imabp commented Aug 7, 2022

Is there anywhere, we are merging two problems? I don't see it.
If it is required, we can then build, according to our needs.

The copy and toJSON are ready to merge here

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants