-
Notifications
You must be signed in to change notification settings - Fork 0
/
expectedResponse.go
46 lines (37 loc) · 1.05 KB
/
expectedResponse.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
package anysdk
var (
_ ExpectedResponse = &standardExpectedResponse{}
)
type ExpectedResponse interface {
GetBodyMediaType() string
GetOpenAPIDocKey() string
GetObjectKey() string
GetSchema() Schema
//
setSchema(Schema)
setBodyMediaType(string)
}
type standardExpectedResponse struct {
BodyMediaType string `json:"mediaType,omitempty" yaml:"mediaType,omitempty"`
OpenAPIDocKey string `json:"openAPIDocKey,omitempty" yaml:"openAPIDocKey,omitempty"`
ObjectKey string `json:"objectKey,omitempty" yaml:"objectKey,omitempty"`
Schema Schema
}
func (er *standardExpectedResponse) setBodyMediaType(s string) {
er.BodyMediaType = s
}
func (er *standardExpectedResponse) setSchema(s Schema) {
er.Schema = s
}
func (er *standardExpectedResponse) GetBodyMediaType() string {
return er.BodyMediaType
}
func (er *standardExpectedResponse) GetOpenAPIDocKey() string {
return er.OpenAPIDocKey
}
func (er *standardExpectedResponse) GetObjectKey() string {
return er.ObjectKey
}
func (er *standardExpectedResponse) GetSchema() Schema {
return er.Schema
}