digital-asset / daml

The Daml smart contract language
https://www.digitalasset.com/developers
797 stars 201 forks source link

Capitalisation in Setting userID in Daml Documentation ver 2.1.0 Causing Example Failure. #13641

Closed benm-da closed 2 years ago

benm-da commented 2 years ago

I confirm that, if this is a feature request that has security implications, I already contacted security@digitalasset.com and followed the responsible disclosure policy.

I confirm that this is not a question or a request for technical support by the community, for which the Daml forum is available.

What is the problem you want to solve?

In the Daml Documentation ver 2.1.0., the use of Capitalization in the various code examples, to set the userID is allegedly causing the examples, featuring the name: Carol, to fail.

{
  "result": {
    "userId": "Carol",
    "primaryParty": "Carol",
  },
  "status": 200
}

This issue was raised by a Digital Asset client, who raised a Support Request providing feedback.

What is the solution you would propose?

The solution is to confirm that the correct naming conventions with respect to the userID conform to:

https://docs.daml.com/app-dev/grpc/proto-docs.html#com-daml-ledger-api-v1-admin-createuserrequest

The requirements are the user identifier, which must be a non-empty string of at most 128 characters that are either lowercase alphanumeric ASCII characters or one of the symbols “@^$.!`-#+’~_|:”.

Review all instances of userID in the documentation and examine the first character in each instance.

If Capitalized, modify to Lowercase, ie: Carol > carol

Additional Issue

A further comment was made in relation, "There are also extra commas in the JSON payload examples."

However no specific references within the documenation were provided.

cocreature commented 2 years ago

can you link to the places in the docs that do this?

matevarga-da commented 2 years ago

@cocreature Here: https://docs.daml.com/json-api/index.html Do a search for: "userId": "Carol"

https://docs.daml.com/json-api/index.html#id18 https://docs.daml.com/json-api/index.html#id21 https://docs.daml.com/json-api/index.html#id22 https://docs.daml.com/json-api/index.html#id23 https://docs.daml.com/json-api/index.html#id24 https://docs.daml.com/json-api/index.html#id27 https://docs.daml.com/json-api/index.html#id28 https://docs.daml.com/json-api/index.html#id30 https://docs.daml.com/json-api/index.html#id34