-
Notifications
You must be signed in to change notification settings - Fork 20
Open
Description
In the OpenAPI spec, the field onchain.signingAlgo is marked as required and non-nullable:
BlockchainOnchain:
type: object
properties:
protocol:
type: string
description: The protocol of the blockchain
example: EVM
chainId:
type: string
description: Network/chain ID
example: 1
test:
type: boolean
description: Is test blockchain
example: false
signingAlgo:
enum:
- ECDSA_SECP256K1
- EDDSA_ED25519
type: string
description: Signing alghorithm
example: ECDSA_SECP256K1
required:
- protocol
- test
- signingAlgoHowever, in responses where metadata.deprecated=true, the onchain.signingAlgo field is absent.
This violates the defined contract and causes client code generated from the spec to fail deserialization with an exception.
Example problematic response:
{
"data": [
{
"id": "a8debd1c-745b-4cd0-9097-bf24aed7fb5c",
"legacyId": "DIEM_XUS_TEST",
"displayName": "Diem XUS Test",
"nativeAssetId": "c9eadb85-aebb-49a7-856f-1517c0e16964",
"onchain": {
"protocol": null,
"test": true
},
"metadata": {
"scope": "GLOBAL",
"deprecated": true
}
}
]
}Expected behavior:
If onchain.signingAlgo is not present when deprecated=true, it should either:
- Be marked as optional in the OpenAPI schema, or
- Always included in the response (even for deprecated records), possibly as null or with a placeholder value.
Impact:
Code generation tools (e.g., OpenAPI codegen) produce clients that expect signingAlgo to be present. This discrepancy breaks deserialization and disrupts client-side processing.
Please clarify if this is an intentional behavior and if the schema should be updated to reflect this exception.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels