Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>
This commit is contained in:
Василий Толстов 2022-01-13 01:18:21 +03:00
parent fb21516a5c
commit 11da5b59db
6 changed files with 304 additions and 219 deletions

View File

@ -46,6 +46,10 @@ func (s *testClientStream) Close() error {
return s.stream.Close() return s.stream.Close()
} }
func (s *testClientStream) CloseSend() error {
return s.stream.CloseSend()
}
func (s *testClientStream) Context() context.Context { func (s *testClientStream) Context() context.Context {
return s.stream.Context() return s.stream.Context()
} }

8
go.mod
View File

@ -13,7 +13,7 @@ require (
go.unistack.org/micro-broker-kgo/v3 v3.8.2 go.unistack.org/micro-broker-kgo/v3 v3.8.2
go.unistack.org/micro-broker-segmentio/v3 v3.8.0 go.unistack.org/micro-broker-segmentio/v3 v3.8.0
go.unistack.org/micro-client-grpc/v3 v3.8.1 go.unistack.org/micro-client-grpc/v3 v3.8.1
go.unistack.org/micro-client-http/v3 v3.8.3 go.unistack.org/micro-client-http/v3 v3.8.4
go.unistack.org/micro-codec-grpc/v3 v3.8.1 go.unistack.org/micro-codec-grpc/v3 v3.8.1
go.unistack.org/micro-codec-json/v3 v3.8.0 go.unistack.org/micro-codec-json/v3 v3.8.0
go.unistack.org/micro-codec-jsonpb/v3 v3.8.1 go.unistack.org/micro-codec-jsonpb/v3 v3.8.1
@ -35,10 +35,10 @@ require (
go.unistack.org/micro-wrapper-sql/v3 v3.0.1 go.unistack.org/micro-wrapper-sql/v3 v3.0.1
go.unistack.org/micro-wrapper-trace-opentracing/v3 v3.8.0 go.unistack.org/micro-wrapper-trace-opentracing/v3 v3.8.0
go.unistack.org/micro/v3 v3.8.14 go.unistack.org/micro/v3 v3.8.14
golang.org/x/net v0.0.0-20211216030914-fe4d6282115f // indirect golang.org/x/net v0.0.0-20220111093109-d55c255bac03 // indirect
golang.org/x/sys v0.0.0-20211216021012-1d35b9e2eb4e // indirect golang.org/x/sys v0.0.0-20220111092808-5a964db01320 // indirect
golang.org/x/text v0.3.7 // indirect golang.org/x/text v0.3.7 // indirect
google.golang.org/genproto v0.0.0-20211223182754-3ac035c7e7cb // indirect google.golang.org/genproto v0.0.0-20220111164026-67b88f271998 // indirect
google.golang.org/grpc v1.43.0 google.golang.org/grpc v1.43.0
google.golang.org/protobuf v1.27.1 google.golang.org/protobuf v1.27.1
modernc.org/sqlite v1.14.4 modernc.org/sqlite v1.14.4

16
go.sum
View File

@ -390,8 +390,8 @@ go.unistack.org/micro-broker-segmentio/v3 v3.8.0 h1:Nm9BaS4eD6kuewHRGmUd/QFbdv4F
go.unistack.org/micro-broker-segmentio/v3 v3.8.0/go.mod h1:Q3mavh0ZoNRO6mw31USvE760lDWB1nQHWiE64F6s8rs= go.unistack.org/micro-broker-segmentio/v3 v3.8.0/go.mod h1:Q3mavh0ZoNRO6mw31USvE760lDWB1nQHWiE64F6s8rs=
go.unistack.org/micro-client-grpc/v3 v3.8.1 h1:fJKTR3YICl5sse17vJWJUnKlf8fELjxgMWWVlt52ew8= go.unistack.org/micro-client-grpc/v3 v3.8.1 h1:fJKTR3YICl5sse17vJWJUnKlf8fELjxgMWWVlt52ew8=
go.unistack.org/micro-client-grpc/v3 v3.8.1/go.mod h1:1nxWfDbEn3FDodgh0CyHKnhHMoVd0F6HeCTpnGuX/QI= go.unistack.org/micro-client-grpc/v3 v3.8.1/go.mod h1:1nxWfDbEn3FDodgh0CyHKnhHMoVd0F6HeCTpnGuX/QI=
go.unistack.org/micro-client-http/v3 v3.8.3 h1:1ixsGztisvdCANmwilNQ/UW15usdHz8QbiK00pP1I1g= go.unistack.org/micro-client-http/v3 v3.8.4 h1:XJPdp5AIXbl7MXO1qOgSMMtW1Qufg2H9tVBf3d+md+U=
go.unistack.org/micro-client-http/v3 v3.8.3/go.mod h1:ACeZ/cfYkawSshdWCmo3Kc/PhgjoijdObGN2WMVkQPU= go.unistack.org/micro-client-http/v3 v3.8.4/go.mod h1:J5EsA/EC5Fll8JrXCESNAQ3tPwPKR1cJg9OrPH7q2BM=
go.unistack.org/micro-codec-grpc/v3 v3.8.1 h1:vZrR07L8NKziG1dtzCBKoooaHpV3oP2c7rh93ClbUGI= go.unistack.org/micro-codec-grpc/v3 v3.8.1 h1:vZrR07L8NKziG1dtzCBKoooaHpV3oP2c7rh93ClbUGI=
go.unistack.org/micro-codec-grpc/v3 v3.8.1/go.mod h1:RawS1ObPRsjsdvDXrGcLNnTexOHdU9yRZbF4QhWkRWw= go.unistack.org/micro-codec-grpc/v3 v3.8.1/go.mod h1:RawS1ObPRsjsdvDXrGcLNnTexOHdU9yRZbF4QhWkRWw=
go.unistack.org/micro-codec-json/v3 v3.8.0 h1:sQ6xdHaNUCxCiUakGaV1t8lbX1rGWlgnF/HbsXyhkGg= go.unistack.org/micro-codec-json/v3 v3.8.0 h1:sQ6xdHaNUCxCiUakGaV1t8lbX1rGWlgnF/HbsXyhkGg=
@ -485,8 +485,8 @@ golang.org/x/net v0.0.0-20210928044308-7d9f5e0b762b/go.mod h1:9nx3DQGgdP8bBQD5qx
golang.org/x/net v0.0.0-20211020060615-d418f374d309/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20211020060615-d418f374d309/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y=
golang.org/x/net v0.0.0-20211112202133-69e39bad7dc2/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20211112202133-69e39bad7dc2/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y=
golang.org/x/net v0.0.0-20211123203042-d83791d6bcd9/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20211123203042-d83791d6bcd9/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y=
golang.org/x/net v0.0.0-20211216030914-fe4d6282115f h1:hEYJvxw1lSnWIl8X9ofsYMklzaDs90JI2az5YMd4fPM= golang.org/x/net v0.0.0-20220111093109-d55c255bac03 h1:0FB83qp0AzVJm+0wcIlauAjJ+tNdh7jLuacRYCIVv7s=
golang.org/x/net v0.0.0-20211216030914-fe4d6282115f/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20220111093109-d55c255bac03/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y=
golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U=
golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw=
golang.org/x/oauth2 v0.0.0-20200107190931-bf48bf16ab8d/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20200107190931-bf48bf16ab8d/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw=
@ -533,8 +533,8 @@ golang.org/x/sys v0.0.0-20210630005230-0f9fa26af87c/go.mod h1:oPkhp1MJrh7nUepCBc
golang.org/x/sys v0.0.0-20210902050250-f475640dd07b/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210902050250-f475640dd07b/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.0.0-20210927094055-39ccf1dd6fa6/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210927094055-39ccf1dd6fa6/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.0.0-20211007075335-d3039528d8ac/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20211007075335-d3039528d8ac/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.0.0-20211216021012-1d35b9e2eb4e h1:fLOSk5Q00efkSvAm+4xcoXD+RRmLmmulPn5I3Y9F2EM= golang.org/x/sys v0.0.0-20220111092808-5a964db01320 h1:0jf+tOCoZ3LyutmCOWpVni1chK4VfFLhRsDK7MhqGRY=
golang.org/x/sys v0.0.0-20211216021012-1d35b9e2eb4e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220111092808-5a964db01320/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=
golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk=
@ -570,8 +570,8 @@ google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55/go.mod h1:DMBHOl98
google.golang.org/genproto v0.0.0-20200513103714-09dca8ec2884/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= google.golang.org/genproto v0.0.0-20200513103714-09dca8ec2884/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c=
google.golang.org/genproto v0.0.0-20200526211855-cb27e3aa2013/go.mod h1:NbSheEEYHJ7i3ixzK3sjbqSGDJWnxyFXZblF3eUsNvo= google.golang.org/genproto v0.0.0-20200526211855-cb27e3aa2013/go.mod h1:NbSheEEYHJ7i3ixzK3sjbqSGDJWnxyFXZblF3eUsNvo=
google.golang.org/genproto v0.0.0-20210729151513-df9385d47c1b/go.mod h1:ob2IJxKrgPT52GcgX759i1sleT07tiKowYBGbczaW48= google.golang.org/genproto v0.0.0-20210729151513-df9385d47c1b/go.mod h1:ob2IJxKrgPT52GcgX759i1sleT07tiKowYBGbczaW48=
google.golang.org/genproto v0.0.0-20211223182754-3ac035c7e7cb h1:ZrsicilzPCS/Xr8qtBZZLpy4P9TYXAfl49ctG1/5tgw= google.golang.org/genproto v0.0.0-20220111164026-67b88f271998 h1:g/x+MYjJYDEP3OBCYYmwIbt4x6k3gryb+ohyOR7PXfI=
google.golang.org/genproto v0.0.0-20211223182754-3ac035c7e7cb/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= google.golang.org/genproto v0.0.0-20220111164026-67b88f271998/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc=
google.golang.org/grpc v1.8.0/go.mod h1:yo6s7OP7yaDglbqo1J04qKzAhqBH6lvTonzMVmEdcZw= google.golang.org/grpc v1.8.0/go.mod h1:yo6s7OP7yaDglbqo1J04qKzAhqBH6lvTonzMVmEdcZw=
google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c=
google.golang.org/grpc v1.23.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= google.golang.org/grpc v1.23.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg=

View File

@ -1,81 +1,131 @@
{ {
"openapi": "3.0.3", "openapi": "3.0.3",
"info": { "info": {
"title": "test title", "title": "test title",
"description": "test desc", "description": "test desc",
"version": "0.0.5" "version": "0.0.5"
}, },
"servers": [ "servers": [
{ {
"url": "{proto}://{sub}.example.com/v1", "url": "{proto}://{sub}.example.com/v1",
"description": "server", "description": "server",
"variables": { "variables": {
"additionalProperties": [ "additionalProperties": [
{ {
"name": "proto", "name": "proto",
"value": { "value": {
"enum": [ "enum": [
"http", "http",
"https" "https"
], ],
"default": "http", "default": "http",
"description": "protocols" "description": "protocols"
} }
}, },
{ {
"name": "sub", "name": "sub",
"value": { "value": {
"enum": [ "enum": [
"test", "test",
"prod" "prod"
], ],
"default": "test", "default": "test",
"description": "subdomain" "description": "subdomain"
} }
} }
] ]
} }
}, },
{ {
"url": "https://other.example.com/v1", "url": "https://other.example.com/v1",
"description": "other test server" "description": "other test server"
} }
], ],
"paths": { "paths": {
"path": [ "path": [
{ {
"name": "/aml", "name": "/aml",
"value": { "value": {
"post": { "post": {
"operationId": "TestService_KzAmlRs", "tags": [
"parameters": [ "TestService"
],
"operationId": "TestService_KzAmlRs",
"parameters": [
{ {
"parameter": { "parameter": {
"name": "kzAmlNewOnlineRs", "name": "kzAmlNewOnlineRs.rquid",
"in": "query", "in": "query",
"schema": { "schema": {
"schema": { "schema": {
"type": "string" "type": "string"
}
}
}
},
{
"parameter": {
"name": "kzAmlNewOnlineRs.rqtm",
"in": "query",
"schema": {
"schema": {
"type": "string"
}
}
}
},
{
"parameter": {
"name": "kzAmlNewOnlineRs.status.status_code",
"in": "query",
"schema": {
"schema": {
"type": "integer",
"format": "int64"
}
}
}
},
{
"parameter": {
"name": "kzAmlNewOnlineRs.terr_status",
"in": "query",
"schema": {
"schema": {
"type": "integer",
"format": "int64"
}
}
}
},
{
"parameter": {
"name": "kzAmlNewOnlineRs.aml_status",
"in": "query",
"schema": {
"schema": {
"type": "integer",
"format": "int64"
} }
} }
} }
} }
], ],
"responses": { "responses": {
"responseOrReference": [ "responseOrReference": [
{ {
"name": "200", "name": "200",
"value": { "value": {
"response": { "response": {
"description": "OK", "description": "OK",
"content": { "content": {
"additionalProperties": [ "additionalProperties": [
{ {
"name": "application/json", "name": "application/json",
"value": { "value": {
"schema": { "schema": {
"reference": { "reference": {
"Ref": "#/components/schemas/ResponseAml" "Ref": "#/components/schemas/ResponseAml"
} }
} }
} }
@ -91,60 +141,64 @@
} }
}, },
{ {
"name": "/users/image/upload", "name": "/users/image/upload",
"value": { "value": {
"post": { "post": {
"operationId": "TestService_UploadFile", "tags": [
"parameters": [ "TestService"
],
"operationId": "TestService_UploadFile",
"parameters": [
{ {
"parameter": { "parameter": {
"name": "image", "name": "image",
"in": "query", "in": "query",
"schema": { "schema": {
"schema": { "schema": {
"type": "string" "type": "string",
"format": "bytes"
} }
} }
} }
}, },
{ {
"parameter": { "parameter": {
"name": "file_name", "name": "file_name",
"in": "query", "in": "query",
"schema": { "schema": {
"schema": { "schema": {
"type": "string" "type": "string"
} }
} }
} }
}, },
{ {
"parameter": { "parameter": {
"name": "doc_type", "name": "doc_type",
"in": "query", "in": "query",
"schema": { "schema": {
"schema": { "schema": {
"type": "string" "type": "string"
} }
} }
} }
} }
], ],
"responses": { "responses": {
"responseOrReference": [ "responseOrReference": [
{ {
"name": "200", "name": "200",
"value": { "value": {
"response": { "response": {
"description": "OK", "description": "OK",
"content": { "content": {
"additionalProperties": [ "additionalProperties": [
{ {
"name": "application/json", "name": "application/json",
"value": { "value": {
"schema": { "schema": {
"reference": { "reference": {
"Ref": "#/components/schemas/ResponseImage" "Ref": "#/components/schemas/ResponseImage"
} }
} }
} }
@ -160,62 +214,76 @@
} }
}, },
{ {
"name": "/users/test", "name": "/users/test",
"value": { "value": {
"get": { "get": {
"operationId": "TestEndpoint", "tags": [
"parameters": [ "TestService"
],
"operationId": "TestEndpoint",
"parameters": [
{ {
"parameter": { "parameter": {
"name": "client_uid", "name": "client_uid",
"in": "header", "in": "header",
"required": true, "required": true,
"schema": { "schema": {
"schema": { "schema": {
"type": "string" "type": "string"
} }
} }
} }
}, },
{ {
"parameter": { "parameter": {
"name": "csrftoken", "name": "csrftoken",
"in": "cookie", "in": "cookie",
"required": true, "required": true,
"schema": { "schema": {
"schema": { "schema": {
"type": "string" "type": "string"
} }
} }
} }
}, },
{ {
"parameter": { "parameter": {
"name": "id", "name": "id",
"in": "query", "in": "query",
"schema": { "schema": {
"schema": { "schema": {
"type": "string" "type": "string"
}
}
}
},
{
"parameter": {
"name": "client_uid",
"in": "query",
"schema": {
"schema": {
"type": "string"
} }
} }
} }
} }
], ],
"responses": { "responses": {
"responseOrReference": [ "responseOrReference": [
{ {
"name": "200", "name": "200",
"value": { "value": {
"response": { "response": {
"description": "OK", "description": "OK",
"content": { "content": {
"additionalProperties": [ "additionalProperties": [
{ {
"name": "application/json", "name": "application/json",
"value": { "value": {
"schema": { "schema": {
"reference": { "reference": {
"Ref": "#/components/schemas/Response" "Ref": "#/components/schemas/Response"
} }
} }
} }
@ -231,49 +299,53 @@
} }
}, },
{ {
"name": "/users/{id}", "name": "/users/{id}",
"value": { "value": {
"get": { "get": {
"operationId": "TestService_UserByID", "tags": [
"parameters": [ "TestService"
],
"operationId": "TestService_UserByID",
"parameters": [
{ {
"parameter": { "parameter": {
"name": "id", "name": "id",
"in": "query", "in": "path",
"schema": { "required": true,
"schema": { "schema": {
"type": "string" "schema": {
"type": "string"
} }
} }
} }
}, },
{ {
"parameter": { "parameter": {
"name": "client_uid", "name": "client_uid",
"in": "query", "in": "query",
"schema": { "schema": {
"schema": { "schema": {
"type": "string" "type": "string"
} }
} }
} }
} }
], ],
"responses": { "responses": {
"responseOrReference": [ "responseOrReference": [
{ {
"name": "200", "name": "200",
"value": { "value": {
"response": { "response": {
"description": "OK", "description": "OK",
"content": { "content": {
"additionalProperties": [ "additionalProperties": [
{ {
"name": "application/json", "name": "application/json",
"value": { "value": {
"schema": { "schema": {
"reference": { "reference": {
"Ref": "#/components/schemas/Response" "Ref": "#/components/schemas/Response"
} }
} }
} }
@ -289,46 +361,50 @@
} }
}, },
{ {
"name": "/users/{id}/image", "name": "/users/{id}/image",
"value": { "value": {
"get": { "get": {
"operationId": "TestService_UserImageByID", "tags": [
"parameters": [ "TestService"
],
"operationId": "TestService_UserImageByID",
"parameters": [
{ {
"parameter": { "parameter": {
"name": "id", "name": "id",
"in": "query", "in": "path",
"schema": { "required": true,
"schema": { "schema": {
"type": "string" "schema": {
"type": "string"
} }
} }
} }
}, },
{ {
"parameter": { "parameter": {
"name": "client_uid", "name": "client_uid",
"in": "query", "in": "query",
"schema": { "schema": {
"schema": { "schema": {
"type": "string" "type": "string"
} }
} }
} }
} }
], ],
"responses": { "responses": {
"responseOrReference": [ "responseOrReference": [
{ {
"name": "200", "name": "200",
"value": { "value": {
"response": { "response": {
"description": "OK", "description": "OK",
"content": { "content": {
"additionalProperties": [ "additionalProperties": [
{ {
"name": "application/octet-stream", "name": "application/octet-stream",
"value": {} "value": {}
} }
] ]
} }
@ -342,20 +418,20 @@
} }
] ]
}, },
"components": { "components": {
"schemas": { "schemas": {
"additionalProperties": [ "additionalProperties": [
{ {
"name": "Response", "name": "Response",
"value": { "value": {
"schema": { "schema": {
"properties": { "properties": {
"additionalProperties": [ "additionalProperties": [
{ {
"name": "encoded_id", "name": "encoded_id",
"value": { "value": {
"schema": { "schema": {
"type": "string" "type": "string"
} }
} }
} }
@ -365,16 +441,16 @@
} }
}, },
{ {
"name": "ResponseAml", "name": "ResponseAml",
"value": { "value": {
"schema": { "schema": {
"properties": { "properties": {
"additionalProperties": [ "additionalProperties": [
{ {
"name": "resp", "name": "resp",
"value": { "value": {
"schema": { "schema": {
"type": "string" "type": "string"
} }
} }
} }
@ -384,14 +460,19 @@
} }
}, },
{ {
"name": "ResponseImage", "name": "ResponseImage",
"value": { "value": {
"schema": { "schema": {
"properties": {} "properties": {}
} }
} }
} }
] ]
} }
} },
"tags": [
{
"name": "TestService"
}
]
} }

View File

@ -30,8 +30,8 @@ func (c *testServiceClient) TestEndpoint(ctx context.Context, req *Request, opts
v3.Path("/users/test"), v3.Path("/users/test"),
) )
opts = append(opts, opts = append(opts,
v3.Cookie("csrftoken", "true"),
v3.Header("client_uid", "true"), v3.Header("client_uid", "true"),
v3.Cookie("csrftoken", "true"),
) )
rsp := &Response{} rsp := &Response{}
err := c.c.Call(ctx, c.c.NewRequest(c.name, "TestService.TestEndpoint", req), rsp, opts...) err := c.c.Call(ctx, c.c.NewRequest(c.name, "TestService.TestEndpoint", req), rsp, opts...)

View File

@ -160,8 +160,8 @@ func (h *testServer) Call(ctx context.Context, req *CallReq, rsp *CallRsp) error
ctx, cancel = context.WithTimeout(ctx, time.Second*5) ctx, cancel = context.WithTimeout(ctx, time.Second*5)
defer cancel() defer cancel()
v31.FillRequest(ctx, req, v31.FillRequest(ctx, req,
v31.Header("Clientid", "true"),
v31.Cookie("Csrftoken", "true"), v31.Cookie("Csrftoken", "true"),
v31.Header("Clientid", "true"),
) )
return h.TestServer.Call(ctx, req, rsp) return h.TestServer.Call(ctx, req, rsp)
} }