Skip to content

Commit

Permalink
chore: remove comments
Browse files Browse the repository at this point in the history
  • Loading branch information
adaam2 committed Nov 22, 2024
1 parent 53ba07e commit 317a18e
Showing 1 changed file with 0 additions and 5 deletions.
5 changes: 0 additions & 5 deletions prompts/sources.go
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,6 @@ func sourceBaseForm(ctx context.Context, quickstart *Quickstart) (*QuickstartSta
}
}

// Determine the file location based on existing values or user input.
if quickstart.Defaults.SchemaPath != nil {
fileLocation = *quickstart.Defaults.SchemaPath
} else if useRemoteSource && selectedRegistryUri != "" {
Expand All @@ -218,7 +217,6 @@ func sourceBaseForm(ctx context.Context, quickstart *Quickstart) (*QuickstartSta
}
}

// Process the file location and set other fields accordingly.
orgSlug := auth.GetOrgSlugFromContext(ctx)
isUsingSampleSpec := strings.TrimSpace(fileLocation) == ""
if isUsingSampleSpec {
Expand All @@ -233,21 +231,18 @@ func sourceBaseForm(ctx context.Context, quickstart *Quickstart) (*QuickstartSta
sourceName = quickstart.SDKName + "-OAS"
}

// Prepare the source with the provided document.
document, err := formatDocument(fileLocation, authHeader, false)
if err != nil {
return nil, err
}
source.Inputs = append(source.Inputs, *document)

// If registry is enabled, create a registry entry.
if registry.IsRegistryEnabled(ctx) && orgSlug != "" && auth.GetWorkspaceSlugFromContext(ctx) != "" {
if err := configureRegistry(source, orgSlug, auth.GetWorkspaceSlugFromContext(ctx), sourceName); err != nil {
return nil, err
}
}

// Validate the source and set it to the quickstart.
if err := source.Validate(); err != nil {
return nil, errors.Wrap(err, "failed to validate source")
}
Expand Down

0 comments on commit 317a18e

Please sign in to comment.