When I tried to import a business network card using the command "composer card import -f PeerAdmin@byfn-network-org1-only.card" it shows the following error message.
Failed to import the business network card
keyword: required
dataPath:
schemaPath: #/required
params:
missingProperty: x-type
message: should have required property 'x-type'
keyword: required
dataPath:
schemaPath: #/required
params:
missingProperty: client
message: should have required property 'client'
keyword: required
dataPath:
schemaPath: #/required
params:
missingProperty: certificateAuthorities
message: should have required property 'certificateAuthorities'
keyword: required
dataPath:
schemaPath: #/required
params:
missingProperty: channels
message: should have required property 'channels'
keyword: type
dataPath: .orderers
schemaPath: #/type
params:
type: object
message: should be object
keyword: type
dataPath: .peers
schemaPath: #/type
params:
type: object
message: should be object
Error: Errors found in the connection profile in the card
Command failed
My FABRIC_VERSION is set as following
FABRIC_VERSION=hlfv11
composer version is v0.19.5
The content of connection.json is shown below.
{
"name": "byfn-network-org1-only",
"type": "hlfv11",
"mspID": "Org1MSP",
"peers": [
{
"requestURL": "grpcs://localhost:7051",
"eventURL": "grpcs://localhost:7053",
"cert": "/home/koosh/fabric-tools/fabric-samples/first-network/crypto-config/peerOrganizations/org1.example.com/peers/peer0.org1.example.com/tls/ca.crt",
"hostnameOverride": "peer0.org1.example.com"
},
{
"requestURL": "grpcs://localhost:8051",
"eventURL": "grpcs://localhost:8053",
"cert": "/home/koosh/fabric-tools/fabric-samples/first-network/crypto-config/peerOrganizations/org1.example.com/peers/peer0.org1.example.com/tls/ca.crt",
"hostnameOverride": "peer1.org1.example.com"
}
],
"ca": {
"url": "https://localhost:7054",
"name": "ca-org1",
"cert": "/home/koosh/fabric-tools/fabric-samples/first-network/crypto-config/peerOrganizations/org1.example.com/peers/peer0.org1.example.com/tls/ca.crt",
"hostnameOverride": "ca.org1.example.com"
},
"orderers": [
{
"url" : "grpcs://localhost:7050",
"cert": "/home/koosh/fabric-tools/fabric-samples/first-network/crypto-config/ordererOrganizations/example.com/orderers/orderer.example.com/tls/ca.crt",
"hostnameOverride": "orderer.example.com"
}
],
"channel": "mychannel",
"timeout": 300
}
What is the issue here?
What should I change to support cards based on this connection file format? If I change the connection format to older version, it will work. But how can I use the same format?