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

Add validation to avoid ContractDefinition id to contain : #1347

Closed
2 tasks done
ndr-brt opened this issue May 23, 2022 · 1 comment · Fixed by #1407
Closed
2 tasks done

Add validation to avoid ContractDefinition id to contain : #1347

ndr-brt opened this issue May 23, 2022 · 1 comment · Fixed by #1407
Assignees
Labels
api Feature related to the (REST) api

Comments

@ndr-brt
Copy link
Member

ndr-brt commented May 23, 2022

Feature Request

Creating a ContractDefinition with a : contained in the string would cause this error:

ContractRejectionHandler: Received contract rejection to message null. Negotiation process: 67abd883-b5b5-4e57-bf71-f5844f012a29. Rejection Reason: "Invalid id: urn:1edcc7c0-4796-46bc-bafd-87bd440cc68a:8d9e7ac4-770c-431c-9e2f-2e575c870e9a"

Would be good to have a validation on the contractdefinition api, to avoid this possibility.
Another way could be to have the "contract id parser" being able to permit the use of : inside the contract definition id, but seems to be more convoluted.

Which Areas Would Be Affected?

data management api

Why Is the Feature Desired?

To avoid exceptions

Solution Proposal

Type of Issue

improvement

Checklist

  • assigned appropriate label?
  • Do NOT select a milestone or an assignee!
@ndr-brt ndr-brt added the api Feature related to the (REST) api label May 23, 2022
@ndr-brt ndr-brt changed the title Add control to avoid ContractDefinition id to contain : Add validation to avoid ContractDefinition id to contain : May 23, 2022
@tuncaytunc-zf tuncaytunc-zf self-assigned this May 23, 2022
@jimmarino
Copy link
Contributor

jimmarino commented May 24, 2022

The id should be a GUID (not URN) so +1 on adding validation in the API. Additional validation could also be added in ContractDefinition itself to catch other places.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api Feature related to the (REST) api
Projects
None yet
3 participants