Skip to content

feat: support autofilling of sdkClassName and packageName #1373

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

Merged
merged 1 commit into from
Apr 7, 2025

Conversation

adaam2
Copy link
Member

@adaam2 adaam2 commented Apr 7, 2025

What

Adds support to the quickstart command to automatically fill the settings values for sdkClassName and packageName from a session in the Speakeasy Sandbox (sandbox.speakeasy.com)

Demo

CleanShot.2025-04-07.at.12.54.49.mp4

@adaam2 adaam2 force-pushed the fix/schema-store-additional-fields branch from d8d0aa3 to 609cb7c Compare April 7, 2025 11:59
@adaam2 adaam2 requested review from chase-crumbaugh and bflad April 7, 2025 11:59
@@ -308,19 +310,26 @@ func getValuesForField(
if field.Description != nil {
description = *field.Description
}
if field.Name == "packageName" && isQuickstart && sdkClassName != "" {
if field.Name == "packageName" && isQuickstart {
Copy link
Member

Choose a reason for hiding this comment

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

What is the significance of omitting sdkClassName from this if?

Copy link
Member Author

Choose a reason for hiding this comment

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

Means that it will be shown by default which I think is ok

packageName := sdkClassName

if quickstart.IsUsingTemplate && quickstart.Defaults.TemplateData != nil {
packageName = quickstart.Defaults.TemplateData.PackageName
Copy link
Member

Choose a reason for hiding this comment

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

Is packageName never empty/default? Do we want to prefer sdkClassName if they didn't choose a specific packageName? Maybe not

Copy link
Member Author

Choose a reason for hiding this comment

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

No i dont think so - we do prefer it currently - this is just the case of using a template.

@adaam2 adaam2 merged commit 8e794c0 into main Apr 7, 2025
4 checks passed
@adaam2 adaam2 deleted the fix/schema-store-additional-fields branch April 7, 2025 16:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants