{
"namespace": "ns1",
"service": "TestSyncSvc1",
"protocol": "http",
"version": "5.0.0",
"type": "swagger3.0",
"interfaces": [
{
"method": "GET",
"path": "/zfoo1",
"content": "foo1|GET"
},
{
"method": "GET",
"path": "/zfoo2",
"content": "foo2|GET"
},
{
"method": "GET",
"path": "/xfoo3",
"content": "foo3|GET"
}
]
}curl --location --request POST 'http://119.91.66.223:8090/naming/v1/service/contract/methods' \
--header 'X-Polaris-Token;' \
--header 'Content-Type: application/json' \
--data-raw '{
"namespace": "ns1",
"service": "TestSyncSvc1",
"protocol": "http",
"version": "5.0.0",
"type": "swagger3.0",
"interfaces": [
{
"method": "GET",
"path": "/zfoo1",
"content": "foo1|GET"
},
{
"method": "GET",
"path": "/zfoo2",
"content": "foo2|GET"
},
{
"method": "GET",
"path": "/xfoo3",
"content": "foo3|GET"
}
]
}'{
"code": 200000,
"info": "execute success",
"serviceContract": {
"id": "38b1f75572ff438c3e7dc6fcc200d95ff645380c",
"interfaces": [
{
"id": "944783a7cc114d9719a81e77384b1e6159d641f7"
},
{
"id": "4d737dee3502a8e599d5748ab3976d8891bd5747"
},
{
"id": "bc9049130d298254200cc9b398dcc6979855b18c"
}
]
}
}