Skip to content

Commit

Permalink
Put the KVPs of identifiers and properties fields of resource shapes …
Browse files Browse the repository at this point in the history
…on their own lines
  • Loading branch information
Brandon Dahler authored and JordonPhillips committed Aug 23, 2024
1 parent 120849b commit 0f64ac5
Show file tree
Hide file tree
Showing 4 changed files with 35 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -769,6 +769,8 @@ public Doc apply(TreeCursor c) {
case "collectionOperations":
case "errors":
return formatNodeObjectKvp(c, FormatVisitor.this::visit, hardLineList);
case "identifiers":
case "properties":
case "rename":
return formatNodeObjectKvp(c, FormatVisitor.this::visit, hardLineObject);
default:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,16 @@ operation GetTime2 {

@http(method: "X", uri: "/foo", code: 200)
resource Sprocket2 {
identifiers: { username: String, id: String, otherId: String }
identifiers: {
username: String
id: String
otherId: String
}
properties: {
foo: String
bar: Integer
fizz: String
}
}

@error("client")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,10 @@ operation GetTime2 {

@http(method: "X", uri: "/foo", code: 200)
resource Sprocket2 {
identifiers: {username: String, id: String, otherId: String}
identifiers: {username: String, id: String
otherId: String}
properties: {foo: String,bar: Integer
fizz: String }
}

@error("client")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,12 +33,22 @@ operation GetTime2 {
}

resource Sprocket1 {
identifiers: { username: String }
identifiers: {
username: String
}
properties: {
foo: String
bar: Integer
}
}

@http(method: "X", uri: "/foo", code: 200)
resource Sprocket2 {
identifiers: { username: String, id: String, otherId: String }
identifiers: {
username: String
id: String
otherId: String
}
collectionOperations: [
SomeOperation
]
Expand All @@ -54,7 +64,13 @@ structure SomeOperationFoo {}

@http(method: "X", uri: "/foo3", code: 200)
resource Sprocket3 {
identifiers: { username: String, id: String, otherId: String }
identifiers: {
username: String
id: String
otherId: String
}
// It's empty, so on a single line.
properties: {}
// It's empty, so on a single line.
collectionOperations: []
}

0 comments on commit 0f64ac5

Please sign in to comment.