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

Migrate scaffolding form to use Scaffolding Service proxy via sidecar #879

Closed
wants to merge 1 commit into from

Conversation

rohitsanj
Copy link
Contributor

Summary of Changes

Any additional details or context that should be provided?

Pull request checklist

Please check if your PR fulfills the following (if applicable):

Tests
  • Added new
  • Updated existing
  • Deleted existing
Other
  • All new disposables (event listeners, views, channels, etc.) collected as for eventual cleanup?
  • Does anything in this PR need to be mentioned in the user-facing CHANGELOG or README?
  • Have you validated this change locally by packaging and installing the extension .vsix file?
    gulp clicktest

* @type {Array<string>}
* @memberof ScaffoldV1TemplateOption
*/
enum?: Array<string>;
Copy link
Contributor Author

@rohitsanj rohitsanj Jan 8, 2025

Choose a reason for hiding this comment

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

I had to rename this from _enum (duplicated) -> enum manually. Which means the next time we run npx gulp apigen my changes will be lost. We'll need to file a bug report with openapi-generator to figure out what's going on here.

@rohitsanj
Copy link
Contributor Author

rohitsanj commented Jan 9, 2025

Some notes:

  1. Scaffolding Service rejects requests that have bad options (values that don't adhere to the specified pattern) -- I think we should relax this constraint at the service level. End-users should not need to provide perfect values in first pass. Update: We will not be able to relax the constraints since this is a requirement put forth by our security team.
  2. Enforcing the pattern input attribute in the Scaffold HTML form means we'll have to be explicit about what the expected pattern is. Do users really care about what the expected regex pattern is for a given template option?
  3. It will likely take a non-trivial amount of code changes to surface validation errors returned from the sidecar (via Scaffolding Service) into the Scaffold HTML form. We could start by simply showing a error notification that lists all the errors like "Option 'api_key' must match pattern 'a-A..'" and so on, but again, this offers poor UX.

@rohitsanj
Copy link
Contributor Author

Decided to let vscode call scaffolding service directly without going through sidecar.

@rohitsanj rohitsanj closed this Jan 14, 2025
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.

1 participant