We have been using smithy-docgen to distribute API documentation to our customers. As apart of these docs we have invested quite heavily in the @example trait.
apply CreateCard @examples([
{
title: "Create a simple card"
input: { recipientDeviceId: "device-456", message: "Wish you were here!", scheduledAt: "2024-02-01T09:00:00Z" }
output: { cardId: "cd-1234567890abcdef1", status: "DRAFT", recipientDeviceId: "device-456", message: "Wish you were here!", createdAt: "2024-01-15T10:00:00Z", updatedAt: "2024-01-15T10:00:00Z", scheduledAt: "2024-02-01T09:00:00Z" }
}
{
title: "Create a card with location"
input: { recipientDeviceId: "device-789", message: "Greetings from the coast!", location: "Santa Monica, CA", scheduledAt: "2024-02-01T09:00:00Z" }
output: { cardId: "cd-abcdef1234567890a", status: "DRAFT", recipientDeviceId: "device-789", message: "Greetings from the coast!", location: "Santa Monica, CA", createdAt: "2024-01-15T10:00:00Z", updatedAt: "2024-01-15T10:00:00Z", scheduledAt: "2024-02-01T09:00:00Z" }
}
{
title: "Create a scheduled card"
input: { recipientDeviceId: "device-123", message: "Happy Birthday!", scheduledAt: "2024-02-01T09:00:00Z" }
output: { cardId: "cd-0123456789abcdef0", status: "DRAFT", recipientDeviceId: "device-123", message: "Happy Birthday!", scheduledAt: "2024-02-01T09:00:00Z", createdAt: "2024-01-15T10:00:00Z", updatedAt: "2024-01-15T10:00:00Z" }
}
])
In version 1.66.0 and below these traits would show up in the docs like:
Can we continue to support the @example trait during the doc gen process?
We have been using
smithy-docgento distribute API documentation to our customers. As apart of these docs we have invested quite heavily in the@exampletrait.In version 1.66.0 and below these traits would show up in the docs like:
Can we continue to support the
@exampletrait during the doc gen process?