Skip to content

Improve API Documentation for Anoncreds  #232

@mineme0110

Description

@mineme0110

https://discord.com/channels/905194001349627914/1252629630763012116/1420415377212571648

The documentation for creating an Anoncreds Presentation Request is currently incomplete and somewhat misleading. The example payload shown in the tutorial
does not align with what the API actually expects in release v2.0.0.

Issues identified:

Missing proofs field
The request body must include a top-level proofs attribute (an array), even if it is empty.
Without this field, the API returns:

400 RequestBodyDecodingFailure (missing at 'proofs')

This requirement is not mentioned in the tutorial, so users following it will consistently encounter this error.

Incorrect cred_def_id format
The documentation shows cred_def_id as a simple identifier (e.g. 3fc80ccf-d8da-3215-a626-8712f73d5101).
In practice, the API requires a full URL to the credential definition, such as:

${agent.url}/credential-definition-registry/definitions/${anoncredGuid}/definition

Without the correct format, proof requests cannot be resolved.

Recommendation:
The API and Swagger docs should clearly define the expected formats for cred_def_id, schema_id, and other fields. This would make error messages (such as Bad Request) more meaningful and significantly reduce confusion for developers.

Metadata

Metadata

Assignees

No one assigned

    Labels

    documentationImprovements or additions to documentation

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions