Skip to content

Commit

Permalink
Replace $target with target
Browse files Browse the repository at this point in the history
Rethinking this, I realized that using $ for some shape relationships
but not all would actually introduce an inconsistency in the format. For
example, trait values with an idRef trait would not use this syntax, nor
would applying traits to shapes since a trait would be the key of a map.
A better approach for simpler tools to try to reason about references
between shapes would be to look for strings that match the shape ID
ABNF.
  • Loading branch information
mtdowling committed Dec 10, 2019
1 parent cbf5987 commit 12785e3
Show file tree
Hide file tree
Showing 152 changed files with 1,838 additions and 1,844 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"version": "2006-03-01",
"operations": [
{
"$target": "example.smithy#MyOperation"
"target": "example.smithy#MyOperation"
}
],
"traits": {
Expand All @@ -21,7 +21,7 @@
"example.smithy#MyOperation": {
"type": "operation",
"input": {
"$target": "example.smithy#MyOperationInput"
"target": "example.smithy#MyOperationInput"
},
"traits": {
"smithy.api#http": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@
"version": "2006-03-01",
"operations": [
{
"$target": "example.smithy#MyOperation"
"target": "example.smithy#MyOperation"
},
{
"$target": "example.smithy#OtherOperation"
"target": "example.smithy#OtherOperation"
}
],
"traits": {
Expand All @@ -23,10 +23,10 @@
"example.smithy#MyOperation": {
"type": "operation",
"input": {
"$target": "example.smithy#MyOperationInput"
"target": "example.smithy#MyOperationInput"
},
"output": {
"$target": "example.smithy#MyOperationOutput"
"target": "example.smithy#MyOperationOutput"
},
"traits": {
"smithy.api#http": {
Expand All @@ -38,7 +38,7 @@
"example.smithy#OtherOperation": {
"type": "operation",
"output": {
"$target": "example.smithy#OtherOperationOutput"
"target": "example.smithy#OtherOperationOutput"
},
"traits": {
"smithy.api#readonly": true,
Expand All @@ -52,7 +52,7 @@
"type": "structure",
"members": {
"payload": {
"$target": "example.smithy#InboundBinaryPayload",
"target": "example.smithy#InboundBinaryPayload",
"traits": {
"smithy.api#required": true,
"smithy.api#httpPayload": true
Expand All @@ -64,7 +64,7 @@
"type": "structure",
"members": {
"payload": {
"$target": "example.smithy#OutboundBinaryPayload",
"target": "example.smithy#OutboundBinaryPayload",
"traits": {
"smithy.api#required": true,
"smithy.api#httpPayload": true
Expand All @@ -76,10 +76,10 @@
"type": "structure",
"members": {
"abc": {
"$target": "example.smithy#StringShape"
"target": "example.smithy#StringShape"
},
"def": {
"$target": "example.smithy#NonPayloadBinaryShape"
"target": "example.smithy#NonPayloadBinaryShape"
}
}
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"version": "2006-03-01",
"operations": [
{
"$target": "example.smithy#MyOperation"
"target": "example.smithy#MyOperation"
}
],
"traits": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"version": "2006-03-01",
"operations": [
{
"$target": "smithy.example#Operation1"
"target": "smithy.example#Operation1"
}
],
"traits": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@
"version": "2006-03-01",
"operations": [
{
"$target": "example.smithy#Foo"
"target": "example.smithy#Foo"
},
{
"$target": "example.smithy#FooOptions"
"target": "example.smithy#FooOptions"
}
],
"traits": {
Expand Down Expand Up @@ -45,7 +45,7 @@
"example.smithy#FooOptions": {
"type": "operation",
"output": {
"$target": "example.smithy#FooOptionsOutput"
"target": "example.smithy#FooOptionsOutput"
},
"traits": {
"smithy.api#http": {
Expand All @@ -65,7 +65,7 @@
"type": "structure",
"members": {
"hd": {
"$target": "smithy.api#String",
"target": "smithy.api#String",
"traits": {
"smithy.api#httpHeader": "X-Hd"
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"version": "2006-03-01",
"resources": [
{
"$target": "example.smithy#Payload"
"target": "example.smithy#Payload"
}
],
"traits": {
Expand Down Expand Up @@ -41,26 +41,26 @@
"type": "resource",
"identifiers": {
"id": {
"$target": "smithy.api#String"
"target": "smithy.api#String"
}
},
"put": {
"$target": "example.smithy#PutPayload"
"target": "example.smithy#PutPayload"
},
"read": {
"$target": "example.smithy#GetPayload"
"target": "example.smithy#GetPayload"
},
"delete": {
"$target": "example.smithy#DeletePayload"
"target": "example.smithy#DeletePayload"
},
"list": {
"$target": "example.smithy#ListPayloads"
"target": "example.smithy#ListPayloads"
}
},
"example.smithy#PutPayload": {
"type": "operation",
"input": {
"$target": "example.smithy#PutPayloadInput"
"target": "example.smithy#PutPayloadInput"
},
"traits": {
"smithy.api#idempotent": true,
Expand All @@ -74,10 +74,10 @@
"example.smithy#GetPayload": {
"type": "operation",
"input": {
"$target": "example.smithy#GetPayloadInput"
"target": "example.smithy#GetPayloadInput"
},
"output": {
"$target": "example.smithy#GetPayloadOutput"
"target": "example.smithy#GetPayloadOutput"
},
"traits": {
"smithy.api#readonly": true,
Expand All @@ -90,7 +90,7 @@
"example.smithy#DeletePayload": {
"type": "operation",
"input": {
"$target": "example.smithy#DeletePayloadInput"
"target": "example.smithy#DeletePayloadInput"
},
"traits": {
"smithy.api#idempotent": true,
Expand All @@ -104,7 +104,7 @@
"example.smithy#ListPayloads": {
"type": "operation",
"output": {
"$target": "example.smithy#ListPayloadsOutput"
"target": "example.smithy#ListPayloadsOutput"
},
"traits": {
"smithy.api#readonly": true,
Expand All @@ -118,32 +118,32 @@
"type": "structure",
"members": {
"id": {
"$target": "smithy.api#String",
"target": "smithy.api#String",
"traits": {
"smithy.api#required": true,
"smithy.api#httpLabel": true
}
},
"header": {
"$target": "smithy.api#String",
"target": "smithy.api#String",
"traits": {
"smithy.api#httpHeader": "X-Foo-Header"
}
},
"query": {
"$target": "smithy.api#Integer",
"target": "smithy.api#Integer",
"traits": {
"smithy.api#httpQuery": "query"
}
},
"enum": {
"$target": "example.smithy#EnumString",
"target": "example.smithy#EnumString",
"traits": {
"smithy.api#httpHeader": "X-EnumString"
}
},
"body": {
"$target": "smithy.api#Blob",
"target": "smithy.api#Blob",
"traits": {
"smithy.api#httpPayload": true
}
Expand All @@ -154,7 +154,7 @@
"type": "structure",
"members": {
"id": {
"$target": "smithy.api#String",
"target": "smithy.api#String",
"traits": {
"smithy.api#httpLabel": true,
"smithy.api#required": true
Expand All @@ -166,13 +166,13 @@
"type": "structure",
"members": {
"header": {
"$target": "smithy.api#String",
"target": "smithy.api#String",
"traits": {
"smithy.api#httpHeader": "X-Foo-Header"
}
},
"body": {
"$target": "smithy.api#Blob",
"target": "smithy.api#Blob",
"traits": {
"smithy.api#httpPayload": true
}
Expand All @@ -183,7 +183,7 @@
"type": "structure",
"members": {
"id": {
"$target": "smithy.api#String",
"target": "smithy.api#String",
"traits": {
"smithy.api#httpLabel": true,
"smithy.api#required": true
Expand All @@ -195,7 +195,7 @@
"type": "structure",
"members": {
"items": {
"$target": "example.smithy#PayloadDescriptions"
"target": "example.smithy#PayloadDescriptions"
}
}
},
Expand All @@ -215,20 +215,20 @@
"example.smithy#PayloadDescriptions": {
"type": "list",
"member": {
"$target": "example.smithy#PayloadDescription"
"target": "example.smithy#PayloadDescription"
}
},
"example.smithy#PayloadDescription": {
"type": "structure",
"members": {
"id": {
"$target": "smithy.api#String",
"target": "smithy.api#String",
"traits": {
"smithy.api#required": true
}
},
"createdAt": {
"$target": "smithy.api#Timestamp",
"target": "smithy.api#Timestamp",
"traits": {
"smithy.api#required": true
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@
"version": "2018-03-17",
"operations": [
{
"$target": "smithy.example#Operation1"
"target": "smithy.example#Operation1"
},
{
"$target": "smithy.example#Operation2"
"target": "smithy.example#Operation2"
}
],
"traits": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@
"version": "2018-03-17",
"operations": [
{
"$target": "smithy.example#Operation1"
"target": "smithy.example#Operation1"
},
{
"$target": "smithy.example#Operation2"
"target": "smithy.example#Operation2"
}
],
"traits": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"version": "2006-03-01",
"operations": [
{
"$target": "smithy.example#Operation1"
"target": "smithy.example#Operation1"
}
],
"traits": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@
"version": "2006-03-01",
"operations": [
{
"$target": "smithy.example#Operation1"
"target": "smithy.example#Operation1"
},
{
"$target": "smithy.example#Operation2"
"target": "smithy.example#Operation2"
}
],
"traits": {
Expand Down
Loading

0 comments on commit 12785e3

Please sign in to comment.