mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-01-16 09:35:36 -05:00
Adding JSON and YML as valid extensions for OpenAPI/Swagger spec files (#17297)
* adding more openAPI spec types * Correcting extension stripping * PR feedback
This commit is contained in:
@@ -841,7 +841,7 @@ export class ProjectsController {
|
||||
}
|
||||
|
||||
const filters: { [name: string]: string[] } = {};
|
||||
filters[constants.specSelectionText] = ['yaml'];
|
||||
filters[constants.specSelectionText] = constants.openApiSpecFileExtensions;
|
||||
|
||||
let uris = await vscode.window.showOpenDialog({
|
||||
canSelectFiles: true,
|
||||
@@ -892,7 +892,8 @@ export class ProjectsController {
|
||||
}
|
||||
|
||||
outputFolder = folders[0].fsPath;
|
||||
projectName = path.basename(specPath, constants.yamlFileExtension);
|
||||
|
||||
projectName = path.basename(specPath, path.extname(specPath));
|
||||
newProjectFolder = path.join(outputFolder, projectName);
|
||||
|
||||
if (await utils.exists(newProjectFolder)) {
|
||||
|
||||
Reference in New Issue
Block a user