Switch to using the dep tool and update all the dependencies
This commit is contained in:
parent
5135ff73cb
commit
98c2d2c41b
5321 changed files with 4483201 additions and 5922 deletions
500
vendor/github.com/aws/aws-sdk-go/models/protocol_tests/generate.go
generated
vendored
Normal file
500
vendor/github.com/aws/aws-sdk-go/models/protocol_tests/generate.go
generated
vendored
Normal file
|
@ -0,0 +1,500 @@
|
|||
// +build codegen
|
||||
|
||||
package main
|
||||
|
||||
import (
|
||||
"bytes"
|
||||
"encoding/json"
|
||||
"fmt"
|
||||
"net/url"
|
||||
"os"
|
||||
"os/exec"
|
||||
"reflect"
|
||||
"regexp"
|
||||
"sort"
|
||||
"strconv"
|
||||
"strings"
|
||||
"text/template"
|
||||
|
||||
"github.com/aws/aws-sdk-go/private/model/api"
|
||||
"github.com/aws/aws-sdk-go/private/util"
|
||||
)
|
||||
|
||||
// TestSuiteTypeInput input test
|
||||
// TestSuiteTypeInput output test
|
||||
const (
|
||||
TestSuiteTypeInput = iota
|
||||
TestSuiteTypeOutput
|
||||
)
|
||||
|
||||
type testSuite struct {
|
||||
*api.API
|
||||
Description string
|
||||
Cases []testCase
|
||||
Type uint
|
||||
title string
|
||||
}
|
||||
|
||||
type testCase struct {
|
||||
TestSuite *testSuite
|
||||
Given *api.Operation
|
||||
Params interface{} `json:",omitempty"`
|
||||
Data interface{} `json:"result,omitempty"`
|
||||
InputTest testExpectation `json:"serialized"`
|
||||
OutputTest testExpectation `json:"response"`
|
||||
}
|
||||
|
||||
type testExpectation struct {
|
||||
Body string
|
||||
URI string
|
||||
Headers map[string]string
|
||||
JSONValues map[string]string
|
||||
StatusCode uint `json:"status_code"`
|
||||
}
|
||||
|
||||
const preamble = `
|
||||
var _ bytes.Buffer // always import bytes
|
||||
var _ http.Request
|
||||
var _ json.Marshaler
|
||||
var _ time.Time
|
||||
var _ xmlutil.XMLNode
|
||||
var _ xml.Attr
|
||||
var _ = ioutil.Discard
|
||||
var _ = util.Trim("")
|
||||
var _ = url.Values{}
|
||||
var _ = io.EOF
|
||||
var _ = aws.String
|
||||
var _ = fmt.Println
|
||||
var _ = reflect.Value{}
|
||||
|
||||
func init() {
|
||||
protocol.RandReader = &awstesting.ZeroReader{}
|
||||
}
|
||||
`
|
||||
|
||||
var reStripSpace = regexp.MustCompile(`\s(\w)`)
|
||||
|
||||
var reImportRemoval = regexp.MustCompile(`(?s:import \((.+?)\))`)
|
||||
|
||||
func removeImports(code string) string {
|
||||
return reImportRemoval.ReplaceAllString(code, "")
|
||||
}
|
||||
|
||||
var extraImports = []string{
|
||||
"bytes",
|
||||
"encoding/json",
|
||||
"encoding/xml",
|
||||
"fmt",
|
||||
"io",
|
||||
"io/ioutil",
|
||||
"net/http",
|
||||
"testing",
|
||||
"time",
|
||||
"reflect",
|
||||
"net/url",
|
||||
"",
|
||||
"github.com/aws/aws-sdk-go/awstesting",
|
||||
"github.com/aws/aws-sdk-go/awstesting/unit",
|
||||
"github.com/aws/aws-sdk-go/private/protocol",
|
||||
"github.com/aws/aws-sdk-go/private/protocol/xml/xmlutil",
|
||||
"github.com/aws/aws-sdk-go/private/util",
|
||||
"github.com/stretchr/testify/assert",
|
||||
}
|
||||
|
||||
func addImports(code string) string {
|
||||
importNames := make([]string, len(extraImports))
|
||||
for i, n := range extraImports {
|
||||
if n != "" {
|
||||
importNames[i] = fmt.Sprintf("%q", n)
|
||||
}
|
||||
}
|
||||
|
||||
str := reImportRemoval.ReplaceAllString(code, "import (\n"+strings.Join(importNames, "\n")+"$1\n)")
|
||||
return str
|
||||
}
|
||||
|
||||
func (t *testSuite) TestSuite() string {
|
||||
var buf bytes.Buffer
|
||||
|
||||
t.title = reStripSpace.ReplaceAllStringFunc(t.Description, func(x string) string {
|
||||
return strings.ToUpper(x[1:])
|
||||
})
|
||||
t.title = regexp.MustCompile(`\W`).ReplaceAllString(t.title, "")
|
||||
|
||||
for idx, c := range t.Cases {
|
||||
c.TestSuite = t
|
||||
buf.WriteString(c.TestCase(idx) + "\n")
|
||||
}
|
||||
return buf.String()
|
||||
}
|
||||
|
||||
var tplInputTestCase = template.Must(template.New("inputcase").Parse(`
|
||||
func Test{{ .OpName }}(t *testing.T) {
|
||||
svc := New{{ .TestCase.TestSuite.API.StructName }}(unit.Session, &aws.Config{Endpoint: aws.String("https://test")})
|
||||
{{ if ne .ParamsString "" }}input := {{ .ParamsString }}
|
||||
{{ range $k, $v := .JSONValues -}}
|
||||
input.{{ $k }} = {{ $v }}
|
||||
{{ end -}}
|
||||
req, _ := svc.{{ .TestCase.Given.ExportedName }}Request(input){{ else }}req, _ := svc.{{ .TestCase.Given.ExportedName }}Request(nil){{ end }}
|
||||
r := req.HTTPRequest
|
||||
|
||||
// build request
|
||||
{{ .TestCase.TestSuite.API.ProtocolPackage }}.Build(req)
|
||||
assert.NoError(t, req.Error)
|
||||
|
||||
{{ if ne .TestCase.InputTest.Body "" }}// assert body
|
||||
assert.NotNil(t, r.Body)
|
||||
{{ .BodyAssertions }}{{ end }}
|
||||
|
||||
{{ if ne .TestCase.InputTest.URI "" }}// assert URL
|
||||
awstesting.AssertURL(t, "https://test{{ .TestCase.InputTest.URI }}", r.URL.String()){{ end }}
|
||||
|
||||
// assert headers
|
||||
{{ range $k, $v := .TestCase.InputTest.Headers }}assert.Equal(t, "{{ $v }}", r.Header.Get("{{ $k }}"))
|
||||
{{ end }}
|
||||
}
|
||||
`))
|
||||
|
||||
type tplInputTestCaseData struct {
|
||||
TestCase *testCase
|
||||
JSONValues map[string]string
|
||||
OpName, ParamsString string
|
||||
}
|
||||
|
||||
func (t tplInputTestCaseData) BodyAssertions() string {
|
||||
code := &bytes.Buffer{}
|
||||
protocol := t.TestCase.TestSuite.API.Metadata.Protocol
|
||||
|
||||
// Extract the body bytes
|
||||
switch protocol {
|
||||
case "rest-xml":
|
||||
fmt.Fprintln(code, "body := util.SortXML(r.Body)")
|
||||
default:
|
||||
fmt.Fprintln(code, "body, _ := ioutil.ReadAll(r.Body)")
|
||||
}
|
||||
|
||||
// Generate the body verification code
|
||||
expectedBody := util.Trim(t.TestCase.InputTest.Body)
|
||||
switch protocol {
|
||||
case "ec2", "query":
|
||||
fmt.Fprintf(code, "awstesting.AssertQuery(t, `%s`, util.Trim(string(body)))",
|
||||
expectedBody)
|
||||
case "rest-xml":
|
||||
if strings.HasPrefix(expectedBody, "<") {
|
||||
fmt.Fprintf(code, "awstesting.AssertXML(t, `%s`, util.Trim(string(body)), %s{})",
|
||||
expectedBody, t.TestCase.Given.InputRef.ShapeName)
|
||||
} else {
|
||||
fmt.Fprintf(code, "assert.Equal(t, `%s`, util.Trim(string(body)))",
|
||||
expectedBody)
|
||||
}
|
||||
case "json", "jsonrpc", "rest-json":
|
||||
if strings.HasPrefix(expectedBody, "{") {
|
||||
fmt.Fprintf(code, "awstesting.AssertJSON(t, `%s`, util.Trim(string(body)))",
|
||||
expectedBody)
|
||||
} else {
|
||||
fmt.Fprintf(code, "assert.Equal(t, `%s`, util.Trim(string(body)))",
|
||||
expectedBody)
|
||||
}
|
||||
default:
|
||||
fmt.Fprintf(code, "assert.Equal(t, `%s`, util.Trim(string(body)))",
|
||||
expectedBody)
|
||||
}
|
||||
|
||||
return code.String()
|
||||
}
|
||||
|
||||
var tplOutputTestCase = template.Must(template.New("outputcase").Parse(`
|
||||
func Test{{ .OpName }}(t *testing.T) {
|
||||
svc := New{{ .TestCase.TestSuite.API.StructName }}(unit.Session, &aws.Config{Endpoint: aws.String("https://test")})
|
||||
|
||||
buf := bytes.NewReader([]byte({{ .Body }}))
|
||||
req, out := svc.{{ .TestCase.Given.ExportedName }}Request(nil)
|
||||
req.HTTPResponse = &http.Response{StatusCode: 200, Body: ioutil.NopCloser(buf), Header: http.Header{}}
|
||||
|
||||
// set headers
|
||||
{{ range $k, $v := .TestCase.OutputTest.Headers }}req.HTTPResponse.Header.Set("{{ $k }}", "{{ $v }}")
|
||||
{{ end }}
|
||||
|
||||
// unmarshal response
|
||||
{{ .TestCase.TestSuite.API.ProtocolPackage }}.UnmarshalMeta(req)
|
||||
{{ .TestCase.TestSuite.API.ProtocolPackage }}.Unmarshal(req)
|
||||
assert.NoError(t, req.Error)
|
||||
|
||||
// assert response
|
||||
assert.NotNil(t, out) // ensure out variable is used
|
||||
{{ .Assertions }}
|
||||
}
|
||||
`))
|
||||
|
||||
type tplOutputTestCaseData struct {
|
||||
TestCase *testCase
|
||||
Body, OpName, Assertions string
|
||||
}
|
||||
|
||||
func (i *testCase) TestCase(idx int) string {
|
||||
var buf bytes.Buffer
|
||||
|
||||
opName := i.TestSuite.API.StructName() + i.TestSuite.title + "Case" + strconv.Itoa(idx+1)
|
||||
|
||||
if i.TestSuite.Type == TestSuiteTypeInput { // input test
|
||||
// query test should sort body as form encoded values
|
||||
switch i.TestSuite.API.Metadata.Protocol {
|
||||
case "query", "ec2":
|
||||
m, _ := url.ParseQuery(i.InputTest.Body)
|
||||
i.InputTest.Body = m.Encode()
|
||||
case "rest-xml":
|
||||
i.InputTest.Body = util.SortXML(bytes.NewReader([]byte(i.InputTest.Body)))
|
||||
case "json", "rest-json":
|
||||
i.InputTest.Body = strings.Replace(i.InputTest.Body, " ", "", -1)
|
||||
}
|
||||
|
||||
jsonValues := buildJSONValues(i.Given.InputRef.Shape)
|
||||
var params interface{}
|
||||
if m, ok := i.Params.(map[string]interface{}); ok {
|
||||
paramsMap := map[string]interface{}{}
|
||||
for k, v := range m {
|
||||
if _, ok := jsonValues[k]; !ok {
|
||||
paramsMap[k] = v
|
||||
} else {
|
||||
if i.InputTest.JSONValues == nil {
|
||||
i.InputTest.JSONValues = map[string]string{}
|
||||
}
|
||||
i.InputTest.JSONValues[k] = serializeJSONValue(v.(map[string]interface{}))
|
||||
}
|
||||
}
|
||||
params = paramsMap
|
||||
} else {
|
||||
params = i.Params
|
||||
}
|
||||
input := tplInputTestCaseData{
|
||||
TestCase: i,
|
||||
OpName: strings.ToUpper(opName[0:1]) + opName[1:],
|
||||
ParamsString: api.ParamsStructFromJSON(params, i.Given.InputRef.Shape, false),
|
||||
JSONValues: i.InputTest.JSONValues,
|
||||
}
|
||||
|
||||
if err := tplInputTestCase.Execute(&buf, input); err != nil {
|
||||
panic(err)
|
||||
}
|
||||
} else if i.TestSuite.Type == TestSuiteTypeOutput {
|
||||
output := tplOutputTestCaseData{
|
||||
TestCase: i,
|
||||
Body: fmt.Sprintf("%q", i.OutputTest.Body),
|
||||
OpName: strings.ToUpper(opName[0:1]) + opName[1:],
|
||||
Assertions: GenerateAssertions(i.Data, i.Given.OutputRef.Shape, "out"),
|
||||
}
|
||||
|
||||
if err := tplOutputTestCase.Execute(&buf, output); err != nil {
|
||||
panic(err)
|
||||
}
|
||||
}
|
||||
|
||||
return buf.String()
|
||||
}
|
||||
|
||||
func serializeJSONValue(m map[string]interface{}) string {
|
||||
str := "aws.JSONValue"
|
||||
str += walkMap(m)
|
||||
return str
|
||||
}
|
||||
|
||||
func walkMap(m map[string]interface{}) string {
|
||||
str := "{"
|
||||
for k, v := range m {
|
||||
str += fmt.Sprintf("%q:", k)
|
||||
switch v.(type) {
|
||||
case bool:
|
||||
str += fmt.Sprintf("%b,\n", v.(bool))
|
||||
case string:
|
||||
str += fmt.Sprintf("%q,\n", v.(string))
|
||||
case int:
|
||||
str += fmt.Sprintf("%d,\n", v.(int))
|
||||
case float64:
|
||||
str += fmt.Sprintf("%f,\n", v.(float64))
|
||||
case map[string]interface{}:
|
||||
str += walkMap(v.(map[string]interface{}))
|
||||
}
|
||||
}
|
||||
str += "}"
|
||||
return str
|
||||
}
|
||||
|
||||
func buildJSONValues(shape *api.Shape) map[string]struct{} {
|
||||
keys := map[string]struct{}{}
|
||||
for key, field := range shape.MemberRefs {
|
||||
if field.JSONValue {
|
||||
keys[key] = struct{}{}
|
||||
}
|
||||
}
|
||||
return keys
|
||||
}
|
||||
|
||||
// generateTestSuite generates a protocol test suite for a given configuration
|
||||
// JSON protocol test file.
|
||||
func generateTestSuite(filename string) string {
|
||||
inout := "Input"
|
||||
if strings.Contains(filename, "output/") {
|
||||
inout = "Output"
|
||||
}
|
||||
|
||||
var suites []testSuite
|
||||
f, err := os.Open(filename)
|
||||
if err != nil {
|
||||
panic(err)
|
||||
}
|
||||
|
||||
err = json.NewDecoder(f).Decode(&suites)
|
||||
if err != nil {
|
||||
panic(err)
|
||||
}
|
||||
|
||||
var buf bytes.Buffer
|
||||
buf.WriteString("package " + suites[0].ProtocolPackage() + "_test\n\n")
|
||||
|
||||
var innerBuf bytes.Buffer
|
||||
innerBuf.WriteString("//\n// Tests begin here\n//\n\n\n")
|
||||
|
||||
for i, suite := range suites {
|
||||
svcPrefix := inout + "Service" + strconv.Itoa(i+1)
|
||||
suite.API.Metadata.ServiceAbbreviation = svcPrefix + "ProtocolTest"
|
||||
suite.API.Operations = map[string]*api.Operation{}
|
||||
for idx, c := range suite.Cases {
|
||||
c.Given.ExportedName = svcPrefix + "TestCaseOperation" + strconv.Itoa(idx+1)
|
||||
suite.API.Operations[c.Given.ExportedName] = c.Given
|
||||
}
|
||||
|
||||
suite.Type = getType(inout)
|
||||
suite.API.NoInitMethods = true // don't generate init methods
|
||||
suite.API.NoStringerMethods = true // don't generate stringer methods
|
||||
suite.API.NoConstServiceNames = true // don't generate service names
|
||||
suite.API.Setup()
|
||||
suite.API.Metadata.EndpointPrefix = suite.API.PackageName()
|
||||
|
||||
// Sort in order for deterministic test generation
|
||||
names := make([]string, 0, len(suite.API.Shapes))
|
||||
for n := range suite.API.Shapes {
|
||||
names = append(names, n)
|
||||
}
|
||||
sort.Strings(names)
|
||||
for _, name := range names {
|
||||
s := suite.API.Shapes[name]
|
||||
s.Rename(svcPrefix + "TestShape" + name)
|
||||
}
|
||||
|
||||
svcCode := addImports(suite.API.ServiceGoCode())
|
||||
if i == 0 {
|
||||
importMatch := reImportRemoval.FindStringSubmatch(svcCode)
|
||||
buf.WriteString(importMatch[0] + "\n\n")
|
||||
buf.WriteString(preamble + "\n\n")
|
||||
}
|
||||
svcCode = removeImports(svcCode)
|
||||
svcCode = strings.Replace(svcCode, "func New(", "func New"+suite.API.StructName()+"(", -1)
|
||||
svcCode = strings.Replace(svcCode, "func newClient(", "func new"+suite.API.StructName()+"Client(", -1)
|
||||
svcCode = strings.Replace(svcCode, "return newClient(", "return new"+suite.API.StructName()+"Client(", -1)
|
||||
buf.WriteString(svcCode + "\n\n")
|
||||
|
||||
apiCode := removeImports(suite.API.APIGoCode())
|
||||
apiCode = strings.Replace(apiCode, "var oprw sync.Mutex", "", -1)
|
||||
apiCode = strings.Replace(apiCode, "oprw.Lock()", "", -1)
|
||||
apiCode = strings.Replace(apiCode, "defer oprw.Unlock()", "", -1)
|
||||
buf.WriteString(apiCode + "\n\n")
|
||||
|
||||
innerBuf.WriteString(suite.TestSuite() + "\n")
|
||||
}
|
||||
|
||||
return buf.String() + innerBuf.String()
|
||||
}
|
||||
|
||||
// findMember searches the shape for the member with the matching key name.
|
||||
func findMember(shape *api.Shape, key string) string {
|
||||
for actualKey := range shape.MemberRefs {
|
||||
if strings.ToLower(key) == strings.ToLower(actualKey) {
|
||||
return actualKey
|
||||
}
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
// GenerateAssertions builds assertions for a shape based on its type.
|
||||
//
|
||||
// The shape's recursive values also will have assertions generated for them.
|
||||
func GenerateAssertions(out interface{}, shape *api.Shape, prefix string) string {
|
||||
if shape == nil {
|
||||
return ""
|
||||
}
|
||||
switch t := out.(type) {
|
||||
case map[string]interface{}:
|
||||
keys := util.SortedKeys(t)
|
||||
|
||||
code := ""
|
||||
if shape.Type == "map" {
|
||||
for _, k := range keys {
|
||||
v := t[k]
|
||||
s := shape.ValueRef.Shape
|
||||
code += GenerateAssertions(v, s, prefix+"[\""+k+"\"]")
|
||||
}
|
||||
} else if shape.Type == "jsonvalue" {
|
||||
code += fmt.Sprintf("reflect.DeepEqual(%s, map[string]interface{}%s)", prefix, walkMap(out.(map[string]interface{})))
|
||||
} else {
|
||||
for _, k := range keys {
|
||||
v := t[k]
|
||||
m := findMember(shape, k)
|
||||
s := shape.MemberRefs[m].Shape
|
||||
code += GenerateAssertions(v, s, prefix+"."+m+"")
|
||||
}
|
||||
}
|
||||
return code
|
||||
case []interface{}:
|
||||
code := ""
|
||||
for i, v := range t {
|
||||
s := shape.MemberRef.Shape
|
||||
code += GenerateAssertions(v, s, prefix+"["+strconv.Itoa(i)+"]")
|
||||
}
|
||||
return code
|
||||
default:
|
||||
switch shape.Type {
|
||||
case "timestamp":
|
||||
return fmt.Sprintf("assert.Equal(t, time.Unix(%#v, 0).UTC().String(), %s.String())\n", out, prefix)
|
||||
case "blob":
|
||||
return fmt.Sprintf("assert.Equal(t, %#v, string(%s))\n", out, prefix)
|
||||
case "integer", "long":
|
||||
return fmt.Sprintf("assert.Equal(t, int64(%#v), *%s)\n", out, prefix)
|
||||
default:
|
||||
if !reflect.ValueOf(out).IsValid() {
|
||||
return fmt.Sprintf("assert.Nil(t, %s)\n", prefix)
|
||||
}
|
||||
return fmt.Sprintf("assert.Equal(t, %#v, *%s)\n", out, prefix)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
func getType(t string) uint {
|
||||
switch t {
|
||||
case "Input":
|
||||
return TestSuiteTypeInput
|
||||
case "Output":
|
||||
return TestSuiteTypeOutput
|
||||
default:
|
||||
panic("Invalid type for test suite")
|
||||
}
|
||||
}
|
||||
|
||||
func main() {
|
||||
out := generateTestSuite(os.Args[1])
|
||||
if len(os.Args) == 3 {
|
||||
f, err := os.Create(os.Args[2])
|
||||
defer f.Close()
|
||||
if err != nil {
|
||||
panic(err)
|
||||
}
|
||||
f.WriteString(util.GoFmt(out))
|
||||
f.Close()
|
||||
|
||||
c := exec.Command("gofmt", "-s", "-w", os.Args[2])
|
||||
if err := c.Run(); err != nil {
|
||||
panic(err)
|
||||
}
|
||||
} else {
|
||||
fmt.Println(out)
|
||||
}
|
||||
}
|
414
vendor/github.com/aws/aws-sdk-go/models/protocol_tests/input/ec2.json
generated
vendored
Normal file
414
vendor/github.com/aws/aws-sdk-go/models/protocol_tests/input/ec2.json
generated
vendored
Normal file
|
@ -0,0 +1,414 @@
|
|||
[
|
||||
{
|
||||
"description": "Scalar members",
|
||||
"metadata": {
|
||||
"protocol": "ec2",
|
||||
"apiVersion": "2014-01-01"
|
||||
},
|
||||
"shapes": {
|
||||
"InputShape": {
|
||||
"type": "structure",
|
||||
"members": {
|
||||
"Foo": {
|
||||
"shape": "StringType"
|
||||
},
|
||||
"Bar": {
|
||||
"shape": "StringType"
|
||||
}
|
||||
}
|
||||
},
|
||||
"StringType": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"cases": [
|
||||
{
|
||||
"given": {
|
||||
"input": {
|
||||
"shape": "InputShape"
|
||||
},
|
||||
"name": "OperationName"
|
||||
},
|
||||
"params": {
|
||||
"Foo": "val1",
|
||||
"Bar": "val2"
|
||||
},
|
||||
"serialized": {
|
||||
"uri": "/",
|
||||
"body": "Action=OperationName&Version=2014-01-01&Foo=val1&Bar=val2"
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"description": "Structure with locationName and queryName applied to members",
|
||||
"metadata": {
|
||||
"protocol": "ec2",
|
||||
"apiVersion": "2014-01-01"
|
||||
},
|
||||
"shapes": {
|
||||
"InputShape": {
|
||||
"type": "structure",
|
||||
"members": {
|
||||
"Foo": {
|
||||
"shape": "StringType"
|
||||
},
|
||||
"Bar": {
|
||||
"shape": "StringType",
|
||||
"locationName": "barLocationName"
|
||||
},
|
||||
"Yuck": {
|
||||
"shape": "StringType",
|
||||
"locationName": "yuckLocationName",
|
||||
"queryName": "yuckQueryName"
|
||||
}
|
||||
}
|
||||
},
|
||||
"StringType": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"cases": [
|
||||
{
|
||||
"given": {
|
||||
"input": {
|
||||
"shape": "InputShape"
|
||||
},
|
||||
"name": "OperationName"
|
||||
},
|
||||
"params": {
|
||||
"Foo": "val1",
|
||||
"Bar": "val2",
|
||||
"Yuck": "val3"
|
||||
},
|
||||
"serialized": {
|
||||
"uri": "/",
|
||||
"body": "Action=OperationName&Version=2014-01-01&Foo=val1&BarLocationName=val2&yuckQueryName=val3"
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"description": "Nested structure members",
|
||||
"metadata": {
|
||||
"protocol": "ec2",
|
||||
"apiVersion": "2014-01-01"
|
||||
},
|
||||
"shapes": {
|
||||
"InputShape": {
|
||||
"type": "structure",
|
||||
"members": {
|
||||
"StructArg": {
|
||||
"shape": "StructType",
|
||||
"locationName": "Struct"
|
||||
}
|
||||
}
|
||||
},
|
||||
"StructType": {
|
||||
"type": "structure",
|
||||
"members": {
|
||||
"ScalarArg": {
|
||||
"shape": "StringType",
|
||||
"locationName": "Scalar"
|
||||
}
|
||||
}
|
||||
},
|
||||
"StringType": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"cases": [
|
||||
{
|
||||
"given": {
|
||||
"input": {
|
||||
"shape": "InputShape"
|
||||
},
|
||||
"name": "OperationName"
|
||||
},
|
||||
"params": {
|
||||
"StructArg": {
|
||||
"ScalarArg": "foo"
|
||||
}
|
||||
},
|
||||
"serialized": {
|
||||
"uri": "/",
|
||||
"body": "Action=OperationName&Version=2014-01-01&Struct.Scalar=foo"
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"description": "List types",
|
||||
"metadata": {
|
||||
"protocol": "ec2",
|
||||
"apiVersion": "2014-01-01"
|
||||
},
|
||||
"shapes": {
|
||||
"InputShape": {
|
||||
"type": "structure",
|
||||
"members": {
|
||||
"ListArg": {
|
||||
"shape": "ListType"
|
||||
}
|
||||
}
|
||||
},
|
||||
"ListType": {
|
||||
"type": "list",
|
||||
"member": {
|
||||
"shape": "Strings"
|
||||
}
|
||||
},
|
||||
"Strings": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"cases": [
|
||||
{
|
||||
"given": {
|
||||
"input": {
|
||||
"shape": "InputShape"
|
||||
},
|
||||
"name": "OperationName"
|
||||
},
|
||||
"params": {
|
||||
"ListArg": [
|
||||
"foo",
|
||||
"bar",
|
||||
"baz"
|
||||
]
|
||||
},
|
||||
"serialized": {
|
||||
"uri": "/",
|
||||
"body": "Action=OperationName&Version=2014-01-01&ListArg.1=foo&ListArg.2=bar&ListArg.3=baz"
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"description": "List with location name applied to member",
|
||||
"metadata": {
|
||||
"protocol": "ec2",
|
||||
"apiVersion": "2014-01-01"
|
||||
},
|
||||
"shapes": {
|
||||
"InputShape": {
|
||||
"type": "structure",
|
||||
"members": {
|
||||
"ListArg": {
|
||||
"shape": "ListType",
|
||||
"locationName": "ListMemberName"
|
||||
}
|
||||
}
|
||||
},
|
||||
"ListType": {
|
||||
"type": "list",
|
||||
"member": {
|
||||
"shape": "StringType",
|
||||
"LocationName": "item"
|
||||
}
|
||||
},
|
||||
"StringType": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"cases": [
|
||||
{
|
||||
"given": {
|
||||
"input": {
|
||||
"shape": "InputShape"
|
||||
},
|
||||
"name": "OperationName"
|
||||
},
|
||||
"params": {
|
||||
"ListArg": [
|
||||
"a",
|
||||
"b",
|
||||
"c"
|
||||
]
|
||||
},
|
||||
"serialized": {
|
||||
"uri": "/",
|
||||
"body": "Action=OperationName&Version=2014-01-01&ListMemberName.1=a&ListMemberName.2=b&ListMemberName.3=c"
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"description": "List with locationName and queryName",
|
||||
"metadata": {
|
||||
"protocol": "ec2",
|
||||
"apiVersion": "2014-01-01"
|
||||
},
|
||||
"shapes": {
|
||||
"InputShape": {
|
||||
"type": "structure",
|
||||
"members": {
|
||||
"ListArg": {
|
||||
"shape": "ListType",
|
||||
"locationName": "ListMemberName",
|
||||
"queryName": "ListQueryName"
|
||||
}
|
||||
}
|
||||
},
|
||||
"ListType": {
|
||||
"type": "list",
|
||||
"member": {
|
||||
"shape": "StringType",
|
||||
"LocationName": "item"
|
||||
}
|
||||
},
|
||||
"StringType": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"cases": [
|
||||
{
|
||||
"given": {
|
||||
"input": {
|
||||
"shape": "InputShape"
|
||||
},
|
||||
"name": "OperationName"
|
||||
},
|
||||
"params": {
|
||||
"ListArg": [
|
||||
"a",
|
||||
"b",
|
||||
"c"
|
||||
]
|
||||
},
|
||||
"serialized": {
|
||||
"uri": "/",
|
||||
"body": "Action=OperationName&Version=2014-01-01&ListQueryName.1=a&ListQueryName.2=b&ListQueryName.3=c"
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"description": "Base64 encoded Blobs",
|
||||
"metadata": {
|
||||
"protocol": "ec2",
|
||||
"apiVersion": "2014-01-01"
|
||||
},
|
||||
"shapes": {
|
||||
"InputShape": {
|
||||
"type": "structure",
|
||||
"members": {
|
||||
"BlobArg": {
|
||||
"shape": "BlobType"
|
||||
}
|
||||
}
|
||||
},
|
||||
"BlobType": {
|
||||
"type": "blob"
|
||||
}
|
||||
},
|
||||
"cases": [
|
||||
{
|
||||
"given": {
|
||||
"input": {
|
||||
"shape": "InputShape"
|
||||
},
|
||||
"name": "OperationName"
|
||||
},
|
||||
"params": {
|
||||
"BlobArg": "foo"
|
||||
},
|
||||
"serialized": {
|
||||
"uri": "/",
|
||||
"body": "Action=OperationName&Version=2014-01-01&BlobArg=Zm9v"
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"description": "Timestamp values",
|
||||
"metadata": {
|
||||
"protocol": "ec2",
|
||||
"apiVersion": "2014-01-01"
|
||||
},
|
||||
"shapes": {
|
||||
"InputShape": {
|
||||
"type": "structure",
|
||||
"members": {
|
||||
"TimeArg": {
|
||||
"shape": "TimestampType"
|
||||
}
|
||||
}
|
||||
},
|
||||
"TimestampType": {
|
||||
"type": "timestamp"
|
||||
}
|
||||
},
|
||||
"cases": [
|
||||
{
|
||||
"given": {
|
||||
"input": {
|
||||
"shape": "InputShape"
|
||||
},
|
||||
"name": "OperationName"
|
||||
},
|
||||
"params": {
|
||||
"TimeArg": 1422172800
|
||||
},
|
||||
"serialized": {
|
||||
"uri": "/",
|
||||
"body": "Action=OperationName&Version=2014-01-01&TimeArg=2015-01-25T08%3A00%3A00Z"
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"description": "Idempotency token auto fill",
|
||||
"metadata": {
|
||||
"protocol": "ec2",
|
||||
"apiVersion": "2014-01-01"
|
||||
},
|
||||
"shapes": {
|
||||
"InputShape": {
|
||||
"type": "structure",
|
||||
"members": {
|
||||
"Token": {
|
||||
"shape": "StringType",
|
||||
"idempotencyToken": true
|
||||
}
|
||||
}
|
||||
},
|
||||
"StringType": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"cases": [
|
||||
{
|
||||
"given": {
|
||||
"input": {
|
||||
"shape": "InputShape"
|
||||
},
|
||||
"name": "OperationName"
|
||||
},
|
||||
"params": {
|
||||
"Token": "abc123"
|
||||
},
|
||||
"serialized": {
|
||||
"uri": "/",
|
||||
"headers": {},
|
||||
"body": "Action=OperationName&Version=2014-01-01&Token=abc123"
|
||||
}
|
||||
},
|
||||
{
|
||||
"given": {
|
||||
"input": {
|
||||
"shape": "InputShape"
|
||||
},
|
||||
"name": "OperationName"
|
||||
},
|
||||
"params": {
|
||||
},
|
||||
"serialized": {
|
||||
"uri": "/",
|
||||
"headers": {},
|
||||
"body": "Action=OperationName&Version=2014-01-01&Token=00000000-0000-4000-8000-000000000000"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
539
vendor/github.com/aws/aws-sdk-go/models/protocol_tests/input/json.json
generated
vendored
Normal file
539
vendor/github.com/aws/aws-sdk-go/models/protocol_tests/input/json.json
generated
vendored
Normal file
|
@ -0,0 +1,539 @@
|
|||
[
|
||||
{
|
||||
"description": "Scalar members",
|
||||
"metadata": {
|
||||
"protocol": "json",
|
||||
"jsonVersion": "1.1",
|
||||
"targetPrefix": "com.amazonaws.foo"
|
||||
},
|
||||
"shapes": {
|
||||
"InputShape": {
|
||||
"type": "structure",
|
||||
"members": {
|
||||
"Name": {
|
||||
"shape": "StringType"
|
||||
}
|
||||
}
|
||||
},
|
||||
"StringType": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"cases": [
|
||||
{
|
||||
"given": {
|
||||
"input": {
|
||||
"shape": "InputShape"
|
||||
},
|
||||
"name": "OperationName",
|
||||
"http": {
|
||||
"method": "POST"
|
||||
}
|
||||
},
|
||||
"params": {
|
||||
"Name": "myname"
|
||||
},
|
||||
"serialized": {
|
||||
"body": "{\"Name\": \"myname\"}",
|
||||
"headers": {
|
||||
"X-Amz-Target": "com.amazonaws.foo.OperationName",
|
||||
"Content-Type": "application/x-amz-json-1.1"
|
||||
},
|
||||
"uri": "/"
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"description": "Timestamp values",
|
||||
"metadata": {
|
||||
"protocol": "json",
|
||||
"jsonVersion": "1.1",
|
||||
"targetPrefix": "com.amazonaws.foo"
|
||||
},
|
||||
"shapes": {
|
||||
"InputShape": {
|
||||
"type": "structure",
|
||||
"members": {
|
||||
"TimeArg": {
|
||||
"shape": "TimestampType"
|
||||
}
|
||||
}
|
||||
},
|
||||
"TimestampType": {
|
||||
"type": "timestamp"
|
||||
}
|
||||
},
|
||||
"cases": [
|
||||
{
|
||||
"given": {
|
||||
"input": {
|
||||
"shape": "InputShape"
|
||||
},
|
||||
"name": "OperationName"
|
||||
},
|
||||
"params": {
|
||||
"TimeArg": 1422172800
|
||||
},
|
||||
"serialized": {
|
||||
"body": "{\"TimeArg\": 1422172800}",
|
||||
"headers": {
|
||||
"X-Amz-Target": "com.amazonaws.foo.OperationName",
|
||||
"Content-Type": "application/x-amz-json-1.1"
|
||||
},
|
||||
"uri": "/"
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"description": "Base64 encoded Blobs",
|
||||
"metadata": {
|
||||
"protocol": "json",
|
||||
"jsonVersion": "1.1",
|
||||
"targetPrefix": "com.amazonaws.foo"
|
||||
},
|
||||
"shapes": {
|
||||
"InputShape": {
|
||||
"type": "structure",
|
||||
"members": {
|
||||
"BlobArg": {
|
||||
"shape": "BlobType"
|
||||
},
|
||||
"BlobMap": {
|
||||
"shape": "BlobMapType"
|
||||
}
|
||||
}
|
||||
},
|
||||
"BlobType": {
|
||||
"type": "blob"
|
||||
},
|
||||
"BlobMapType": {
|
||||
"type": "map",
|
||||
"key": {"shape": "StringType"},
|
||||
"value": {"shape": "BlobType"}
|
||||
},
|
||||
"StringType": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"cases": [
|
||||
{
|
||||
"given": {
|
||||
"input": {
|
||||
"shape": "InputShape"
|
||||
},
|
||||
"name": "OperationName"
|
||||
},
|
||||
"params": {
|
||||
"BlobArg": "foo"
|
||||
},
|
||||
"serialized": {
|
||||
"body": "{\"BlobArg\": \"Zm9v\"}",
|
||||
"headers": {
|
||||
"X-Amz-Target": "com.amazonaws.foo.OperationName",
|
||||
"Content-Type": "application/x-amz-json-1.1"
|
||||
},
|
||||
"uri": "/"
|
||||
}
|
||||
},
|
||||
{
|
||||
"given": {
|
||||
"input": {
|
||||
"shape": "InputShape"
|
||||
},
|
||||
"name": "OperationName"
|
||||
},
|
||||
"params": {
|
||||
"BlobMap": {
|
||||
"key1": "foo",
|
||||
"key2": "bar"
|
||||
}
|
||||
},
|
||||
"serialized": {
|
||||
"body": "{\"BlobMap\": {\"key1\": \"Zm9v\", \"key2\": \"YmFy\"}}",
|
||||
"headers": {
|
||||
"X-Amz-Target": "com.amazonaws.foo.OperationName",
|
||||
"Content-Type": "application/x-amz-json-1.1"
|
||||
},
|
||||
"uri": "/"
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"description": "Nested blobs",
|
||||
"metadata": {
|
||||
"protocol": "json",
|
||||
"jsonVersion": "1.1",
|
||||
"targetPrefix": "com.amazonaws.foo"
|
||||
},
|
||||
"shapes": {
|
||||
"InputShape": {
|
||||
"type": "structure",
|
||||
"members": {
|
||||
"ListParam": {
|
||||
"shape": "ListOfStructures"
|
||||
}
|
||||
}
|
||||
},
|
||||
"ListOfStructures": {
|
||||
"type": "list",
|
||||
"member": {
|
||||
"shape": "BlobType"
|
||||
}
|
||||
},
|
||||
"BlobType": {
|
||||
"type": "blob"
|
||||
}
|
||||
},
|
||||
"cases": [
|
||||
{
|
||||
"given": {
|
||||
"http": {
|
||||
"method": "POST"
|
||||
},
|
||||
"input": {
|
||||
"shape": "InputShape"
|
||||
},
|
||||
"name": "OperationName"
|
||||
},
|
||||
"params": {
|
||||
"ListParam": ["foo", "bar"]
|
||||
},
|
||||
"serialized": {
|
||||
"body": "{\"ListParam\": [\"Zm9v\", \"YmFy\"]}",
|
||||
"uri": "/",
|
||||
"headers": {"X-Amz-Target": "com.amazonaws.foo.OperationName",
|
||||
"Content-Type": "application/x-amz-json-1.1"}
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"description": "Recursive shapes",
|
||||
"metadata": {
|
||||
"protocol": "json",
|
||||
"jsonVersion": "1.1",
|
||||
"targetPrefix": "com.amazonaws.foo"
|
||||
},
|
||||
"shapes": {
|
||||
"InputShape": {
|
||||
"type": "structure",
|
||||
"members": {
|
||||
"RecursiveStruct": {
|
||||
"shape": "RecursiveStructType"
|
||||
}
|
||||
}
|
||||
},
|
||||
"RecursiveStructType": {
|
||||
"type": "structure",
|
||||
"members": {
|
||||
"NoRecurse": {
|
||||
"shape": "StringType"
|
||||
},
|
||||
"RecursiveStruct": {
|
||||
"shape": "RecursiveStructType"
|
||||
},
|
||||
"RecursiveList": {
|
||||
"shape": "RecursiveListType"
|
||||
},
|
||||
"RecursiveMap": {
|
||||
"shape": "RecursiveMapType"
|
||||
}
|
||||
}
|
||||
},
|
||||
"RecursiveListType": {
|
||||
"type": "list",
|
||||
"member": {
|
||||
"shape": "RecursiveStructType"
|
||||
}
|
||||
},
|
||||
"RecursiveMapType": {
|
||||
"type": "map",
|
||||
"key": {
|
||||
"shape": "StringType"
|
||||
},
|
||||
"value": {
|
||||
"shape": "RecursiveStructType"
|
||||
}
|
||||
},
|
||||
"StringType": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"cases": [
|
||||
{
|
||||
"given": {
|
||||
"input": {
|
||||
"shape": "InputShape"
|
||||
},
|
||||
"name": "OperationName"
|
||||
},
|
||||
"params": {
|
||||
"RecursiveStruct": {
|
||||
"NoRecurse": "foo"
|
||||
}
|
||||
},
|
||||
"serialized": {
|
||||
"uri": "/",
|
||||
"headers": {
|
||||
"X-Amz-Target": "com.amazonaws.foo.OperationName",
|
||||
"Content-Type": "application/x-amz-json-1.1"
|
||||
},
|
||||
"body": "{\"RecursiveStruct\": {\"NoRecurse\": \"foo\"}}"
|
||||
}
|
||||
},
|
||||
{
|
||||
"given": {
|
||||
"input": {
|
||||
"shape": "InputShape"
|
||||
},
|
||||
"name": "OperationName"
|
||||
},
|
||||
"params": {
|
||||
"RecursiveStruct": {
|
||||
"RecursiveStruct": {
|
||||
"NoRecurse": "foo"
|
||||
}
|
||||
}
|
||||
},
|
||||
"serialized": {
|
||||
"uri": "/",
|
||||
"headers": {
|
||||
"X-Amz-Target": "com.amazonaws.foo.OperationName",
|
||||
"Content-Type": "application/x-amz-json-1.1"
|
||||
},
|
||||
"body": "{\"RecursiveStruct\": {\"RecursiveStruct\": {\"NoRecurse\": \"foo\"}}}"
|
||||
}
|
||||
},
|
||||
{
|
||||
"given": {
|
||||
"input": {
|
||||
"shape": "InputShape"
|
||||
},
|
||||
"name": "OperationName"
|
||||
},
|
||||
"params": {
|
||||
"RecursiveStruct": {
|
||||
"RecursiveStruct": {
|
||||
"RecursiveStruct": {
|
||||
"RecursiveStruct": {
|
||||
"NoRecurse": "foo"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"serialized": {
|
||||
"uri": "/",
|
||||
"headers": {
|
||||
"X-Amz-Target": "com.amazonaws.foo.OperationName",
|
||||
"Content-Type": "application/x-amz-json-1.1"
|
||||
},
|
||||
"body": "{\"RecursiveStruct\": {\"RecursiveStruct\": {\"RecursiveStruct\": {\"RecursiveStruct\": {\"NoRecurse\": \"foo\"}}}}}"
|
||||
}
|
||||
},
|
||||
{
|
||||
"given": {
|
||||
"input": {
|
||||
"shape": "InputShape"
|
||||
},
|
||||
"name": "OperationName"
|
||||
},
|
||||
"params": {
|
||||
"RecursiveStruct": {
|
||||
"RecursiveList": [
|
||||
{
|
||||
"NoRecurse": "foo"
|
||||
},
|
||||
{
|
||||
"NoRecurse": "bar"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"serialized": {
|
||||
"uri": "/",
|
||||
"headers": {
|
||||
"X-Amz-Target": "com.amazonaws.foo.OperationName",
|
||||
"Content-Type": "application/x-amz-json-1.1"
|
||||
},
|
||||
"body": "{\"RecursiveStruct\": {\"RecursiveList\": [{\"NoRecurse\": \"foo\"}, {\"NoRecurse\": \"bar\"}]}}"
|
||||
}
|
||||
},
|
||||
{
|
||||
"given": {
|
||||
"input": {
|
||||
"shape": "InputShape"
|
||||
},
|
||||
"name": "OperationName"
|
||||
},
|
||||
"params": {
|
||||
"RecursiveStruct": {
|
||||
"RecursiveList": [
|
||||
{
|
||||
"NoRecurse": "foo"
|
||||
},
|
||||
{
|
||||
"RecursiveStruct": {
|
||||
"NoRecurse": "bar"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"serialized": {
|
||||
"uri": "/",
|
||||
"headers": {
|
||||
"X-Amz-Target": "com.amazonaws.foo.OperationName",
|
||||
"Content-Type": "application/x-amz-json-1.1"
|
||||
},
|
||||
"body": "{\"RecursiveStruct\": {\"RecursiveList\": [{\"NoRecurse\": \"foo\"}, {\"RecursiveStruct\": {\"NoRecurse\": \"bar\"}}]}}"
|
||||
}
|
||||
},
|
||||
{
|
||||
"given": {
|
||||
"input": {
|
||||
"shape": "InputShape"
|
||||
},
|
||||
"name": "OperationName"
|
||||
},
|
||||
"params": {
|
||||
"RecursiveStruct": {
|
||||
"RecursiveMap": {
|
||||
"foo": {
|
||||
"NoRecurse": "foo"
|
||||
},
|
||||
"bar": {
|
||||
"NoRecurse": "bar"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"serialized": {
|
||||
"uri": "/",
|
||||
"headers": {
|
||||
"X-Amz-Target": "com.amazonaws.foo.OperationName",
|
||||
"Content-Type": "application/x-amz-json-1.1"
|
||||
},
|
||||
"body": "{\"RecursiveStruct\": {\"RecursiveMap\": {\"foo\": {\"NoRecurse\": \"foo\"}, \"bar\": {\"NoRecurse\": \"bar\"}}}}"
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"description": "Empty maps",
|
||||
"metadata": {
|
||||
"protocol": "json",
|
||||
"jsonVersion": "1.1",
|
||||
"targetPrefix": "com.amazonaws.foo"
|
||||
},
|
||||
"shapes": {
|
||||
"InputShape": {
|
||||
"type": "structure",
|
||||
"members": {
|
||||
"Map": {
|
||||
"shape": "MapType"
|
||||
}
|
||||
}
|
||||
},
|
||||
"MapType": {
|
||||
"type": "map",
|
||||
"key": {
|
||||
"shape": "StringType"
|
||||
},
|
||||
"value": {
|
||||
"shape": "StringType"
|
||||
}
|
||||
},
|
||||
"StringType": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"cases": [
|
||||
{
|
||||
"given": {
|
||||
"input": {
|
||||
"shape": "InputShape"
|
||||
},
|
||||
"name": "OperationName",
|
||||
"http": {
|
||||
"method": "POST"
|
||||
}
|
||||
},
|
||||
"params": {
|
||||
"Map": {}
|
||||
},
|
||||
"serialized": {
|
||||
"body": "{\"Map\": {}}",
|
||||
"headers": {
|
||||
"X-Amz-Target": "com.amazonaws.foo.OperationName",
|
||||
"Content-Type": "application/x-amz-json-1.1"
|
||||
},
|
||||
"uri": "/"
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"description": "Idempotency token auto fill",
|
||||
"metadata": {
|
||||
"protocol": "json",
|
||||
"apiVersion": "2014-01-01"
|
||||
},
|
||||
"shapes": {
|
||||
"InputShape": {
|
||||
"type": "structure",
|
||||
"members": {
|
||||
"Token": {
|
||||
"shape": "StringType",
|
||||
"idempotencyToken": true
|
||||
}
|
||||
}
|
||||
},
|
||||
"StringType": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"cases": [
|
||||
{
|
||||
"given": {
|
||||
"input": {
|
||||
"shape": "InputShape"
|
||||
},
|
||||
"http": {
|
||||
"method": "POST"
|
||||
},
|
||||
"name": "OperationName"
|
||||
},
|
||||
"params": {
|
||||
"Token": "abc123"
|
||||
},
|
||||
"serialized": {
|
||||
"uri": "/",
|
||||
"headers": {},
|
||||
"body": "{\"Token\": \"abc123\"}"
|
||||
}
|
||||
},
|
||||
{
|
||||
"given": {
|
||||
"input": {
|
||||
"shape": "InputShape"
|
||||
},
|
||||
"http": {
|
||||
"method": "POST"
|
||||
},
|
||||
"name": "OperationName"
|
||||
},
|
||||
"params": {
|
||||
},
|
||||
"serialized": {
|
||||
"uri": "/",
|
||||
"headers": {},
|
||||
"body": "{\"Token\": \"00000000-0000-4000-8000-000000000000\"}"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
840
vendor/github.com/aws/aws-sdk-go/models/protocol_tests/input/query.json
generated
vendored
Normal file
840
vendor/github.com/aws/aws-sdk-go/models/protocol_tests/input/query.json
generated
vendored
Normal file
|
@ -0,0 +1,840 @@
|
|||
[
|
||||
{
|
||||
"description": "Scalar members",
|
||||
"metadata": {
|
||||
"protocol": "query",
|
||||
"apiVersion": "2014-01-01"
|
||||
},
|
||||
"shapes": {
|
||||
"InputShape": {
|
||||
"type": "structure",
|
||||
"members": {
|
||||
"Foo": {
|
||||
"shape": "StringType"
|
||||
},
|
||||
"Bar": {
|
||||
"shape": "StringType"
|
||||
},
|
||||
"Baz": {
|
||||
"shape": "BooleanType"
|
||||
}
|
||||
}
|
||||
},
|
||||
"StringType": {
|
||||
"type": "string"
|
||||
},
|
||||
"BooleanType": {
|
||||
"type": "boolean"
|
||||
}
|
||||
},
|
||||
"cases": [
|
||||
{
|
||||
"given": {
|
||||
"input": {
|
||||
"shape": "InputShape"
|
||||
},
|
||||
"name": "OperationName"
|
||||
},
|
||||
"params": {
|
||||
"Foo": "val1",
|
||||
"Bar": "val2"
|
||||
},
|
||||
"serialized": {
|
||||
"uri": "/",
|
||||
"body": "Action=OperationName&Version=2014-01-01&Foo=val1&Bar=val2"
|
||||
}
|
||||
},
|
||||
{
|
||||
"given": {
|
||||
"input": {
|
||||
"shape": "InputShape"
|
||||
},
|
||||
"name": "OperationName"
|
||||
},
|
||||
"params": {
|
||||
"Baz": true
|
||||
},
|
||||
"serialized": {
|
||||
"uri": "/",
|
||||
"body": "Action=OperationName&Version=2014-01-01&Baz=true"
|
||||
}
|
||||
},
|
||||
{
|
||||
"given": {
|
||||
"input": {
|
||||
"shape": "InputShape"
|
||||
},
|
||||
"name": "OperationName"
|
||||
},
|
||||
"params": {
|
||||
"Baz": false
|
||||
},
|
||||
"serialized": {
|
||||
"uri": "/",
|
||||
"body": "Action=OperationName&Version=2014-01-01&Baz=false"
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"description": "Nested structure members",
|
||||
"metadata": {
|
||||
"protocol": "query",
|
||||
"apiVersion": "2014-01-01"
|
||||
},
|
||||
"shapes": {
|
||||
"InputShape": {
|
||||
"type": "structure",
|
||||
"members": {
|
||||
"StructArg": {
|
||||
"shape": "StructType"
|
||||
}
|
||||
}
|
||||
},
|
||||
"StructType": {
|
||||
"type": "structure",
|
||||
"members": {
|
||||
"ScalarArg": {
|
||||
"shape": "StringType"
|
||||
}
|
||||
}
|
||||
},
|
||||
"StringType": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"cases": [
|
||||
{
|
||||
"given": {
|
||||
"input": {
|
||||
"shape": "InputShape"
|
||||
},
|
||||
"name": "OperationName"
|
||||
},
|
||||
"params": {
|
||||
"StructArg": {
|
||||
"ScalarArg": "foo"
|
||||
}
|
||||
},
|
||||
"serialized": {
|
||||
"uri": "/",
|
||||
"body": "Action=OperationName&Version=2014-01-01&StructArg.ScalarArg=foo"
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"description": "List types",
|
||||
"metadata": {
|
||||
"protocol": "query",
|
||||
"apiVersion": "2014-01-01"
|
||||
},
|
||||
"shapes": {
|
||||
"InputShape": {
|
||||
"type": "structure",
|
||||
"members": {
|
||||
"ListArg": {
|
||||
"shape": "ListType"
|
||||
}
|
||||
}
|
||||
},
|
||||
"ListType": {
|
||||
"type": "list",
|
||||
"member": {
|
||||
"shape": "Strings"
|
||||
}
|
||||
},
|
||||
"Strings": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"cases": [
|
||||
{
|
||||
"given": {
|
||||
"input": {
|
||||
"shape": "InputShape"
|
||||
},
|
||||
"name": "OperationName"
|
||||
},
|
||||
"params": {
|
||||
"ListArg": [
|
||||
"foo",
|
||||
"bar",
|
||||
"baz"
|
||||
]
|
||||
},
|
||||
"serialized": {
|
||||
"uri": "/",
|
||||
"body": "Action=OperationName&Version=2014-01-01&ListArg.member.1=foo&ListArg.member.2=bar&ListArg.member.3=baz"
|
||||
}
|
||||
},
|
||||
{
|
||||
"given": {
|
||||
"input": {
|
||||
"shape": "InputShape"
|
||||
},
|
||||
"name": "OperationName"
|
||||
},
|
||||
"params": {
|
||||
"ListArg": []
|
||||
},
|
||||
"serialized": {
|
||||
"uri": "/",
|
||||
"body": "Action=OperationName&Version=2014-01-01&ListArg="
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"description": "Flattened list",
|
||||
"metadata": {
|
||||
"protocol": "query",
|
||||
"apiVersion": "2014-01-01"
|
||||
},
|
||||
"shapes": {
|
||||
"InputShape": {
|
||||
"type": "structure",
|
||||
"members": {
|
||||
"ScalarArg": {
|
||||
"shape": "StringType"
|
||||
},
|
||||
"ListArg": {
|
||||
"shape": "ListType"
|
||||
},
|
||||
"NamedListArg": {
|
||||
"shape": "NamedListType"
|
||||
}
|
||||
}
|
||||
},
|
||||
"ListType": {
|
||||
"type": "list",
|
||||
"member": {
|
||||
"shape": "StringType"
|
||||
},
|
||||
"flattened": true
|
||||
},
|
||||
"NamedListType": {
|
||||
"type": "list",
|
||||
"member": {
|
||||
"shape": "StringType",
|
||||
"locationName": "Foo"
|
||||
},
|
||||
"flattened": true
|
||||
},
|
||||
"StringType": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"cases": [
|
||||
{
|
||||
"given": {
|
||||
"input": {
|
||||
"shape": "InputShape"
|
||||
},
|
||||
"name": "OperationName"
|
||||
},
|
||||
"params": {
|
||||
"ScalarArg": "foo",
|
||||
"ListArg": [
|
||||
"a",
|
||||
"b",
|
||||
"c"
|
||||
]
|
||||
},
|
||||
"serialized": {
|
||||
"uri": "/",
|
||||
"body": "Action=OperationName&Version=2014-01-01&ScalarArg=foo&ListArg.1=a&ListArg.2=b&ListArg.3=c"
|
||||
}
|
||||
},
|
||||
{
|
||||
"given": {
|
||||
"input": {
|
||||
"shape": "InputShape"
|
||||
},
|
||||
"name": "OperationName"
|
||||
},
|
||||
"params": {
|
||||
"NamedListArg": [
|
||||
"a"
|
||||
]
|
||||
},
|
||||
"serialized": {
|
||||
"uri": "/",
|
||||
"body": "Action=OperationName&Version=2014-01-01&Foo.1=a"
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"description": "Serialize flattened map type",
|
||||
"metadata": {
|
||||
"protocol": "query",
|
||||
"apiVersion": "2014-01-01"
|
||||
},
|
||||
"shapes": {
|
||||
"InputShape": {
|
||||
"type": "structure",
|
||||
"members": {
|
||||
"MapArg": {
|
||||
"shape": "StringMap"
|
||||
}
|
||||
}
|
||||
},
|
||||
"StringMap": {
|
||||
"type": "map",
|
||||
"key": {
|
||||
"shape": "StringType"
|
||||
},
|
||||
"value": {
|
||||
"shape": "StringType"
|
||||
},
|
||||
"flattened": true
|
||||
},
|
||||
"StringType": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"cases": [
|
||||
{
|
||||
"given": {
|
||||
"input": {
|
||||
"shape": "InputShape"
|
||||
},
|
||||
"name": "OperationName"
|
||||
},
|
||||
"params": {
|
||||
"MapArg": {
|
||||
"key1": "val1",
|
||||
"key2": "val2"
|
||||
}
|
||||
},
|
||||
"serialized": {
|
||||
"uri": "/",
|
||||
"body": "Action=OperationName&Version=2014-01-01&MapArg.1.key=key1&MapArg.1.value=val1&MapArg.2.key=key2&MapArg.2.value=val2"
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"description": "Non flattened list with LocationName",
|
||||
"metadata": {
|
||||
"protocol": "query",
|
||||
"apiVersion": "2014-01-01"
|
||||
},
|
||||
"shapes": {
|
||||
"InputShape": {
|
||||
"type": "structure",
|
||||
"members": {
|
||||
"ListArg": {
|
||||
"shape": "ListType"
|
||||
}
|
||||
}
|
||||
},
|
||||
"ListType": {
|
||||
"type": "list",
|
||||
"member": {
|
||||
"shape": "StringType",
|
||||
"locationName": "item"
|
||||
}
|
||||
},
|
||||
"StringType": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"cases": [
|
||||
{
|
||||
"given": {
|
||||
"input": {
|
||||
"shape": "InputShape"
|
||||
},
|
||||
"name": "OperationName"
|
||||
},
|
||||
"params": {
|
||||
"ListArg": [
|
||||
"a",
|
||||
"b",
|
||||
"c"
|
||||
]
|
||||
},
|
||||
"serialized": {
|
||||
"uri": "/",
|
||||
"body": "Action=OperationName&Version=2014-01-01&ListArg.item.1=a&ListArg.item.2=b&ListArg.item.3=c"
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"description": "Flattened list with LocationName",
|
||||
"metadata": {
|
||||
"protocol": "query",
|
||||
"apiVersion": "2014-01-01"
|
||||
},
|
||||
"shapes": {
|
||||
"InputShape": {
|
||||
"type": "structure",
|
||||
"members": {
|
||||
"ScalarArg": {
|
||||
"shape": "StringType"
|
||||
},
|
||||
"ListArg": {
|
||||
"shape": "ListType"
|
||||
}
|
||||
}
|
||||
},
|
||||
"ListType": {
|
||||
"type": "list",
|
||||
"member": {
|
||||
"shape": "StringType",
|
||||
"locationName": "ListArgLocation"
|
||||
},
|
||||
"flattened": true
|
||||
},
|
||||
"StringType": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"cases": [
|
||||
{
|
||||
"given": {
|
||||
"input": {
|
||||
"shape": "InputShape"
|
||||
},
|
||||
"name": "OperationName"
|
||||
},
|
||||
"params": {
|
||||
"ScalarArg": "foo",
|
||||
"ListArg": [
|
||||
"a",
|
||||
"b",
|
||||
"c"
|
||||
]
|
||||
},
|
||||
"serialized": {
|
||||
"uri": "/",
|
||||
"body": "Action=OperationName&Version=2014-01-01&ScalarArg=foo&ListArgLocation.1=a&ListArgLocation.2=b&ListArgLocation.3=c"
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"description": "Serialize map type",
|
||||
"metadata": {
|
||||
"protocol": "query",
|
||||
"apiVersion": "2014-01-01"
|
||||
},
|
||||
"shapes": {
|
||||
"InputShape": {
|
||||
"type": "structure",
|
||||
"members": {
|
||||
"MapArg": {
|
||||
"shape": "StringMap"
|
||||
}
|
||||
}
|
||||
},
|
||||
"StringMap": {
|
||||
"type": "map",
|
||||
"key": {
|
||||
"shape": "StringType"
|
||||
},
|
||||
"value": {
|
||||
"shape": "StringType"
|
||||
}
|
||||
},
|
||||
"StringType": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"cases": [
|
||||
{
|
||||
"given": {
|
||||
"input": {
|
||||
"shape": "InputShape"
|
||||
},
|
||||
"name": "OperationName"
|
||||
},
|
||||
"params": {
|
||||
"MapArg": {
|
||||
"key1": "val1",
|
||||
"key2": "val2"
|
||||
}
|
||||
},
|
||||
"serialized": {
|
||||
"uri": "/",
|
||||
"body": "Action=OperationName&Version=2014-01-01&MapArg.entry.1.key=key1&MapArg.entry.1.value=val1&MapArg.entry.2.key=key2&MapArg.entry.2.value=val2"
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"description": "Serialize map type with locationName",
|
||||
"metadata": {
|
||||
"protocol": "query",
|
||||
"apiVersion": "2014-01-01"
|
||||
},
|
||||
"shapes": {
|
||||
"InputShape": {
|
||||
"type": "structure",
|
||||
"members": {
|
||||
"MapArg": {
|
||||
"shape": "StringMap"
|
||||
}
|
||||
}
|
||||
},
|
||||
"StringMap": {
|
||||
"type": "map",
|
||||
"key": {
|
||||
"shape": "StringType",
|
||||
"locationName": "TheKey"
|
||||
},
|
||||
"value": {
|
||||
"shape": "StringType",
|
||||
"locationName": "TheValue"
|
||||
}
|
||||
},
|
||||
"StringType": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"cases": [
|
||||
{
|
||||
"given": {
|
||||
"input": {
|
||||
"shape": "InputShape"
|
||||
},
|
||||
"name": "OperationName"
|
||||
},
|
||||
"params": {
|
||||
"MapArg": {
|
||||
"key1": "val1",
|
||||
"key2": "val2"
|
||||
}
|
||||
},
|
||||
"serialized": {
|
||||
"uri": "/",
|
||||
"body": "Action=OperationName&Version=2014-01-01&MapArg.entry.1.TheKey=key1&MapArg.entry.1.TheValue=val1&MapArg.entry.2.TheKey=key2&MapArg.entry.2.TheValue=val2"
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"description": "Base64 encoded Blobs",
|
||||
"metadata": {
|
||||
"protocol": "query",
|
||||
"apiVersion": "2014-01-01"
|
||||
},
|
||||
"shapes": {
|
||||
"InputShape": {
|
||||
"type": "structure",
|
||||
"members": {
|
||||
"BlobArg": {
|
||||
"shape": "BlobType"
|
||||
}
|
||||
}
|
||||
},
|
||||
"BlobType": {
|
||||
"type": "blob"
|
||||
}
|
||||
},
|
||||
"cases": [
|
||||
{
|
||||
"given": {
|
||||
"input": {
|
||||
"shape": "InputShape"
|
||||
},
|
||||
"name": "OperationName"
|
||||
},
|
||||
"params": {
|
||||
"BlobArg": "foo"
|
||||
},
|
||||
"serialized": {
|
||||
"uri": "/",
|
||||
"body": "Action=OperationName&Version=2014-01-01&BlobArg=Zm9v"
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"description": "Timestamp values",
|
||||
"metadata": {
|
||||
"protocol": "query",
|
||||
"apiVersion": "2014-01-01"
|
||||
},
|
||||
"shapes": {
|
||||
"InputShape": {
|
||||
"type": "structure",
|
||||
"members": {
|
||||
"TimeArg": {
|
||||
"shape": "TimestampType"
|
||||
}
|
||||
}
|
||||
},
|
||||
"TimestampType": {
|
||||
"type": "timestamp"
|
||||
}
|
||||
},
|
||||
"cases": [
|
||||
{
|
||||
"given": {
|
||||
"input": {
|
||||
"shape": "InputShape"
|
||||
},
|
||||
"name": "OperationName"
|
||||
},
|
||||
"params": {
|
||||
"TimeArg": 1422172800
|
||||
},
|
||||
"serialized": {
|
||||
"uri": "/",
|
||||
"body": "Action=OperationName&Version=2014-01-01&TimeArg=2015-01-25T08%3A00%3A00Z"
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"description": "Recursive shapes",
|
||||
"metadata": {
|
||||
"protocol": "query",
|
||||
"apiVersion": "2014-01-01"
|
||||
},
|
||||
"shapes": {
|
||||
"InputShape": {
|
||||
"type": "structure",
|
||||
"members": {
|
||||
"RecursiveStruct": {
|
||||
"shape": "RecursiveStructType"
|
||||
}
|
||||
}
|
||||
},
|
||||
"RecursiveStructType": {
|
||||
"type": "structure",
|
||||
"members": {
|
||||
"NoRecurse": {
|
||||
"shape": "StringType"
|
||||
},
|
||||
"RecursiveStruct": {
|
||||
"shape": "RecursiveStructType"
|
||||
},
|
||||
"RecursiveList": {
|
||||
"shape": "RecursiveListType"
|
||||
},
|
||||
"RecursiveMap": {
|
||||
"shape": "RecursiveMapType"
|
||||
}
|
||||
}
|
||||
},
|
||||
"RecursiveListType": {
|
||||
"type": "list",
|
||||
"member": {
|
||||
"shape": "RecursiveStructType"
|
||||
}
|
||||
},
|
||||
"RecursiveMapType": {
|
||||
"type": "map",
|
||||
"key": {
|
||||
"shape": "StringType"
|
||||
},
|
||||
"value": {
|
||||
"shape": "RecursiveStructType"
|
||||
}
|
||||
},
|
||||
"StringType": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"cases": [
|
||||
{
|
||||
"given": {
|
||||
"input": {
|
||||
"shape": "InputShape"
|
||||
},
|
||||
"name": "OperationName"
|
||||
},
|
||||
"params": {
|
||||
"RecursiveStruct": {
|
||||
"NoRecurse": "foo"
|
||||
}
|
||||
},
|
||||
"serialized": {
|
||||
"uri": "/",
|
||||
"body": "Action=OperationName&Version=2014-01-01&RecursiveStruct.NoRecurse=foo"
|
||||
}
|
||||
},
|
||||
{
|
||||
"given": {
|
||||
"input": {
|
||||
"shape": "InputShape"
|
||||
},
|
||||
"name": "OperationName"
|
||||
},
|
||||
"params": {
|
||||
"RecursiveStruct": {
|
||||
"RecursiveStruct": {
|
||||
"NoRecurse": "foo"
|
||||
}
|
||||
}
|
||||
},
|
||||
"serialized": {
|
||||
"uri": "/",
|
||||
"body": "Action=OperationName&Version=2014-01-01&RecursiveStruct.RecursiveStruct.NoRecurse=foo"
|
||||
}
|
||||
},
|
||||
{
|
||||
"given": {
|
||||
"input": {
|
||||
"shape": "InputShape"
|
||||
},
|
||||
"name": "OperationName"
|
||||
},
|
||||
"params": {
|
||||
"RecursiveStruct": {
|
||||
"RecursiveStruct": {
|
||||
"RecursiveStruct": {
|
||||
"RecursiveStruct": {
|
||||
"NoRecurse": "foo"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"serialized": {
|
||||
"uri": "/",
|
||||
"body": "Action=OperationName&Version=2014-01-01&RecursiveStruct.RecursiveStruct.RecursiveStruct.RecursiveStruct.NoRecurse=foo"
|
||||
}
|
||||
},
|
||||
{
|
||||
"given": {
|
||||
"input": {
|
||||
"shape": "InputShape"
|
||||
},
|
||||
"name": "OperationName"
|
||||
},
|
||||
"params": {
|
||||
"RecursiveStruct": {
|
||||
"RecursiveList": [
|
||||
{
|
||||
"NoRecurse": "foo"
|
||||
},
|
||||
{
|
||||
"NoRecurse": "bar"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"serialized": {
|
||||
"uri": "/",
|
||||
"body": "Action=OperationName&Version=2014-01-01&RecursiveStruct.RecursiveList.member.1.NoRecurse=foo&RecursiveStruct.RecursiveList.member.2.NoRecurse=bar"
|
||||
}
|
||||
},
|
||||
{
|
||||
"given": {
|
||||
"input": {
|
||||
"shape": "InputShape"
|
||||
},
|
||||
"name": "OperationName"
|
||||
},
|
||||
"params": {
|
||||
"RecursiveStruct": {
|
||||
"RecursiveList": [
|
||||
{
|
||||
"NoRecurse": "foo"
|
||||
},
|
||||
{
|
||||
"RecursiveStruct": {
|
||||
"NoRecurse": "bar"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"serialized": {
|
||||
"uri": "/",
|
||||
"body": "Action=OperationName&Version=2014-01-01&RecursiveStruct.RecursiveList.member.1.NoRecurse=foo&RecursiveStruct.RecursiveList.member.2.RecursiveStruct.NoRecurse=bar"
|
||||
}
|
||||
},
|
||||
{
|
||||
"given": {
|
||||
"input": {
|
||||
"shape": "InputShape"
|
||||
},
|
||||
"name": "OperationName"
|
||||
},
|
||||
"params": {
|
||||
"RecursiveStruct": {
|
||||
"RecursiveMap": {
|
||||
"foo": {
|
||||
"NoRecurse": "foo"
|
||||
},
|
||||
"bar": {
|
||||
"NoRecurse": "bar"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"serialized": {
|
||||
"uri": "/",
|
||||
"body": "Action=OperationName&Version=2014-01-01&RecursiveStruct.RecursiveMap.entry.1.key=foo&RecursiveStruct.RecursiveMap.entry.1.value.NoRecurse=foo&RecursiveStruct.RecursiveMap.entry.2.key=bar&RecursiveStruct.RecursiveMap.entry.2.value.NoRecurse=bar"
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"description": "Idempotency token auto fill",
|
||||
"metadata": {
|
||||
"protocol": "query",
|
||||
"apiVersion": "2014-01-01"
|
||||
},
|
||||
"shapes": {
|
||||
"InputShape": {
|
||||
"type": "structure",
|
||||
"members": {
|
||||
"Token": {
|
||||
"shape": "StringType",
|
||||
"idempotencyToken": true
|
||||
}
|
||||
}
|
||||
},
|
||||
"StringType": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"cases": [
|
||||
{
|
||||
"given": {
|
||||
"input": {
|
||||
"shape": "InputShape"
|
||||
},
|
||||
"http": {
|
||||
"method": "POST"
|
||||
},
|
||||
"name": "OperationName"
|
||||
},
|
||||
"params": {
|
||||
"Token": "abc123"
|
||||
},
|
||||
"serialized": {
|
||||
"uri": "/",
|
||||
"headers": {},
|
||||
"body": "Action=OperationName&Version=2014-01-01&Token=abc123"
|
||||
}
|
||||
},
|
||||
{
|
||||
"given": {
|
||||
"input": {
|
||||
"shape": "InputShape"
|
||||
},
|
||||
"http": {
|
||||
"method": "POST"
|
||||
},
|
||||
"name": "OperationName"
|
||||
},
|
||||
"params": {
|
||||
},
|
||||
"serialized": {
|
||||
"uri": "/",
|
||||
"headers": {},
|
||||
"body": "Action=OperationName&Version=2014-01-01&Token=00000000-0000-4000-8000-000000000000"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
1366
vendor/github.com/aws/aws-sdk-go/models/protocol_tests/input/rest-json.json
generated
vendored
Normal file
1366
vendor/github.com/aws/aws-sdk-go/models/protocol_tests/input/rest-json.json
generated
vendored
Normal file
File diff suppressed because it is too large
Load diff
1696
vendor/github.com/aws/aws-sdk-go/models/protocol_tests/input/rest-xml.json
generated
vendored
Normal file
1696
vendor/github.com/aws/aws-sdk-go/models/protocol_tests/input/rest-xml.json
generated
vendored
Normal file
File diff suppressed because it is too large
Load diff
454
vendor/github.com/aws/aws-sdk-go/models/protocol_tests/output/ec2.json
generated
vendored
Normal file
454
vendor/github.com/aws/aws-sdk-go/models/protocol_tests/output/ec2.json
generated
vendored
Normal file
|
@ -0,0 +1,454 @@
|
|||
[
|
||||
{
|
||||
"description": "Scalar members",
|
||||
"metadata": {
|
||||
"protocol": "ec2"
|
||||
},
|
||||
"shapes": {
|
||||
"OutputShape": {
|
||||
"type": "structure",
|
||||
"members": {
|
||||
"Str": {
|
||||
"shape": "StringType"
|
||||
},
|
||||
"Num": {
|
||||
"shape": "IntegerType",
|
||||
"locationName": "FooNum"
|
||||
},
|
||||
"FalseBool": {
|
||||
"shape": "BooleanType"
|
||||
},
|
||||
"TrueBool": {
|
||||
"shape": "BooleanType"
|
||||
},
|
||||
"Float": {
|
||||
"shape": "FloatType"
|
||||
},
|
||||
"Double": {
|
||||
"shape": "DoubleType"
|
||||
},
|
||||
"Long": {
|
||||
"shape": "LongType"
|
||||
},
|
||||
"Char": {
|
||||
"shape": "CharType"
|
||||
}
|
||||
}
|
||||
},
|
||||
"StringType": {
|
||||
"type": "string"
|
||||
},
|
||||
"IntegerType": {
|
||||
"type": "integer"
|
||||
},
|
||||
"BooleanType": {
|
||||
"type": "boolean"
|
||||
},
|
||||
"FloatType": {
|
||||
"type": "float"
|
||||
},
|
||||
"DoubleType": {
|
||||
"type": "double"
|
||||
},
|
||||
"LongType": {
|
||||
"type": "long"
|
||||
},
|
||||
"CharType": {
|
||||
"type": "character"
|
||||
}
|
||||
},
|
||||
"cases": [
|
||||
{
|
||||
"given": {
|
||||
"output": {
|
||||
"shape": "OutputShape"
|
||||
},
|
||||
"name": "OperationName"
|
||||
},
|
||||
"result": {
|
||||
"Str": "myname",
|
||||
"Num": 123,
|
||||
"FalseBool": false,
|
||||
"TrueBool": true,
|
||||
"Float": 1.2,
|
||||
"Double": 1.3,
|
||||
"Long": 200,
|
||||
"Char": "a"
|
||||
},
|
||||
"response": {
|
||||
"status_code": 200,
|
||||
"headers": {},
|
||||
"body": "<OperationNameResponse><Str>myname</Str><FooNum>123</FooNum><FalseBool>false</FalseBool><TrueBool>true</TrueBool><Float>1.2</Float><Double>1.3</Double><Long>200</Long><Char>a</Char><RequestId>request-id</RequestId></OperationNameResponse>"
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"description": "Blob",
|
||||
"metadata": {
|
||||
"protocol": "ec2"
|
||||
},
|
||||
"shapes": {
|
||||
"OutputShape": {
|
||||
"type": "structure",
|
||||
"members": {
|
||||
"Blob": {
|
||||
"shape": "BlobType"
|
||||
}
|
||||
}
|
||||
},
|
||||
"BlobType": {
|
||||
"type": "blob"
|
||||
}
|
||||
},
|
||||
"cases": [
|
||||
{
|
||||
"given": {
|
||||
"output": {
|
||||
"shape": "OutputShape"
|
||||
},
|
||||
"name": "OperationName"
|
||||
},
|
||||
"result": {
|
||||
"Blob": "value"
|
||||
},
|
||||
"response": {
|
||||
"status_code": 200,
|
||||
"headers": {},
|
||||
"body": "<OperationNameResponse><Blob>dmFsdWU=</Blob><RequestId>requestid</RequestId></OperationNameResponse>"
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"description": "Lists",
|
||||
"metadata": {
|
||||
"protocol": "ec2"
|
||||
},
|
||||
"shapes": {
|
||||
"OutputShape": {
|
||||
"type": "structure",
|
||||
"members": {
|
||||
"ListMember": {
|
||||
"shape": "ListShape"
|
||||
}
|
||||
}
|
||||
},
|
||||
"ListShape": {
|
||||
"type": "list",
|
||||
"member": {
|
||||
"shape": "StringType"
|
||||
}
|
||||
},
|
||||
"StringType": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"cases": [
|
||||
{
|
||||
"given": {
|
||||
"output": {
|
||||
"shape": "OutputShape"
|
||||
},
|
||||
"name": "OperationName"
|
||||
},
|
||||
"result": {
|
||||
"ListMember": ["abc", "123"]
|
||||
},
|
||||
"response": {
|
||||
"status_code": 200,
|
||||
"headers": {},
|
||||
"body": "<OperationNameResponse><ListMember><member>abc</member><member>123</member></ListMember><RequestId>requestid</RequestId></OperationNameResponse>"
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"description": "List with custom member name",
|
||||
"metadata": {
|
||||
"protocol": "ec2"
|
||||
},
|
||||
"shapes": {
|
||||
"OutputShape": {
|
||||
"type": "structure",
|
||||
"members": {
|
||||
"ListMember": {
|
||||
"shape": "ListShape"
|
||||
}
|
||||
}
|
||||
},
|
||||
"ListShape": {
|
||||
"type": "list",
|
||||
"member": {
|
||||
"shape": "StringType",
|
||||
"locationName": "item"
|
||||
}
|
||||
},
|
||||
"StringType": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"cases": [
|
||||
{
|
||||
"given": {
|
||||
"output": {
|
||||
"shape": "OutputShape"
|
||||
},
|
||||
"name": "OperationName"
|
||||
},
|
||||
"result": {
|
||||
"ListMember": ["abc", "123"]
|
||||
},
|
||||
"response": {
|
||||
"status_code": 200,
|
||||
"headers": {},
|
||||
"body": "<OperationNameResponse><ListMember><item>abc</item><item>123</item></ListMember><RequestId>requestid</RequestId></OperationNameResponse>"
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"description": "Flattened List",
|
||||
"metadata": {
|
||||
"protocol": "ec2"
|
||||
},
|
||||
"shapes": {
|
||||
"OutputShape": {
|
||||
"type": "structure",
|
||||
"members": {
|
||||
"ListMember": {
|
||||
"shape": "ListType",
|
||||
"flattened": true
|
||||
}
|
||||
}
|
||||
},
|
||||
"ListType": {
|
||||
"type": "list",
|
||||
"member": {
|
||||
"shape": "StringType"
|
||||
}
|
||||
},
|
||||
"StringType": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"cases": [
|
||||
{
|
||||
"given": {
|
||||
"output": {
|
||||
"shape": "OutputShape"
|
||||
},
|
||||
"name": "OperationName"
|
||||
},
|
||||
"result": {
|
||||
"ListMember": ["abc", "123"]
|
||||
},
|
||||
"response": {
|
||||
"status_code": 200,
|
||||
"headers": {},
|
||||
"body": "<OperationNameResponse><ListMember>abc</ListMember><ListMember>123</ListMember><RequestId>requestid</RequestId></OperationNameResponse>"
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"description": "Normal map",
|
||||
"metadata": {
|
||||
"protocol": "ec2"
|
||||
},
|
||||
"shapes": {
|
||||
"OutputShape": {
|
||||
"type": "structure",
|
||||
"members": {
|
||||
"Map": {
|
||||
"shape": "MapType"
|
||||
}
|
||||
}
|
||||
},
|
||||
"MapType": {
|
||||
"type": "map",
|
||||
"key": {
|
||||
"shape": "StringType"
|
||||
},
|
||||
"value": {
|
||||
"shape": "StructureType"
|
||||
}
|
||||
},
|
||||
"StructureType": {
|
||||
"type": "structure",
|
||||
"members": {
|
||||
"foo": {
|
||||
"shape": "StringType"
|
||||
}
|
||||
}
|
||||
},
|
||||
"StringType": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"cases": [
|
||||
{
|
||||
"given": {
|
||||
"output": {
|
||||
"shape": "OutputShape"
|
||||
},
|
||||
"name": "OperationName"
|
||||
},
|
||||
"result": {
|
||||
"Map": {
|
||||
"qux": {
|
||||
"foo": "bar"
|
||||
},
|
||||
"baz": {
|
||||
"foo": "bam"
|
||||
}
|
||||
}
|
||||
},
|
||||
"response": {
|
||||
"status_code": 200,
|
||||
"headers": {},
|
||||
"body": "<OperationNameResponse><Map><entry><key>qux</key><value><foo>bar</foo></value></entry><entry><key>baz</key><value><foo>bam</foo></value></entry></Map><RequestId>requestid</RequestId></OperationNameResponse>"
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"description": "Flattened map",
|
||||
"metadata": {
|
||||
"protocol": "ec2"
|
||||
},
|
||||
"shapes": {
|
||||
"OutputShape": {
|
||||
"type": "structure",
|
||||
"members": {
|
||||
"Map": {
|
||||
"shape": "MapType",
|
||||
"flattened": true
|
||||
}
|
||||
}
|
||||
},
|
||||
"MapType": {
|
||||
"type": "map",
|
||||
"key": {
|
||||
"shape": "StringType"
|
||||
},
|
||||
"value": {
|
||||
"shape": "StringType"
|
||||
}
|
||||
},
|
||||
"StringType": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"cases": [
|
||||
{
|
||||
"given": {
|
||||
"output": {
|
||||
"shape": "OutputShape"
|
||||
},
|
||||
"name": "OperationName"
|
||||
},
|
||||
"result": {
|
||||
"Map": {
|
||||
"qux": "bar",
|
||||
"baz": "bam"
|
||||
}
|
||||
},
|
||||
"response": {
|
||||
"status_code": 200,
|
||||
"headers": {},
|
||||
"body": "<OperationNameResponse><Map><key>qux</key><value>bar</value></Map><Map><key>baz</key><value>bam</value></Map><RequestId>requestid</RequestId></OperationNameResponse>"
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"description": "Named map",
|
||||
"metadata": {
|
||||
"protocol": "ec2"
|
||||
},
|
||||
"shapes": {
|
||||
"OutputShape": {
|
||||
"type": "structure",
|
||||
"members": {
|
||||
"Map": {
|
||||
"shape": "MapType",
|
||||
"flattened": true
|
||||
}
|
||||
}
|
||||
},
|
||||
"MapType": {
|
||||
"type": "map",
|
||||
"key": {
|
||||
"shape": "StringType",
|
||||
"locationName": "foo"
|
||||
},
|
||||
"value": {
|
||||
"shape": "StringType",
|
||||
"locationName": "bar"
|
||||
}
|
||||
},
|
||||
"StringType": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"cases": [
|
||||
{
|
||||
"given": {
|
||||
"output": {
|
||||
"shape": "OutputShape"
|
||||
},
|
||||
"name": "OperationName"
|
||||
},
|
||||
"result": {
|
||||
"Map": {
|
||||
"qux": "bar",
|
||||
"baz": "bam"
|
||||
}
|
||||
},
|
||||
"response": {
|
||||
"status_code": 200,
|
||||
"headers": {},
|
||||
"body": "<OperationNameResponse><Map><foo>qux</foo><bar>bar</bar></Map><Map><foo>baz</foo><bar>bam</bar></Map><RequestId>requestid</RequestId></OperationNameResponse>"
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"description": "Empty string",
|
||||
"metadata": {
|
||||
"protocol": "ec2"
|
||||
},
|
||||
"shapes": {
|
||||
"OutputShape": {
|
||||
"type": "structure",
|
||||
"members": {
|
||||
"Foo": {
|
||||
"shape": "StringType"
|
||||
}
|
||||
}
|
||||
},
|
||||
"StringType": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"cases": [
|
||||
{
|
||||
"given": {
|
||||
"output": {
|
||||
"shape": "OutputShape"
|
||||
},
|
||||
"name": "OperationName"
|
||||
},
|
||||
"result": {
|
||||
"Foo": ""
|
||||
},
|
||||
"response": {
|
||||
"status_code": 200,
|
||||
"headers": {},
|
||||
"body": "<OperationNameResponse><Foo/><RequestId>requestid</RequestId></OperationNameResponse>"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
369
vendor/github.com/aws/aws-sdk-go/models/protocol_tests/output/json.json
generated
vendored
Normal file
369
vendor/github.com/aws/aws-sdk-go/models/protocol_tests/output/json.json
generated
vendored
Normal file
|
@ -0,0 +1,369 @@
|
|||
[
|
||||
{
|
||||
"description": "Scalar members",
|
||||
"metadata": {
|
||||
"protocol": "json"
|
||||
},
|
||||
"shapes": {
|
||||
"OutputShape": {
|
||||
"type": "structure",
|
||||
"members": {
|
||||
"Str": {
|
||||
"shape": "StringType"
|
||||
},
|
||||
"Num": {
|
||||
"shape": "IntegerType"
|
||||
},
|
||||
"FalseBool": {
|
||||
"shape": "BooleanType"
|
||||
},
|
||||
"TrueBool": {
|
||||
"shape": "BooleanType"
|
||||
},
|
||||
"Float": {
|
||||
"shape": "FloatType"
|
||||
},
|
||||
"Double": {
|
||||
"shape": "DoubleType"
|
||||
},
|
||||
"Long": {
|
||||
"shape": "LongType"
|
||||
},
|
||||
"Char": {
|
||||
"shape": "CharType"
|
||||
}
|
||||
}
|
||||
},
|
||||
"StringType": {
|
||||
"type": "string"
|
||||
},
|
||||
"IntegerType": {
|
||||
"type": "integer"
|
||||
},
|
||||
"BooleanType": {
|
||||
"type": "boolean"
|
||||
},
|
||||
"FloatType": {
|
||||
"type": "float"
|
||||
},
|
||||
"DoubleType": {
|
||||
"type": "double"
|
||||
},
|
||||
"LongType": {
|
||||
"type": "long"
|
||||
},
|
||||
"CharType": {
|
||||
"type": "character"
|
||||
}
|
||||
},
|
||||
"cases": [
|
||||
{
|
||||
"given": {
|
||||
"output": {
|
||||
"shape": "OutputShape"
|
||||
},
|
||||
"name": "OperationName"
|
||||
},
|
||||
"result": {
|
||||
"Str": "myname",
|
||||
"Num": 123,
|
||||
"FalseBool": false,
|
||||
"TrueBool": true,
|
||||
"Float": 1.2,
|
||||
"Double": 1.3,
|
||||
"Long": 200,
|
||||
"Char": "a"
|
||||
},
|
||||
"response": {
|
||||
"status_code": 200,
|
||||
"headers": {},
|
||||
"body": "{\"Str\": \"myname\", \"Num\": 123, \"FalseBool\": false, \"TrueBool\": true, \"Float\": 1.2, \"Double\": 1.3, \"Long\": 200, \"Char\": \"a\"}"
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"description": "Blob members",
|
||||
"metadata": {
|
||||
"protocol": "json"
|
||||
},
|
||||
"shapes": {
|
||||
"OutputShape": {
|
||||
"type": "structure",
|
||||
"members": {
|
||||
"BlobMember": {
|
||||
"shape": "BlobType"
|
||||
},
|
||||
"StructMember": {
|
||||
"shape": "BlobContainer"
|
||||
}
|
||||
}
|
||||
},
|
||||
"BlobType": {
|
||||
"type": "blob"
|
||||
},
|
||||
"BlobContainer": {
|
||||
"type": "structure",
|
||||
"members": {
|
||||
"foo": {
|
||||
"shape": "BlobType"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"cases": [
|
||||
{
|
||||
"given": {
|
||||
"output": {
|
||||
"shape": "OutputShape"
|
||||
},
|
||||
"name": "OperationName"
|
||||
},
|
||||
"result": {
|
||||
"BlobMember": "hi!",
|
||||
"StructMember": {
|
||||
"foo": "there!"
|
||||
}
|
||||
},
|
||||
"response": {
|
||||
"status_code": 200,
|
||||
"headers": {},
|
||||
"body": "{\"BlobMember\": \"aGkh\", \"StructMember\": {\"foo\": \"dGhlcmUh\"}}"
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"description": "Timestamp members",
|
||||
"metadata": {
|
||||
"protocol": "json"
|
||||
},
|
||||
"shapes": {
|
||||
"OutputShape": {
|
||||
"type": "structure",
|
||||
"members": {
|
||||
"TimeMember": {
|
||||
"shape": "TimeType"
|
||||
},
|
||||
"StructMember": {
|
||||
"shape": "TimeContainer"
|
||||
}
|
||||
}
|
||||
},
|
||||
"TimeType": {
|
||||
"type": "timestamp"
|
||||
},
|
||||
"TimeContainer": {
|
||||
"type": "structure",
|
||||
"members": {
|
||||
"foo": {
|
||||
"shape": "TimeType"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"cases": [
|
||||
{
|
||||
"given": {
|
||||
"output": {
|
||||
"shape": "OutputShape"
|
||||
},
|
||||
"name": "OperationName"
|
||||
},
|
||||
"result": {
|
||||
"TimeMember": 1398796238,
|
||||
"StructMember": {
|
||||
"foo": 1398796238
|
||||
}
|
||||
},
|
||||
"response": {
|
||||
"status_code": 200,
|
||||
"headers": {},
|
||||
"body": "{\"TimeMember\": 1398796238, \"StructMember\": {\"foo\": 1398796238}}"
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"description": "Lists",
|
||||
"metadata": {
|
||||
"protocol": "json"
|
||||
},
|
||||
"shapes": {
|
||||
"OutputShape": {
|
||||
"type": "structure",
|
||||
"members": {
|
||||
"ListMember": {
|
||||
"shape": "ListType"
|
||||
},
|
||||
"ListMemberMap": {
|
||||
"shape": "ListTypeMap"
|
||||
},
|
||||
"ListMemberStruct": {
|
||||
"shape": "ListTypeStruct"
|
||||
}
|
||||
}
|
||||
},
|
||||
"ListType": {
|
||||
"type": "list",
|
||||
"member": {
|
||||
"shape": "StringType"
|
||||
}
|
||||
},
|
||||
"ListTypeMap": {
|
||||
"type": "list",
|
||||
"member": {
|
||||
"shape": "MapType"
|
||||
}
|
||||
},
|
||||
"ListTypeStruct": {
|
||||
"type": "list",
|
||||
"member": {
|
||||
"shape": "StructType"
|
||||
}
|
||||
},
|
||||
"StringType": {
|
||||
"type": "string"
|
||||
},
|
||||
"StructType": {
|
||||
"type": "structure",
|
||||
"members": {
|
||||
}
|
||||
},
|
||||
"MapType": {
|
||||
"type": "map",
|
||||
"key": { "shape": "StringType" },
|
||||
"value": { "shape": "StringType" }
|
||||
}
|
||||
},
|
||||
"cases": [
|
||||
{
|
||||
"given": {
|
||||
"output": {
|
||||
"shape": "OutputShape"
|
||||
},
|
||||
"name": "OperationName"
|
||||
},
|
||||
"result": {
|
||||
"ListMember": ["a", "b"]
|
||||
},
|
||||
"response": {
|
||||
"status_code": 200,
|
||||
"headers": {},
|
||||
"body": "{\"ListMember\": [\"a\", \"b\"]}"
|
||||
}
|
||||
},
|
||||
{
|
||||
"given": {
|
||||
"output": {
|
||||
"shape": "OutputShape"
|
||||
},
|
||||
"name": "OperationName"
|
||||
},
|
||||
"result": {
|
||||
"ListMember": ["a", null],
|
||||
"ListMemberMap": [{}, null, null, {}],
|
||||
"ListMemberStruct": [{}, null, null, {}]
|
||||
},
|
||||
"response": {
|
||||
"status_code": 200,
|
||||
"headers": {},
|
||||
"body": "{\"ListMember\": [\"a\", null], \"ListMemberMap\": [{}, null, null, {}], \"ListMemberStruct\": [{}, null, null, {}]}"
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"description": "Maps",
|
||||
"metadata": {
|
||||
"protocol": "json"
|
||||
},
|
||||
"shapes": {
|
||||
"OutputShape": {
|
||||
"type": "structure",
|
||||
"members": {
|
||||
"MapMember": {
|
||||
"shape": "MapType"
|
||||
}
|
||||
}
|
||||
},
|
||||
"MapType": {
|
||||
"type": "map",
|
||||
"key": {
|
||||
"shape": "StringType"
|
||||
},
|
||||
"value": {
|
||||
"shape": "NumberList"
|
||||
}
|
||||
},
|
||||
"StringType": {
|
||||
"type": "string"
|
||||
},
|
||||
"NumberList": {
|
||||
"type": "list",
|
||||
"member": {
|
||||
"shape": "IntegerType"
|
||||
}
|
||||
},
|
||||
"IntegerType": {
|
||||
"type": "integer"
|
||||
}
|
||||
},
|
||||
"cases": [
|
||||
{
|
||||
"given": {
|
||||
"output": {
|
||||
"shape": "OutputShape"
|
||||
},
|
||||
"name": "OperationName"
|
||||
},
|
||||
"result": {
|
||||
"MapMember": {
|
||||
"a": [1, 2],
|
||||
"b": [3, 4]
|
||||
}
|
||||
},
|
||||
"response": {
|
||||
"status_code": 200,
|
||||
"headers": {},
|
||||
"body": "{\"MapMember\": {\"a\": [1, 2], \"b\": [3, 4]}}"
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"description": "Ignores extra data",
|
||||
"metadata": {
|
||||
"protocol": "json"
|
||||
},
|
||||
"shapes": {
|
||||
"OutputShape": {
|
||||
"type": "structure",
|
||||
"members": {
|
||||
"StrType": {
|
||||
"shape": "StrType"
|
||||
}
|
||||
}
|
||||
},
|
||||
"StrType": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"cases": [
|
||||
{
|
||||
"given": {
|
||||
"output": {
|
||||
"shape": "OutputShape"
|
||||
},
|
||||
"name": "OperationName"
|
||||
},
|
||||
"result": {},
|
||||
"response": {
|
||||
"status_code": 200,
|
||||
"headers": {},
|
||||
"body": "{\"foo\": \"bar\"}"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
776
vendor/github.com/aws/aws-sdk-go/models/protocol_tests/output/query.json
generated
vendored
Normal file
776
vendor/github.com/aws/aws-sdk-go/models/protocol_tests/output/query.json
generated
vendored
Normal file
|
@ -0,0 +1,776 @@
|
|||
[
|
||||
{
|
||||
"description": "Scalar members",
|
||||
"metadata": {
|
||||
"protocol": "query"
|
||||
},
|
||||
"shapes": {
|
||||
"OutputShape": {
|
||||
"type": "structure",
|
||||
"members": {
|
||||
"Str": {
|
||||
"shape": "StringType"
|
||||
},
|
||||
"Num": {
|
||||
"shape": "IntegerType",
|
||||
"locationName": "FooNum"
|
||||
},
|
||||
"FalseBool": {
|
||||
"shape": "BooleanType"
|
||||
},
|
||||
"TrueBool": {
|
||||
"shape": "BooleanType"
|
||||
},
|
||||
"Float": {
|
||||
"shape": "FloatType"
|
||||
},
|
||||
"Double": {
|
||||
"shape": "DoubleType"
|
||||
},
|
||||
"Long": {
|
||||
"shape": "LongType"
|
||||
},
|
||||
"Char": {
|
||||
"shape": "CharType"
|
||||
},
|
||||
"Timestamp": {
|
||||
"shape": "TimestampType"
|
||||
}
|
||||
}
|
||||
},
|
||||
"StringType": {
|
||||
"type": "string"
|
||||
},
|
||||
"IntegerType": {
|
||||
"type": "integer"
|
||||
},
|
||||
"BooleanType": {
|
||||
"type": "boolean"
|
||||
},
|
||||
"FloatType": {
|
||||
"type": "float"
|
||||
},
|
||||
"DoubleType": {
|
||||
"type": "double"
|
||||
},
|
||||
"LongType": {
|
||||
"type": "long"
|
||||
},
|
||||
"CharType": {
|
||||
"type": "character"
|
||||
},
|
||||
"TimestampType": {
|
||||
"type": "timestamp"
|
||||
}
|
||||
},
|
||||
"cases": [
|
||||
{
|
||||
"given": {
|
||||
"output": {
|
||||
"resultWrapper": "OperationNameResult",
|
||||
"shape": "OutputShape"
|
||||
},
|
||||
"name": "OperationName"
|
||||
},
|
||||
"result": {
|
||||
"Str": "myname",
|
||||
"Num": 123,
|
||||
"FalseBool": false,
|
||||
"TrueBool": true,
|
||||
"Float": 1.2,
|
||||
"Double": 1.3,
|
||||
"Long": 200,
|
||||
"Char": "a",
|
||||
"Timestamp": 1422172800
|
||||
},
|
||||
"response": {
|
||||
"status_code": 200,
|
||||
"headers": {},
|
||||
"body": "<OperationNameResponse><OperationNameResult><Str>myname</Str><FooNum>123</FooNum><FalseBool>false</FalseBool><TrueBool>true</TrueBool><Float>1.2</Float><Double>1.3</Double><Long>200</Long><Char>a</Char><Timestamp>2015-01-25T08:00:00Z</Timestamp></OperationNameResult><ResponseMetadata><RequestId>request-id</RequestId></ResponseMetadata></OperationNameResponse>"
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"description": "Not all members in response",
|
||||
"metadata": {
|
||||
"protocol": "query"
|
||||
},
|
||||
"shapes": {
|
||||
"OutputShape": {
|
||||
"type": "structure",
|
||||
"members": {
|
||||
"Str": {
|
||||
"shape": "StringType"
|
||||
},
|
||||
"Num": {
|
||||
"shape": "IntegerType"
|
||||
}
|
||||
}
|
||||
},
|
||||
"StringType": {
|
||||
"type": "string"
|
||||
},
|
||||
"IntegerType": {
|
||||
"type": "integer"
|
||||
}
|
||||
},
|
||||
"cases": [
|
||||
{
|
||||
"given": {
|
||||
"output": {
|
||||
"resultWrapper": "OperationNameResult",
|
||||
"shape": "OutputShape"
|
||||
},
|
||||
"name": "OperationName"
|
||||
},
|
||||
"result": {
|
||||
"Str": "myname"
|
||||
},
|
||||
"response": {
|
||||
"status_code": 200,
|
||||
"headers": {},
|
||||
"body": "<OperationNameResponse><OperationNameResult><Str>myname</Str></OperationNameResult><ResponseMetadata><RequestId>request-id</RequestId></ResponseMetadata></OperationNameResponse>"
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"description": "Blob",
|
||||
"metadata": {
|
||||
"protocol": "query"
|
||||
},
|
||||
"shapes": {
|
||||
"OutputShape": {
|
||||
"type": "structure",
|
||||
"members": {
|
||||
"Blob": {
|
||||
"shape": "BlobType"
|
||||
}
|
||||
}
|
||||
},
|
||||
"BlobType": {
|
||||
"type": "blob"
|
||||
}
|
||||
},
|
||||
"cases": [
|
||||
{
|
||||
"given": {
|
||||
"output": {
|
||||
"resultWrapper": "OperationNameResult",
|
||||
"shape": "OutputShape"
|
||||
},
|
||||
"name": "OperationName"
|
||||
},
|
||||
"result": {
|
||||
"Blob": "value"
|
||||
},
|
||||
"response": {
|
||||
"status_code": 200,
|
||||
"headers": {},
|
||||
"body": "<OperationNameResponse><OperationNameResult><Blob>dmFsdWU=</Blob></OperationNameResult><ResponseMetadata><RequestId>requestid</RequestId></ResponseMetadata></OperationNameResponse>"
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"description": "Lists",
|
||||
"metadata": {
|
||||
"protocol": "query"
|
||||
},
|
||||
"shapes": {
|
||||
"OutputShape": {
|
||||
"type": "structure",
|
||||
"members": {
|
||||
"ListMember": {
|
||||
"shape": "ListShape"
|
||||
}
|
||||
}
|
||||
},
|
||||
"ListShape": {
|
||||
"type": "list",
|
||||
"member": {
|
||||
"shape": "StringType"
|
||||
}
|
||||
},
|
||||
"StringType": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"cases": [
|
||||
{
|
||||
"given": {
|
||||
"output": {
|
||||
"resultWrapper": "OperationNameResult",
|
||||
"shape": "OutputShape"
|
||||
},
|
||||
"name": "OperationName"
|
||||
},
|
||||
"result": {
|
||||
"ListMember": ["abc", "123"]
|
||||
},
|
||||
"response": {
|
||||
"status_code": 200,
|
||||
"headers": {},
|
||||
"body": "<OperationNameResponse><OperationNameResult><ListMember><member>abc</member><member>123</member></ListMember></OperationNameResult><ResponseMetadata><RequestId>requestid</RequestId></ResponseMetadata></OperationNameResponse>"
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"description": "List with custom member name",
|
||||
"metadata": {
|
||||
"protocol": "query"
|
||||
},
|
||||
"shapes": {
|
||||
"OutputShape": {
|
||||
"type": "structure",
|
||||
"members": {
|
||||
"ListMember": {
|
||||
"shape": "ListShape"
|
||||
}
|
||||
}
|
||||
},
|
||||
"ListShape": {
|
||||
"type": "list",
|
||||
"member": {
|
||||
"shape": "StringType",
|
||||
"locationName": "item"
|
||||
}
|
||||
},
|
||||
"StringType": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"cases": [
|
||||
{
|
||||
"given": {
|
||||
"output": {
|
||||
"resultWrapper": "OperationNameResult",
|
||||
"shape": "OutputShape"
|
||||
},
|
||||
"name": "OperationName"
|
||||
},
|
||||
"result": {
|
||||
"ListMember": ["abc", "123"]
|
||||
},
|
||||
"response": {
|
||||
"status_code": 200,
|
||||
"headers": {},
|
||||
"body": "<OperationNameResponse><OperationNameResult><ListMember><item>abc</item><item>123</item></ListMember></OperationNameResult><ResponseMetadata><RequestId>requestid</RequestId></ResponseMetadata></OperationNameResponse>"
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"description": "Flattened List",
|
||||
"metadata": {
|
||||
"protocol": "query"
|
||||
},
|
||||
"shapes": {
|
||||
"OutputShape": {
|
||||
"type": "structure",
|
||||
"members": {
|
||||
"ListMember": {
|
||||
"shape": "ListType"
|
||||
}
|
||||
}
|
||||
},
|
||||
"ListType": {
|
||||
"type": "list",
|
||||
"flattened": true,
|
||||
"member": {
|
||||
"shape": "StringType"
|
||||
}
|
||||
},
|
||||
"StringType": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"cases": [
|
||||
{
|
||||
"given": {
|
||||
"output": {
|
||||
"resultWrapper": "OperationNameResult",
|
||||
"shape": "OutputShape"
|
||||
},
|
||||
"name": "OperationName"
|
||||
},
|
||||
"result": {
|
||||
"ListMember": ["abc", "123"]
|
||||
},
|
||||
"response": {
|
||||
"status_code": 200,
|
||||
"headers": {},
|
||||
"body": "<OperationNameResponse><OperationNameResult><ListMember>abc</ListMember><ListMember>123</ListMember></OperationNameResult><ResponseMetadata><RequestId>requestid</RequestId></ResponseMetadata></OperationNameResponse>"
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"description": "Flattened single element list",
|
||||
"metadata": {
|
||||
"protocol": "query"
|
||||
},
|
||||
"shapes": {
|
||||
"OutputShape": {
|
||||
"type": "structure",
|
||||
"members": {
|
||||
"ListMember": {
|
||||
"shape": "ListType"
|
||||
}
|
||||
}
|
||||
},
|
||||
"ListType": {
|
||||
"type": "list",
|
||||
"flattened": true,
|
||||
"member": {
|
||||
"shape": "StringType"
|
||||
}
|
||||
},
|
||||
"StringType": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"cases": [
|
||||
{
|
||||
"given": {
|
||||
"output": {
|
||||
"resultWrapper": "OperationNameResult",
|
||||
"shape": "OutputShape"
|
||||
},
|
||||
"name": "OperationName"
|
||||
},
|
||||
"result": {
|
||||
"ListMember": ["abc"]
|
||||
},
|
||||
"response": {
|
||||
"status_code": 200,
|
||||
"headers": {},
|
||||
"body": "<OperationNameResponse><OperationNameResult><ListMember>abc</ListMember></OperationNameResult><ResponseMetadata><RequestId>requestid</RequestId></ResponseMetadata></OperationNameResponse>"
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"description": "List of structures",
|
||||
"metadata": {
|
||||
"protocol": "query"
|
||||
},
|
||||
"shapes": {
|
||||
"OutputShape": {
|
||||
"type": "structure",
|
||||
"members": {
|
||||
"List": {
|
||||
"shape": "ListOfStructs"
|
||||
}
|
||||
}
|
||||
},
|
||||
"ListOfStructs": {
|
||||
"type": "list",
|
||||
"member": {
|
||||
"shape": "StructureShape"
|
||||
}
|
||||
},
|
||||
"StructureShape": {
|
||||
"type": "structure",
|
||||
"members": {
|
||||
"Foo": {
|
||||
"shape": "StringShape"
|
||||
},
|
||||
"Bar": {
|
||||
"shape": "StringShape"
|
||||
},
|
||||
"Baz": {
|
||||
"shape": "StringShape"
|
||||
}
|
||||
}
|
||||
},
|
||||
"StringShape": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"cases": [
|
||||
{
|
||||
"given": {
|
||||
"output": {
|
||||
"resultWrapper": "OperationNameResult",
|
||||
"shape": "OutputShape"
|
||||
},
|
||||
"name": "OperationName"
|
||||
},
|
||||
"result": {
|
||||
"List": [{"Foo": "firstfoo", "Bar": "firstbar", "Baz": "firstbaz"}, {"Foo": "secondfoo", "Bar": "secondbar", "Baz": "secondbaz"}]
|
||||
},
|
||||
"response": {
|
||||
"status_code": 200,
|
||||
"headers": {},
|
||||
"body": "<OperationNameResponse xmlns=\"https://service.amazonaws.com/doc/2010-05-08/\"><OperationNameResult><List><member><Foo>firstfoo</Foo><Bar>firstbar</Bar><Baz>firstbaz</Baz></member><member><Foo>secondfoo</Foo><Bar>secondbar</Bar><Baz>secondbaz</Baz></member></List></OperationNameResult><ResponseMetadata><RequestId>requestid</RequestId></ResponseMetadata></OperationNameResponse>"
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"description": "Flattened list of structures",
|
||||
"metadata": {
|
||||
"protocol": "query"
|
||||
},
|
||||
"shapes": {
|
||||
"OutputShape": {
|
||||
"type": "structure",
|
||||
"resultWrapper": "OperationNameResult",
|
||||
"members": {
|
||||
"List": {
|
||||
"shape": "ListOfStructs"
|
||||
}
|
||||
}
|
||||
},
|
||||
"ListOfStructs": {
|
||||
"type": "list",
|
||||
"flattened": true,
|
||||
"member": {
|
||||
"shape": "StructureShape"
|
||||
}
|
||||
},
|
||||
"StructureShape": {
|
||||
"type": "structure",
|
||||
"members": {
|
||||
"Foo": {
|
||||
"shape": "StringShape"
|
||||
},
|
||||
"Bar": {
|
||||
"shape": "StringShape"
|
||||
},
|
||||
"Baz": {
|
||||
"shape": "StringShape"
|
||||
}
|
||||
}
|
||||
},
|
||||
"StringShape": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"cases": [
|
||||
{
|
||||
"given": {
|
||||
"output": {
|
||||
"shape": "OutputShape"
|
||||
},
|
||||
"name": "OperationName"
|
||||
},
|
||||
"result": {
|
||||
"List": [{"Foo": "firstfoo", "Bar": "firstbar", "Baz": "firstbaz"}, {"Foo": "secondfoo", "Bar": "secondbar", "Baz": "secondbaz"}]
|
||||
},
|
||||
"response": {
|
||||
"status_code": 200,
|
||||
"headers": {},
|
||||
"body": "<OperationNameResponse xmlns=\"https://service.amazonaws.com/doc/2010-05-08/\"><OperationNameResult><List><Foo>firstfoo</Foo><Bar>firstbar</Bar><Baz>firstbaz</Baz></List><List><Foo>secondfoo</Foo><Bar>secondbar</Bar><Baz>secondbaz</Baz></List></OperationNameResult><ResponseMetadata><RequestId>requestid</RequestId></ResponseMetadata></OperationNameResponse>"
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"description": "Flattened list with location name",
|
||||
"metadata": {
|
||||
"protocol": "query"
|
||||
},
|
||||
"shapes": {
|
||||
"OutputShape": {
|
||||
"type": "structure",
|
||||
"members": {
|
||||
"List": {
|
||||
"shape": "ListType"
|
||||
}
|
||||
}
|
||||
},
|
||||
"ListType": {
|
||||
"type": "list",
|
||||
"flattened": true,
|
||||
"member": {
|
||||
"shape": "StringShape",
|
||||
"locationName": "NamedList"
|
||||
}
|
||||
},
|
||||
"StringShape": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"cases": [
|
||||
{
|
||||
"given": {
|
||||
"output": {
|
||||
"resultWrapper": "OperationNameResult",
|
||||
"shape": "OutputShape"
|
||||
},
|
||||
"name": "OperationName"
|
||||
},
|
||||
"result": {
|
||||
"List": ["a", "b"]
|
||||
},
|
||||
"response": {
|
||||
"status_code": 200,
|
||||
"headers": {},
|
||||
"body": "<OperationNameResponse xmlns=\"https://service.amazonaws.com/doc/2010-05-08/\"><OperationNameResult><NamedList>a</NamedList><NamedList>b</NamedList></OperationNameResult><ResponseMetadata><RequestId>requestid</RequestId></ResponseMetadata></OperationNameResponse>"
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"description": "Normal map",
|
||||
"metadata": {
|
||||
"protocol": "query"
|
||||
},
|
||||
"shapes": {
|
||||
"OutputShape": {
|
||||
"type": "structure",
|
||||
"members": {
|
||||
"Map": {
|
||||
"shape": "StringMap"
|
||||
}
|
||||
}
|
||||
},
|
||||
"StringMap": {
|
||||
"type": "map",
|
||||
"key": {
|
||||
"shape": "StringType"
|
||||
},
|
||||
"value": {
|
||||
"shape": "StructType"
|
||||
}
|
||||
},
|
||||
"StringType": {
|
||||
"type": "string"
|
||||
},
|
||||
"StructType": {
|
||||
"type": "structure",
|
||||
"members": {
|
||||
"foo": {
|
||||
"shape": "StringType"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"cases": [
|
||||
{
|
||||
"given": {
|
||||
"output": {
|
||||
"resultWrapper": "OperationNameResult",
|
||||
"shape": "OutputShape"
|
||||
},
|
||||
"name": "OperationName"
|
||||
},
|
||||
"result": {
|
||||
"Map": {
|
||||
"qux": {
|
||||
"foo": "bar"
|
||||
},
|
||||
"baz": {
|
||||
"foo": "bam"
|
||||
}
|
||||
}
|
||||
},
|
||||
"response": {
|
||||
"status_code": 200,
|
||||
"headers": {},
|
||||
"body": "<OperationNameResponse xmlns=\"https://service.amazonaws.com/doc/2010-05-08\"><OperationNameResult><Map><entry><key>qux</key><value><foo>bar</foo></value></entry><entry><key>baz</key><value><foo>bam</foo></value></entry></Map></OperationNameResult><ResponseMetadata><RequestId>requestid</RequestId></ResponseMetadata></OperationNameResponse>"
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"description": "Flattened map",
|
||||
"metadata": {
|
||||
"protocol": "query"
|
||||
},
|
||||
"shapes": {
|
||||
"OutputShape": {
|
||||
"type": "structure",
|
||||
"members": {
|
||||
"Map": {
|
||||
"shape": "StringMap",
|
||||
"flattened": true
|
||||
}
|
||||
}
|
||||
},
|
||||
"StringMap": {
|
||||
"type": "map",
|
||||
"key": {
|
||||
"shape": "StringType"
|
||||
},
|
||||
"value": {
|
||||
"shape": "StringType"
|
||||
}
|
||||
},
|
||||
"StringType": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"cases": [
|
||||
{
|
||||
"given": {
|
||||
"output": {
|
||||
"resultWrapper": "OperationNameResult",
|
||||
"shape": "OutputShape"
|
||||
},
|
||||
"name": "OperationName"
|
||||
},
|
||||
"result": {
|
||||
"Map": {
|
||||
"qux": "bar",
|
||||
"baz": "bam"
|
||||
}
|
||||
},
|
||||
"response": {
|
||||
"status_code": 200,
|
||||
"headers": {},
|
||||
"body": "<OperationNameResponse><OperationNameResult><Map><key>qux</key><value>bar</value></Map><Map><key>baz</key><value>bam</value></Map></OperationNameResult><ResponseMetadata><RequestId>requestid</RequestId></ResponseMetadata></OperationNameResponse>"
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"description": "Flattened map in shape definition",
|
||||
"metadata": {
|
||||
"protocol": "query"
|
||||
},
|
||||
"shapes": {
|
||||
"OutputShape": {
|
||||
"type": "structure",
|
||||
"members": {
|
||||
"Map": {
|
||||
"shape": "StringMap",
|
||||
"locationName": "Attribute"
|
||||
}
|
||||
}
|
||||
},
|
||||
"StringMap": {
|
||||
"type": "map",
|
||||
"key": {
|
||||
"shape": "StringType",
|
||||
"locationName": "Name"
|
||||
},
|
||||
"value": {
|
||||
"shape": "StringType",
|
||||
"locationName": "Value"
|
||||
},
|
||||
"flattened": true,
|
||||
"locationName": "Attribute"
|
||||
},
|
||||
"StringType": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"cases": [
|
||||
{
|
||||
"given": {
|
||||
"output": {
|
||||
"resultWrapper": "OperationNameResult",
|
||||
"shape": "OutputShape"
|
||||
},
|
||||
"name": "OperationName"
|
||||
},
|
||||
"result": {
|
||||
"Map": {
|
||||
"qux": "bar"
|
||||
}
|
||||
},
|
||||
"response": {
|
||||
"status_code": 200,
|
||||
"headers": {},
|
||||
"body": "<OperationNameResponse><OperationNameResult><Attribute><Name>qux</Name><Value>bar</Value></Attribute></OperationNameResult><ResponseMetadata><RequestId>requestid</RequestId></ResponseMetadata></OperationNameResponse>"
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"description": "Named map",
|
||||
"metadata": {
|
||||
"protocol": "query"
|
||||
},
|
||||
"shapes": {
|
||||
"OutputShape": {
|
||||
"type": "structure",
|
||||
"members": {
|
||||
"Map": {
|
||||
"shape": "MapType"
|
||||
}
|
||||
}
|
||||
},
|
||||
"MapType": {
|
||||
"type": "map",
|
||||
"flattened": true,
|
||||
"key": {
|
||||
"locationName": "foo",
|
||||
"shape": "StringType"
|
||||
},
|
||||
"value": {
|
||||
"locationName": "bar",
|
||||
"shape": "StringType"
|
||||
}
|
||||
},
|
||||
"StringType": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"cases": [
|
||||
{
|
||||
"given": {
|
||||
"output": {
|
||||
"resultWrapper": "OperationNameResult",
|
||||
"shape": "OutputShape"
|
||||
},
|
||||
"name": "OperationName"
|
||||
},
|
||||
"result": {
|
||||
"Map": {
|
||||
"qux": "bar",
|
||||
"baz": "bam"
|
||||
}
|
||||
},
|
||||
"response": {
|
||||
"status_code": 200,
|
||||
"headers": {},
|
||||
"body": "<OperationNameResponse><OperationNameResult><Map><foo>qux</foo><bar>bar</bar></Map><Map><foo>baz</foo><bar>bam</bar></Map></OperationNameResult><ResponseMetadata><RequestId>requestid</RequestId></ResponseMetadata></OperationNameResponse>"
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"description": "Empty string",
|
||||
"metadata": {
|
||||
"protocol": "query"
|
||||
},
|
||||
"shapes": {
|
||||
"OutputShape": {
|
||||
"type": "structure",
|
||||
"members": {
|
||||
"Foo": {
|
||||
"shape": "StringType"
|
||||
}
|
||||
}
|
||||
},
|
||||
"StringType": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"cases": [
|
||||
{
|
||||
"given": {
|
||||
"output": {
|
||||
"resultWrapper": "OperationNameResult",
|
||||
"shape": "OutputShape"
|
||||
},
|
||||
"name": "OperationName"
|
||||
},
|
||||
"result": {
|
||||
"Foo": ""
|
||||
},
|
||||
"response": {
|
||||
"status_code": 200,
|
||||
"headers": {},
|
||||
"body": "<OperationNameResponse><OperationNameResult><Foo/></OperationNameResult><ResponseMetadata><RequestId>requestid</RequestId></ResponseMetadata></OperationNameResponse>"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
648
vendor/github.com/aws/aws-sdk-go/models/protocol_tests/output/rest-json.json
generated
vendored
Normal file
648
vendor/github.com/aws/aws-sdk-go/models/protocol_tests/output/rest-json.json
generated
vendored
Normal file
|
@ -0,0 +1,648 @@
|
|||
[
|
||||
{
|
||||
"description": "Scalar members",
|
||||
"metadata": {
|
||||
"protocol": "rest-json"
|
||||
},
|
||||
"shapes": {
|
||||
"OutputShape": {
|
||||
"type": "structure",
|
||||
"members": {
|
||||
"ImaHeader": {
|
||||
"shape": "HeaderShape"
|
||||
},
|
||||
"ImaHeaderLocation": {
|
||||
"shape": "HeaderShape",
|
||||
"locationName": "X-Foo"
|
||||
},
|
||||
"Status": {
|
||||
"shape": "StatusShape",
|
||||
"location": "statusCode"
|
||||
},
|
||||
"Str": {
|
||||
"shape": "StringType"
|
||||
},
|
||||
"Num": {
|
||||
"shape": "IntegerType"
|
||||
},
|
||||
"FalseBool": {
|
||||
"shape": "BooleanType"
|
||||
},
|
||||
"TrueBool": {
|
||||
"shape": "BooleanType"
|
||||
},
|
||||
"Float": {
|
||||
"shape": "FloatType"
|
||||
},
|
||||
"Double": {
|
||||
"shape": "DoubleType"
|
||||
},
|
||||
"Long": {
|
||||
"shape": "LongType"
|
||||
},
|
||||
"Char": {
|
||||
"shape": "CharType"
|
||||
}
|
||||
}
|
||||
},
|
||||
"HeaderShape": {
|
||||
"type": "string",
|
||||
"location": "header"
|
||||
},
|
||||
"StatusShape": {
|
||||
"type": "integer"
|
||||
},
|
||||
"StringType": {
|
||||
"type": "string"
|
||||
},
|
||||
"IntegerType": {
|
||||
"type": "integer"
|
||||
},
|
||||
"BooleanType": {
|
||||
"type": "boolean"
|
||||
},
|
||||
"FloatType": {
|
||||
"type": "float"
|
||||
},
|
||||
"DoubleType": {
|
||||
"type": "double"
|
||||
},
|
||||
"LongType": {
|
||||
"type": "long"
|
||||
},
|
||||
"CharType": {
|
||||
"type": "character"
|
||||
}
|
||||
},
|
||||
"cases": [
|
||||
{
|
||||
"given": {
|
||||
"output": {
|
||||
"shape": "OutputShape"
|
||||
},
|
||||
"name": "OperationName"
|
||||
},
|
||||
"result": {
|
||||
"ImaHeader": "test",
|
||||
"ImaHeaderLocation": "abc",
|
||||
"Status": 200,
|
||||
"Str": "myname",
|
||||
"Num": 123,
|
||||
"FalseBool": false,
|
||||
"TrueBool": true,
|
||||
"Float": 1.2,
|
||||
"Double": 1.3,
|
||||
"Long": 200,
|
||||
"Char": "a"
|
||||
},
|
||||
"response": {
|
||||
"status_code": 200,
|
||||
"headers": {
|
||||
"ImaHeader": "test",
|
||||
"X-Foo": "abc"
|
||||
},
|
||||
"body": "{\"Str\": \"myname\", \"Num\": 123, \"FalseBool\": false, \"TrueBool\": true, \"Float\": 1.2, \"Double\": 1.3, \"Long\": 200, \"Char\": \"a\"}"
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"description": "Blob members",
|
||||
"metadata": {
|
||||
"protocol": "rest-json"
|
||||
},
|
||||
"shapes": {
|
||||
"OutputShape": {
|
||||
"type": "structure",
|
||||
"members": {
|
||||
"BlobMember": {
|
||||
"shape": "BlobType"
|
||||
},
|
||||
"StructMember": {
|
||||
"shape": "BlobContainer"
|
||||
}
|
||||
}
|
||||
},
|
||||
"BlobType": {
|
||||
"type": "blob"
|
||||
},
|
||||
"BlobContainer": {
|
||||
"type": "structure",
|
||||
"members": {
|
||||
"foo": {
|
||||
"shape": "BlobType"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"cases": [
|
||||
{
|
||||
"given": {
|
||||
"output": {
|
||||
"shape": "OutputShape"
|
||||
},
|
||||
"name": "OperationName"
|
||||
},
|
||||
"result": {
|
||||
"BlobMember": "hi!",
|
||||
"StructMember": {
|
||||
"foo": "there!"
|
||||
}
|
||||
},
|
||||
"response": {
|
||||
"status_code": 200,
|
||||
"headers": {},
|
||||
"body": "{\"BlobMember\": \"aGkh\", \"StructMember\": {\"foo\": \"dGhlcmUh\"}}"
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"description": "Timestamp members",
|
||||
"metadata": {
|
||||
"protocol": "rest-json"
|
||||
},
|
||||
"shapes": {
|
||||
"OutputShape": {
|
||||
"type": "structure",
|
||||
"members": {
|
||||
"TimeMember": {
|
||||
"shape": "TimeType"
|
||||
},
|
||||
"StructMember": {
|
||||
"shape": "TimeContainer"
|
||||
}
|
||||
}
|
||||
},
|
||||
"TimeType": {
|
||||
"type": "timestamp"
|
||||
},
|
||||
"TimeContainer": {
|
||||
"type": "structure",
|
||||
"members": {
|
||||
"foo": {
|
||||
"shape": "TimeType"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"cases": [
|
||||
{
|
||||
"given": {
|
||||
"output": {
|
||||
"shape": "OutputShape"
|
||||
},
|
||||
"name": "OperationName"
|
||||
},
|
||||
"result": {
|
||||
"TimeMember": 1398796238,
|
||||
"StructMember": {
|
||||
"foo": 1398796238
|
||||
}
|
||||
},
|
||||
"response": {
|
||||
"status_code": 200,
|
||||
"headers": {},
|
||||
"body": "{\"TimeMember\": 1398796238, \"StructMember\": {\"foo\": 1398796238}}"
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"description": "Lists",
|
||||
"metadata": {
|
||||
"protocol": "rest-json"
|
||||
},
|
||||
"shapes": {
|
||||
"OutputShape": {
|
||||
"type": "structure",
|
||||
"members": {
|
||||
"ListMember": {
|
||||
"shape": "ListType"
|
||||
}
|
||||
}
|
||||
},
|
||||
"ListType": {
|
||||
"type": "list",
|
||||
"member": {
|
||||
"shape": "StringType"
|
||||
}
|
||||
},
|
||||
"StringType": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"cases": [
|
||||
{
|
||||
"given": {
|
||||
"output": {
|
||||
"shape": "OutputShape"
|
||||
},
|
||||
"name": "OperationName"
|
||||
},
|
||||
"result": {
|
||||
"ListMember": ["a", "b"]
|
||||
},
|
||||
"response": {
|
||||
"status_code": 200,
|
||||
"headers": {},
|
||||
"body": "{\"ListMember\": [\"a\", \"b\"]}"
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"description": "Lists with structure member",
|
||||
"metadata": {
|
||||
"protocol": "rest-json"
|
||||
},
|
||||
"shapes": {
|
||||
"OutputShape": {
|
||||
"type": "structure",
|
||||
"members": {
|
||||
"ListMember": {
|
||||
"shape": "ListType"
|
||||
}
|
||||
}
|
||||
},
|
||||
"ListType": {
|
||||
"type": "list",
|
||||
"member": {
|
||||
"shape": "SingleStruct"
|
||||
}
|
||||
},
|
||||
"StringType": {
|
||||
"type": "string"
|
||||
},
|
||||
"SingleStruct": {
|
||||
"type": "structure",
|
||||
"members": {
|
||||
"Foo": {
|
||||
"shape": "StringType"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"cases": [
|
||||
{
|
||||
"given": {
|
||||
"output": {
|
||||
"shape": "OutputShape"
|
||||
},
|
||||
"name": "OperationName"
|
||||
},
|
||||
"result": {
|
||||
"ListMember": [{"Foo": "a"}, {"Foo": "b"}]
|
||||
},
|
||||
"response": {
|
||||
"status_code": 200,
|
||||
"headers": {},
|
||||
"body": "{\"ListMember\": [{\"Foo\": \"a\"}, {\"Foo\": \"b\"}]}"
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"description": "Maps",
|
||||
"metadata": {
|
||||
"protocol": "rest-json"
|
||||
},
|
||||
"shapes": {
|
||||
"OutputShape": {
|
||||
"type": "structure",
|
||||
"members": {
|
||||
"MapMember": {
|
||||
"shape": "MapType"
|
||||
}
|
||||
}
|
||||
},
|
||||
"MapType": {
|
||||
"type": "map",
|
||||
"key": {
|
||||
"shape": "StringType"
|
||||
},
|
||||
"value": {
|
||||
"shape": "ListType"
|
||||
}
|
||||
},
|
||||
"ListType": {
|
||||
"type": "list",
|
||||
"member": {
|
||||
"shape": "IntegerType"
|
||||
}
|
||||
},
|
||||
"StringType": {
|
||||
"type": "string"
|
||||
},
|
||||
"IntegerType": {
|
||||
"type": "integer"
|
||||
}
|
||||
},
|
||||
"cases": [
|
||||
{
|
||||
"given": {
|
||||
"output": {
|
||||
"shape": "OutputShape"
|
||||
},
|
||||
"name": "OperationName"
|
||||
},
|
||||
"result": {
|
||||
"MapMember": {
|
||||
"a": [1, 2],
|
||||
"b": [3, 4]
|
||||
}
|
||||
},
|
||||
"response": {
|
||||
"status_code": 200,
|
||||
"headers": {},
|
||||
"body": "{\"MapMember\": {\"a\": [1, 2], \"b\": [3, 4]}}"
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"description": "Complex Map Values",
|
||||
"metadata": {
|
||||
"protocol": "rest-json"
|
||||
},
|
||||
"shapes": {
|
||||
"OutputShape": {
|
||||
"type": "structure",
|
||||
"members": {
|
||||
"MapMember": {
|
||||
"shape": "MapType"
|
||||
}
|
||||
}
|
||||
},
|
||||
"MapType": {
|
||||
"type": "map",
|
||||
"key": {
|
||||
"shape": "StringType"
|
||||
},
|
||||
"value": {
|
||||
"shape": "TimeType"
|
||||
}
|
||||
},
|
||||
"TimeType": {
|
||||
"type": "timestamp"
|
||||
},
|
||||
"StringType": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"cases": [
|
||||
{
|
||||
"given": {
|
||||
"output": {
|
||||
"shape": "OutputShape"
|
||||
},
|
||||
"name": "OperationName"
|
||||
},
|
||||
"result": {
|
||||
"MapMember": {
|
||||
"a": 1398796238,
|
||||
"b": 1398796238
|
||||
}
|
||||
},
|
||||
"response": {
|
||||
"status_code": 200,
|
||||
"headers": {},
|
||||
"body": "{\"MapMember\": {\"a\": 1398796238, \"b\": 1398796238}}"
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"description": "Ignores extra data",
|
||||
"metadata": {
|
||||
"protocol": "rest-json"
|
||||
},
|
||||
"shapes": {
|
||||
"OutputShape": {
|
||||
"type": "structure",
|
||||
"members": {
|
||||
"StrType": {
|
||||
"shape": "StrType"
|
||||
}
|
||||
}
|
||||
},
|
||||
"StrType": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"cases": [
|
||||
{
|
||||
"given": {
|
||||
"output": {
|
||||
"shape": "OutputShape"
|
||||
},
|
||||
"name": "OperationName"
|
||||
},
|
||||
"result": {},
|
||||
"response": {
|
||||
"status_code": 200,
|
||||
"headers": {},
|
||||
"body": "{\"foo\": \"bar\"}"
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"description": "Supports header maps",
|
||||
"metadata": {
|
||||
"protocol": "rest-json"
|
||||
},
|
||||
"shapes": {
|
||||
"OutputShape": {
|
||||
"type": "structure",
|
||||
"members": {
|
||||
"AllHeaders": {
|
||||
"shape": "HeaderMap",
|
||||
"location": "headers"
|
||||
},
|
||||
"PrefixedHeaders": {
|
||||
"shape": "HeaderMap",
|
||||
"location": "headers",
|
||||
"locationName": "X-"
|
||||
}
|
||||
}
|
||||
},
|
||||
"HeaderMap": {
|
||||
"type": "map",
|
||||
"key": {
|
||||
"shape": "StringType"
|
||||
},
|
||||
"value": {
|
||||
"shape": "StringType"
|
||||
}
|
||||
},
|
||||
"StringType": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"cases": [
|
||||
{
|
||||
"given": {
|
||||
"output": {
|
||||
"shape": "OutputShape"
|
||||
},
|
||||
"name": "OperationName"
|
||||
},
|
||||
"result": {
|
||||
"AllHeaders": {
|
||||
"Content-Length": "10",
|
||||
"X-Foo": "bar",
|
||||
"X-Bam": "boo"
|
||||
},
|
||||
"PrefixedHeaders": {
|
||||
"Foo": "bar",
|
||||
"Bam": "boo"
|
||||
}
|
||||
},
|
||||
"response": {
|
||||
"status_code": 200,
|
||||
"headers": {
|
||||
"Content-Length": "10",
|
||||
"X-Foo": "bar",
|
||||
"X-Bam": "boo"
|
||||
},
|
||||
"body": "{}"
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"description": "JSON payload",
|
||||
"metadata": {
|
||||
"protocol": "rest-json"
|
||||
},
|
||||
"shapes": {
|
||||
"OutputShape": {
|
||||
"type": "structure",
|
||||
"payload": "Data",
|
||||
"members": {
|
||||
"Header": {
|
||||
"shape": "StringType",
|
||||
"location": "header",
|
||||
"locationName": "X-Foo"
|
||||
},
|
||||
"Data": {
|
||||
"shape": "BodyStructure"
|
||||
}
|
||||
}
|
||||
},
|
||||
"BodyStructure": {
|
||||
"type": "structure",
|
||||
"members": {
|
||||
"Foo": {
|
||||
"shape": "StringType"
|
||||
}
|
||||
}
|
||||
},
|
||||
"StringType": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"cases": [
|
||||
{
|
||||
"given": {
|
||||
"output": {
|
||||
"shape": "OutputShape"
|
||||
},
|
||||
"name": "OperationName"
|
||||
},
|
||||
"result": {
|
||||
"Header": "baz",
|
||||
"Data": {
|
||||
"Foo": "abc"
|
||||
}
|
||||
},
|
||||
"response": {
|
||||
"status_code": 200,
|
||||
"headers": {
|
||||
"X-Foo": "baz"
|
||||
},
|
||||
"body": "{\"Foo\": \"abc\"}"
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"description": "Streaming payload",
|
||||
"metadata": {
|
||||
"protocol": "rest-json"
|
||||
},
|
||||
"shapes": {
|
||||
"OutputShape": {
|
||||
"type": "structure",
|
||||
"payload": "Stream",
|
||||
"members": {
|
||||
"Stream": {
|
||||
"shape": "Stream"
|
||||
}
|
||||
}
|
||||
},
|
||||
"Stream": {
|
||||
"type": "blob"
|
||||
}
|
||||
},
|
||||
"cases": [
|
||||
{
|
||||
"given": {
|
||||
"output": {
|
||||
"shape": "OutputShape"
|
||||
},
|
||||
"name": "OperationName"
|
||||
},
|
||||
"result": {
|
||||
"Stream": "abc"
|
||||
},
|
||||
"response": {
|
||||
"status_code": 200,
|
||||
"headers": {},
|
||||
"body": "abc"
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"description": "JSON value trait",
|
||||
"metadata": {
|
||||
"protocol": "rest-json"
|
||||
},
|
||||
"shapes": {
|
||||
"OutputShape": {
|
||||
"type": "structure",
|
||||
"members": {
|
||||
"Attr": {
|
||||
"shape": "StringType",
|
||||
"jsonvalue": true,
|
||||
"location": "header",
|
||||
"locationName": "X-Amz-Foo"
|
||||
}
|
||||
}
|
||||
},
|
||||
"StringType": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"cases": [
|
||||
{
|
||||
"given": {
|
||||
"output": {
|
||||
"shape": "OutputShape"
|
||||
},
|
||||
"name": "OperationName"
|
||||
},
|
||||
"result": {
|
||||
"Attr": {"Foo":"Bar"}
|
||||
},
|
||||
"response": {
|
||||
"status_code": 200,
|
||||
"headers": {"X-Amz-Foo": "eyJGb28iOiJCYXIifQ=="},
|
||||
"body": ""
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
720
vendor/github.com/aws/aws-sdk-go/models/protocol_tests/output/rest-xml.json
generated
vendored
Normal file
720
vendor/github.com/aws/aws-sdk-go/models/protocol_tests/output/rest-xml.json
generated
vendored
Normal file
|
@ -0,0 +1,720 @@
|
|||
[
|
||||
{
|
||||
"description": "Scalar members",
|
||||
"metadata": {
|
||||
"protocol": "rest-xml"
|
||||
},
|
||||
"shapes": {
|
||||
"OutputShape": {
|
||||
"type": "structure",
|
||||
"members": {
|
||||
"ImaHeader": {
|
||||
"shape": "HeaderShape"
|
||||
},
|
||||
"ImaHeaderLocation": {
|
||||
"shape": "HeaderShape",
|
||||
"locationName": "X-Foo"
|
||||
},
|
||||
"Str": {
|
||||
"shape": "StringType"
|
||||
},
|
||||
"Num": {
|
||||
"shape": "IntegerType",
|
||||
"locationName": "FooNum"
|
||||
},
|
||||
"FalseBool": {
|
||||
"shape": "BooleanType"
|
||||
},
|
||||
"TrueBool": {
|
||||
"shape": "BooleanType"
|
||||
},
|
||||
"Float": {
|
||||
"shape": "FloatType"
|
||||
},
|
||||
"Double": {
|
||||
"shape": "DoubleType"
|
||||
},
|
||||
"Long": {
|
||||
"shape": "LongType"
|
||||
},
|
||||
"Char": {
|
||||
"shape": "CharType"
|
||||
},
|
||||
"Timestamp": {
|
||||
"shape": "TimestampType"
|
||||
}
|
||||
}
|
||||
},
|
||||
"StringType": {
|
||||
"type": "string"
|
||||
},
|
||||
"IntegerType": {
|
||||
"type": "integer"
|
||||
},
|
||||
"BooleanType": {
|
||||
"type": "boolean"
|
||||
},
|
||||
"FloatType": {
|
||||
"type": "float"
|
||||
},
|
||||
"DoubleType": {
|
||||
"type": "double"
|
||||
},
|
||||
"LongType": {
|
||||
"type": "long"
|
||||
},
|
||||
"CharType": {
|
||||
"type": "character"
|
||||
},
|
||||
"HeaderShape": {
|
||||
"type": "string",
|
||||
"location": "header"
|
||||
},
|
||||
"StatusShape": {
|
||||
"type": "integer",
|
||||
"location": "statusCode"
|
||||
},
|
||||
"TimestampType": {
|
||||
"type": "timestamp"
|
||||
}
|
||||
},
|
||||
"cases": [
|
||||
{
|
||||
"given": {
|
||||
"output": {
|
||||
"shape": "OutputShape"
|
||||
},
|
||||
"name": "OperationName"
|
||||
},
|
||||
"result": {
|
||||
"ImaHeader": "test",
|
||||
"ImaHeaderLocation": "abc",
|
||||
"Str": "myname",
|
||||
"Num": 123,
|
||||
"FalseBool": false,
|
||||
"TrueBool": true,
|
||||
"Float": 1.2,
|
||||
"Double": 1.3,
|
||||
"Long": 200,
|
||||
"Char": "a",
|
||||
"Timestamp": 1422172800
|
||||
},
|
||||
"response": {
|
||||
"status_code": 200,
|
||||
"headers": {
|
||||
"ImaHeader": "test",
|
||||
"X-Foo": "abc"
|
||||
},
|
||||
"body": "<OperationNameResponse><Str>myname</Str><FooNum>123</FooNum><FalseBool>false</FalseBool><TrueBool>true</TrueBool><Float>1.2</Float><Double>1.3</Double><Long>200</Long><Char>a</Char><Timestamp>2015-01-25T08:00:00Z</Timestamp></OperationNameResponse>"
|
||||
}
|
||||
},
|
||||
{
|
||||
"given": {
|
||||
"output": {
|
||||
"shape": "OutputShape"
|
||||
},
|
||||
"name": "OperationName"
|
||||
},
|
||||
"result": {
|
||||
"ImaHeader": "test",
|
||||
"ImaHeaderLocation": "abc",
|
||||
"Str": "",
|
||||
"Num": 123,
|
||||
"FalseBool": false,
|
||||
"TrueBool": true,
|
||||
"Float": 1.2,
|
||||
"Double": 1.3,
|
||||
"Long": 200,
|
||||
"Char": "a",
|
||||
"Timestamp": 1422172800
|
||||
},
|
||||
"response": {
|
||||
"status_code": 200,
|
||||
"headers": {
|
||||
"ImaHeader": "test",
|
||||
"X-Foo": "abc"
|
||||
},
|
||||
"body": "<OperationNameResponse><Str></Str><FooNum>123</FooNum><FalseBool>false</FalseBool><TrueBool>true</TrueBool><Float>1.2</Float><Double>1.3</Double><Long>200</Long><Char>a</Char><Timestamp>2015-01-25T08:00:00Z</Timestamp></OperationNameResponse>"
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"description": "Blob",
|
||||
"metadata": {
|
||||
"protocol": "rest-xml"
|
||||
},
|
||||
"shapes": {
|
||||
"OutputShape": {
|
||||
"type": "structure",
|
||||
"members": {
|
||||
"Blob": {
|
||||
"shape": "BlobType"
|
||||
}
|
||||
}
|
||||
},
|
||||
"BlobType": {
|
||||
"type": "blob"
|
||||
}
|
||||
},
|
||||
"cases": [
|
||||
{
|
||||
"given": {
|
||||
"output": {
|
||||
"shape": "OutputShape"
|
||||
},
|
||||
"name": "OperationName"
|
||||
},
|
||||
"result": {
|
||||
"Blob": "value"
|
||||
},
|
||||
"response": {
|
||||
"status_code": 200,
|
||||
"headers": {},
|
||||
"body": "<OperationNameResult><Blob>dmFsdWU=</Blob></OperationNameResult>"
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"description": "Lists",
|
||||
"metadata": {
|
||||
"protocol": "rest-xml"
|
||||
},
|
||||
"shapes": {
|
||||
"OutputShape": {
|
||||
"type": "structure",
|
||||
"members": {
|
||||
"ListMember": {
|
||||
"shape": "ListShape"
|
||||
}
|
||||
}
|
||||
},
|
||||
"ListShape": {
|
||||
"type": "list",
|
||||
"member": {
|
||||
"shape": "StringType"
|
||||
}
|
||||
},
|
||||
"StringType": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"cases": [
|
||||
{
|
||||
"given": {
|
||||
"output": {
|
||||
"shape": "OutputShape"
|
||||
},
|
||||
"name": "OperationName"
|
||||
},
|
||||
"result": {
|
||||
"ListMember": ["abc", "123"]
|
||||
},
|
||||
"response": {
|
||||
"status_code": 200,
|
||||
"headers": {},
|
||||
"body": "<OperationNameResult><ListMember><member>abc</member><member>123</member></ListMember></OperationNameResult>"
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"description": "List with custom member name",
|
||||
"metadata": {
|
||||
"protocol": "rest-xml"
|
||||
},
|
||||
"shapes": {
|
||||
"OutputShape": {
|
||||
"type": "structure",
|
||||
"members": {
|
||||
"ListMember": {
|
||||
"shape": "ListShape"
|
||||
}
|
||||
}
|
||||
},
|
||||
"ListShape": {
|
||||
"type": "list",
|
||||
"member": {
|
||||
"shape": "StringType",
|
||||
"locationName": "item"
|
||||
}
|
||||
},
|
||||
"StringType": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"cases": [
|
||||
{
|
||||
"given": {
|
||||
"output": {
|
||||
"shape": "OutputShape"
|
||||
},
|
||||
"name": "OperationName"
|
||||
},
|
||||
"result": {
|
||||
"ListMember": ["abc", "123"]
|
||||
},
|
||||
"response": {
|
||||
"status_code": 200,
|
||||
"headers": {},
|
||||
"body": "<OperationNameResult><ListMember><item>abc</item><item>123</item></ListMember></OperationNameResult>"
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"description": "Flattened List",
|
||||
"metadata": {
|
||||
"protocol": "rest-xml"
|
||||
},
|
||||
"shapes": {
|
||||
"OutputShape": {
|
||||
"type": "structure",
|
||||
"members": {
|
||||
"ListMember": {
|
||||
"shape": "StringList",
|
||||
"flattened": true
|
||||
}
|
||||
}
|
||||
},
|
||||
"StringList": {
|
||||
"type": "list",
|
||||
"member": {
|
||||
"shape": "StringType"
|
||||
}
|
||||
},
|
||||
"StringType": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"cases": [
|
||||
{
|
||||
"given": {
|
||||
"output": {
|
||||
"shape": "OutputShape"
|
||||
},
|
||||
"name": "OperationName"
|
||||
},
|
||||
"result": {
|
||||
"ListMember": ["abc", "123"]
|
||||
},
|
||||
"response": {
|
||||
"status_code": 200,
|
||||
"headers": {},
|
||||
"body": "<OperationNameResult><ListMember>abc</ListMember><ListMember>123</ListMember></OperationNameResult>"
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"description": "Normal map",
|
||||
"metadata": {
|
||||
"protocol": "rest-xml"
|
||||
},
|
||||
"shapes": {
|
||||
"OutputShape": {
|
||||
"type": "structure",
|
||||
"members": {
|
||||
"Map": {
|
||||
"shape": "StringMap"
|
||||
}
|
||||
}
|
||||
},
|
||||
"StringMap": {
|
||||
"type": "map",
|
||||
"key": {
|
||||
"shape": "StringType"
|
||||
},
|
||||
"value": {
|
||||
"shape": "SingleStructure"
|
||||
}
|
||||
},
|
||||
"SingleStructure": {
|
||||
"type": "structure",
|
||||
"members": {
|
||||
"foo": {
|
||||
"shape": "StringType"
|
||||
}
|
||||
}
|
||||
},
|
||||
"StringType": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"cases": [
|
||||
{
|
||||
"given": {
|
||||
"output": {
|
||||
"shape": "OutputShape"
|
||||
},
|
||||
"name": "OperationName"
|
||||
},
|
||||
"result": {
|
||||
"Map": {
|
||||
"qux": {
|
||||
"foo": "bar"
|
||||
},
|
||||
"baz": {
|
||||
"foo": "bam"
|
||||
}
|
||||
}
|
||||
},
|
||||
"response": {
|
||||
"status_code": 200,
|
||||
"headers": {},
|
||||
"body": "<OperationNameResult><Map><entry><key>qux</key><value><foo>bar</foo></value></entry><entry><key>baz</key><value><foo>bam</foo></value></entry></Map></OperationNameResult>"
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"description": "Flattened map",
|
||||
"metadata": {
|
||||
"protocol": "rest-xml"
|
||||
},
|
||||
"shapes": {
|
||||
"OutputShape": {
|
||||
"type": "structure",
|
||||
"members": {
|
||||
"Map": {
|
||||
"shape": "StringMap",
|
||||
"flattened": true
|
||||
}
|
||||
}
|
||||
},
|
||||
"StringMap": {
|
||||
"type": "map",
|
||||
"key": {
|
||||
"shape": "StringType"
|
||||
},
|
||||
"value": {
|
||||
"shape": "StringType"
|
||||
}
|
||||
},
|
||||
"StringType": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"cases": [
|
||||
{
|
||||
"given": {
|
||||
"output": {
|
||||
"shape": "OutputShape"
|
||||
},
|
||||
"name": "OperationName"
|
||||
},
|
||||
"result": {
|
||||
"Map": {
|
||||
"qux": "bar",
|
||||
"baz": "bam"
|
||||
}
|
||||
},
|
||||
"response": {
|
||||
"status_code": 200,
|
||||
"headers": {},
|
||||
"body": "<OperationNameResult><Map><key>qux</key><value>bar</value></Map><Map><key>baz</key><value>bam</value></Map></OperationNameResult>"
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"description": "Named map",
|
||||
"metadata": {
|
||||
"protocol": "rest-xml"
|
||||
},
|
||||
"shapes": {
|
||||
"OutputShape": {
|
||||
"type": "structure",
|
||||
"members": {
|
||||
"Map": {
|
||||
"shape": "StringMap"
|
||||
}
|
||||
}
|
||||
},
|
||||
"StringMap": {
|
||||
"type": "map",
|
||||
"key": {
|
||||
"shape": "StringType",
|
||||
"locationName": "foo"
|
||||
},
|
||||
"value": {
|
||||
"shape": "StringType",
|
||||
"locationName": "bar"
|
||||
}
|
||||
},
|
||||
"StringType": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"cases": [
|
||||
{
|
||||
"given": {
|
||||
"output": {
|
||||
"shape": "OutputShape"
|
||||
},
|
||||
"name": "OperationName"
|
||||
},
|
||||
"result": {
|
||||
"Map": {
|
||||
"qux": "bar",
|
||||
"baz": "bam"
|
||||
}
|
||||
},
|
||||
"response": {
|
||||
"status_code": 200,
|
||||
"headers": {},
|
||||
"body": "<OperationNameResult><Map><entry><foo>qux</foo><bar>bar</bar></entry><entry><foo>baz</foo><bar>bam</bar></entry></Map></OperationNameResult>"
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"description": "XML payload",
|
||||
"metadata": {
|
||||
"protocol": "rest-xml"
|
||||
},
|
||||
"shapes": {
|
||||
"OutputShape": {
|
||||
"type": "structure",
|
||||
"payload": "Data",
|
||||
"members": {
|
||||
"Header": {
|
||||
"shape": "StringType",
|
||||
"location": "header",
|
||||
"locationName": "X-Foo"
|
||||
},
|
||||
"Data": {
|
||||
"shape": "SingleStructure"
|
||||
}
|
||||
}
|
||||
},
|
||||
"StringType": {
|
||||
"type": "string"
|
||||
},
|
||||
"SingleStructure": {
|
||||
"type": "structure",
|
||||
"members": {
|
||||
"Foo": {
|
||||
"shape": "StringType"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"cases": [
|
||||
{
|
||||
"given": {
|
||||
"output": {
|
||||
"shape": "OutputShape"
|
||||
},
|
||||
"name": "OperationName"
|
||||
},
|
||||
"result": {
|
||||
"Header": "baz",
|
||||
"Data": {
|
||||
"Foo": "abc"
|
||||
}
|
||||
},
|
||||
"response": {
|
||||
"status_code": 200,
|
||||
"headers": {
|
||||
"X-Foo": "baz"
|
||||
},
|
||||
"body": "<OperationNameResponse><Foo>abc</Foo></OperationNameResponse>"
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"description": "Streaming payload",
|
||||
"metadata": {
|
||||
"protocol": "rest-xml"
|
||||
},
|
||||
"shapes": {
|
||||
"OutputShape": {
|
||||
"type": "structure",
|
||||
"payload": "Stream",
|
||||
"members": {
|
||||
"Stream": {
|
||||
"shape": "BlobStream"
|
||||
}
|
||||
}
|
||||
},
|
||||
"BlobStream": {
|
||||
"type": "blob"
|
||||
}
|
||||
},
|
||||
"cases": [
|
||||
{
|
||||
"given": {
|
||||
"output": {
|
||||
"shape": "OutputShape"
|
||||
},
|
||||
"name": "OperationName"
|
||||
},
|
||||
"result": {
|
||||
"Stream": "abc"
|
||||
},
|
||||
"response": {
|
||||
"status_code": 200,
|
||||
"headers": {},
|
||||
"body": "abc"
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"description": "Scalar members in headers",
|
||||
"metadata": {
|
||||
"protocol": "rest-xml"
|
||||
},
|
||||
"shapes": {
|
||||
"OutputShape": {
|
||||
"type": "structure",
|
||||
"members": {
|
||||
"Str": {
|
||||
"locationName": "x-str",
|
||||
"shape": "StringHeaderType"
|
||||
},
|
||||
"Integer": {
|
||||
"locationName": "x-int",
|
||||
"shape": "IntegerHeaderType"
|
||||
},
|
||||
"TrueBool": {
|
||||
"locationName": "x-true-bool",
|
||||
"shape": "BooleanHeaderType"
|
||||
},
|
||||
"FalseBool": {
|
||||
"locationName": "x-false-bool",
|
||||
"shape": "BooleanHeaderType"
|
||||
},
|
||||
"Float": {
|
||||
"locationName": "x-float",
|
||||
"shape": "FloatHeaderType"
|
||||
},
|
||||
"Double": {
|
||||
"locationName": "x-double",
|
||||
"shape": "DoubleHeaderType"
|
||||
},
|
||||
"Long": {
|
||||
"locationName": "x-long",
|
||||
"shape": "LongHeaderType"
|
||||
},
|
||||
"Char": {
|
||||
"locationName": "x-char",
|
||||
"shape": "CharHeaderType"
|
||||
},
|
||||
"Timestamp": {
|
||||
"locationName": "x-timestamp",
|
||||
"shape": "TimestampHeaderType"
|
||||
}
|
||||
}
|
||||
},
|
||||
"StringHeaderType": {
|
||||
"location": "header",
|
||||
"type": "string"
|
||||
},
|
||||
"IntegerHeaderType": {
|
||||
"location": "header",
|
||||
"type": "integer"
|
||||
},
|
||||
"BooleanHeaderType": {
|
||||
"location": "header",
|
||||
"type": "boolean"
|
||||
},
|
||||
"FloatHeaderType": {
|
||||
"location": "header",
|
||||
"type": "float"
|
||||
},
|
||||
"DoubleHeaderType": {
|
||||
"location": "header",
|
||||
"type": "double"
|
||||
},
|
||||
"LongHeaderType": {
|
||||
"location": "header",
|
||||
"type": "long"
|
||||
},
|
||||
"CharHeaderType": {
|
||||
"location": "header",
|
||||
"type": "character"
|
||||
},
|
||||
"TimestampHeaderType": {
|
||||
"location": "header",
|
||||
"type": "timestamp"
|
||||
}
|
||||
},
|
||||
"cases": [
|
||||
{
|
||||
"given": {
|
||||
"output": {
|
||||
"shape": "OutputShape"
|
||||
},
|
||||
"name": "OperationName"
|
||||
},
|
||||
"result": {
|
||||
"Str": "string",
|
||||
"Integer": 1,
|
||||
"TrueBool": true,
|
||||
"FalseBool": false,
|
||||
"Float": 1.5,
|
||||
"Double": 1.5,
|
||||
"Long": 100,
|
||||
"Char": "a",
|
||||
"Timestamp": 1422172800
|
||||
},
|
||||
"response": {
|
||||
"status_code": 200,
|
||||
"headers": {
|
||||
"x-str": "string",
|
||||
"x-int": "1",
|
||||
"x-true-bool": "true",
|
||||
"x-false-bool": "false",
|
||||
"x-float": "1.5",
|
||||
"x-double": "1.5",
|
||||
"x-long": "100",
|
||||
"x-char": "a",
|
||||
"x-timestamp": "Sun, 25 Jan 2015 08:00:00 GMT"
|
||||
},
|
||||
"body": ""
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"description": "Empty string",
|
||||
"metadata": {
|
||||
"protocol": "rest-xml"
|
||||
},
|
||||
"shapes": {
|
||||
"OutputShape": {
|
||||
"type": "structure",
|
||||
"members": {
|
||||
"Foo": {
|
||||
"shape": "StringType"
|
||||
}
|
||||
}
|
||||
},
|
||||
"StringType": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"cases": [
|
||||
{
|
||||
"given": {
|
||||
"output": {
|
||||
"shape": "OutputShape"
|
||||
},
|
||||
"name": "OperationName"
|
||||
},
|
||||
"result": {
|
||||
"Foo": ""
|
||||
},
|
||||
"response": {
|
||||
"status_code": 200,
|
||||
"headers": {},
|
||||
"body": "<OperationNameResponse><Foo/><RequestId>requestid</RequestId></OperationNameResponse>"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
Loading…
Add table
Add a link
Reference in a new issue