You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@servicecomb.apache.org by GitBox <gi...@apache.org> on 2020/03/18 11:45:56 UTC
[GitHub] [servicecomb-java-chassis] h00379108 opened a new issue #1643: go注册契约,为何会把不带json关键字的字段也注册到契约中?
h00379108 opened a new issue #1643: go注册契约,为何会把不带json关键字的字段也注册到契约中?
URL: https://github.com/apache/servicecomb-java-chassis/issues/1643
type CreateThumbnailRequest struct {
common.Common
TenantID string `json:"tenant_id,omitempty"`
}
type Common struct {
InputURI string `json:"input_file_addr"`
InputType int32 `json:"input_type"` // not used until now, not implemented in pb
OutputURI string `json:"output_file_addr,omitempty"`
Priority int32 `json:"priority,omitempty"`
NotifyURL string `json:"notify_url,omitempty"`
NotifyServerDomain string `json:"notify_domain_name,omitempty"`
OutFilenames []string `json:"output_filenames,omitempty"`
Auth httpx.Auth
}
注册的契约显示为:
{
"Common": {
"Auth": {
"ak": "string",
"sk": "string",
"token": "string"
},
"input_file_addr": "string",
"input_type": 0,
"notify_domain_name": "string",
"notify_url": "string",
"output_file_addr": "string",
"output_filenames": [
"string"
],
"priority": 0
},
"tenant_id": "string"
}
期望不要把common写到契约,期望是:
{
"input_file_addr": "string",
"input_type": 0,
"notify_domain_name": "string",
"notify_url": "string",
"output_file_addr": "string",
"output_filenames": [
"string"
],
"priority": 0,
"tenant_id": "string"
}
毕竟postman的请求也是不带common的:
{"projectId":"3a3b9aa89c49465ba71f029004964d1f","priority":0,"input_type":1,"output_file_addr":"s3://ziqiantest/test/","tar":1,"input_file_addr":"s3://ziqiantest/test/test.mp4"}
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
With regards,
Apache Git Services
[GitHub] [servicecomb-java-chassis] liubao68 commented on issue #1643: go注册契约,为何会把不带json关键字的字段也注册到契约中?
Posted by GitBox <gi...@apache.org>.
liubao68 commented on issue #1643: go注册契约,为何会把不带json关键字的字段也注册到契约中?
URL: https://github.com/apache/servicecomb-java-chassis/issues/1643#issuecomment-600930468
Please go to [go-chassis](https://github.com/go-chassis/go-chassis)
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
With regards,
Apache Git Services
[GitHub] [servicecomb-java-chassis] liubao68 closed issue #1643: go注册契约,为何会把不带json关键字的字段也注册到契约中?
Posted by GitBox <gi...@apache.org>.
liubao68 closed issue #1643: go注册契约,为何会把不带json关键字的字段也注册到契约中?
URL: https://github.com/apache/servicecomb-java-chassis/issues/1643
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
With regards,
Apache Git Services