Skip to content

Commit 5c8badd

Browse files
committed
Revert "Enforce private on traits (smithy-lang#1406)"
This reverts commit 88e2d1f.
1 parent 5281e72 commit 5c8badd

File tree

4 files changed

+2
-23
lines changed

4 files changed

+2
-23
lines changed

smithy-aws-traits/src/main/resources/META-INF/smithy/aws.protocols.smithy

+1-1
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ structure awsJson1_1 with [HttpConfiguration] {}
3232

3333
/// Contains HTTP protocol configuration for HTTP-based protocols.
3434
@private
35-
@mixin(localTraits: [private])
35+
@mixin
3636
structure HttpConfiguration {
3737
/// The priority ordered list of supported HTTP protocol versions.
3838
http: StringList

smithy-model/src/main/java/software/amazon/smithy/model/validation/validators/PrivateAccessValidator.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ public final class PrivateAccessValidator extends AbstractValidator {
3535

3636
@Override
3737
public List<ValidationEvent> validate(Model model) {
38-
NeighborProvider provider = NeighborProviderIndex.of(model).getReverseProviderWithTraitRelationships();
38+
NeighborProvider provider = NeighborProviderIndex.of(model).getReverseProvider();
3939

4040
List<ValidationEvent> events = new ArrayList<>();
4141
for (Shape privateShape : model.getShapesWithTrait(PrivateTrait.class)) {

smithy-model/src/test/resources/software/amazon/smithy/model/errorfiles/validators/private-access.errors

-1
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,3 @@
66
[ERROR] smithy.example#InvalidOperation: This shape has an invalid output relationship that targets a private shape, `smithy.private#InvalidOperationOutput`, in another namespace. | PrivateAccess
77
[ERROR] smithy.example#InvalidService: This shape has an invalid operation relationship that targets a private shape, `smithy.private#PrivateOperation`, in another namespace. | PrivateAccess
88
[ERROR] smithy.example#InvalidStructure$invalid: This shape has an invalid member_target relationship that targets a private shape, `smithy.private#PrivateString`, in another namespace. | PrivateAccess
9-
[ERROR] smithy.example#InvalidTraitApplication: This shape has an invalid trait relationship that targets a private shape, `smithy.private#privateTrait`, in another namespace. | PrivateAccess

smithy-model/src/test/resources/software/amazon/smithy/model/errorfiles/validators/private-access.json

-20
Original file line numberDiff line numberDiff line change
@@ -50,20 +50,6 @@
5050
}
5151
]
5252
},
53-
"smithy.example#InvalidTraitApplication": {
54-
"type": "structure",
55-
"members": {},
56-
"traits": {
57-
"smithy.private#privateTrait": {}
58-
}
59-
},
60-
"smithy.private#privateTrait": {
61-
"type": "structure",
62-
"traits": {
63-
"smithy.api#trait": {},
64-
"smithy.api#private": {}
65-
}
66-
},
6753
"smithy.private#InvalidOperationInput": {
6854
"type": "structure",
6955
"members": {
@@ -78,9 +64,6 @@
7864
},
7965
"map": {
8066
"target": "smithy.example#InvalidMap"
81-
},
82-
"traitApplication": {
83-
"target": "smithy.example#InvalidTraitApplication"
8467
}
8568
},
8669
"traits": {
@@ -102,9 +85,6 @@
10285
},
10386
"map": {
10487
"target": "smithy.example#InvalidMap"
105-
},
106-
"traitApplication": {
107-
"target": "smithy.example#InvalidTraitApplication"
10888
}
10989
},
11090
"traits": {

0 commit comments

Comments
 (0)