Skip to content

Commit

Permalink
chore: update operations on overwrite
Browse files Browse the repository at this point in the history
  • Loading branch information
CristiCanizales committed Jan 18, 2025
1 parent d2ff258 commit ab13b97
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -260,7 +260,12 @@ export class ApexActionController {
if (jsonObj.ExternalServiceRegistration?.schema) {
jsonObj.ExternalServiceRegistration.schema = safeOasSpec;
} else {
throw new Error('schema_element_not_found');
throw new Error(nls.localize('schema_element_not_found'));
}
if (jsonObj.ExternalServiceRegistration?.operations.ExternalServiceOperation) {
jsonObj.ExternalServiceRegistration.operations.ExternalServiceOperation = operations;
} else {
throw new Error(nls.localize('operations_element_not_found'));
}
} else {
// Create a new XML structure
Expand Down
1 change: 1 addition & 0 deletions packages/salesforcedx-vscode-apex/src/messages/i18n.ja.ts
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,7 @@ export const messages = {
registry_access_failed: 'Failed to retrieve ESR directory name from the registry.',
full_path_failed: 'Failed to determine the full path for the OpenAPI document.',
schema_element_not_found: 'The <schema> element was not found in the provided XML.',
operations_element_not_found: 'The <operations> element was not found in the provided XML.',
error_retrieving_org_version: 'Failed to retrieve org version',
error_parsing_yaml: 'Error parsing YAML'
};
1 change: 1 addition & 0 deletions packages/salesforcedx-vscode-apex/src/messages/i18n.ts
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,7 @@ export const messages = {
registry_access_failed: 'Failed to retrieve ESR directory name from the registry.',
full_path_failed: 'Failed to determine the full path for the OpenAPI document.',
schema_element_not_found: 'The <schema> element was not found in the provided XML.',
operations_element_not_found: 'The <operations> element was not found in the provided XML.',
error_retrieving_org_version: 'Failed to retrieve org version',
error_parsing_yaml: 'Error parsing YAML'
};

0 comments on commit ab13b97

Please sign in to comment.