-
Notifications
You must be signed in to change notification settings - Fork 218
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Validation issue with nestedProperties
and member elision.
#2294
Comments
If I add |
I suspect the root issue here is that the |
Even adding a required trait does not help unfortunately. |
Same issue -- adding |
Thomas and Nate Care to provide a self-contained minimal model we can use to reproduce the issue? I just tried with this and validates just fine: $version: "2"
namespace com.example
string TenantId
resource TenantResource {
identifiers: { tenantId: TenantId }
read: GetTenant
}
@readonly
operation GetTenant {
input: GetTenantRequest
output: GetTenantResponse
}
@input
structure GetTenantRequest for TenantResource {
@required
$tenantId
}
@output
structure GetTenantResponse {
@required
@nestedProperties
@httpPayload
tenant: Tenant
}
structure Tenant for TenantResource {
$tenantId
} |
Sure, building off of @libre-man's starting point: $version: "2"
namespace com.example
string TenantId
resource TenantResource {
identifiers: { tenantId: TenantId }
properties: { name: String }
read: GetTenant
}
@readonly
operation GetTenant {
input := for TenantResource {
@required
$tenantId
}
output := for TenantResource {
@required
@nestedProperties
data: Tenant
}
}
structure Tenant for TenantResource {
$tenantId
$name
} example validation fail:
Notably, if I remove the Am using Smithy version 1.49.0. |
I don't think this is the same as libre-man's model. If you remove
but "When I remove the nestedProperties trait I don't get this error anymore." I found this issue because of the "Member data does not target" error. It may not be the same root cause as libre-man but I found closely reading Resource property binding validation to be very helpful in figuring out what was wrong. |
I have a resource like this:
And the following models:
When compiling this I get:
Member tenantId does not target a property or identifier for resource TenantResource
.When I remove the
nestedProperties
trait I don't get this error anymore.The text was updated successfully, but these errors were encountered: