Skip to content
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

feat(typescript): Add support for explicit null in snippets #5672

Merged
merged 15 commits into from
Jan 21, 2025

Conversation

amckinney
Copy link
Member

This updates the dynamic snippet generators to support the new nullable container type introduced in #5601. With this, the dynamic snippets API will render null values when the property is nullable like so:

import { AcmeClient } from "acme";

async function main() {
    const client = new AcmeClient({
        environment: "https://api.example.com",
    });
    await client.users.create({
        username: "john.doe",
        tags: [
            "admin",
        ],
        metadata: {
            avatar: null,
            activated: null,
        },
        avatar: null,
    });
}
main();

@amckinney amckinney requested a review from dsinghvi as a code owner January 20, 2025 22:56
Copy link
Member

@Swimburger Swimburger left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

TS part LGTM

@amckinney amckinney merged commit 2f2fd5f into main Jan 21, 2025
50 checks passed
@amckinney amckinney deleted the amckinney/dynamic-snippets-null branch January 21, 2025 05:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants