Skip to content

In version 1.67.0 the generated docs stopped including examples #149

@zfz7

Description

@zfz7

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:

Image

Can we continue to support the @example trait during the doc gen process?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions