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

Fix(1429): Typing full URI in Endpoint's name generates bad YAML #1467

Closed
wants to merge 2 commits into from

Conversation

shivamG640
Copy link
Contributor

Fixes #1429

Copy link

codecov bot commented Sep 23, 2024

Codecov Report

Attention: Patch coverage is 87.50000% with 1 line in your changes missing coverage. Please review.

Please upload report for BASE (main@52f28a5). Learn more about missing BASE report.

Files with missing lines Patch % Lines
...on/flows/support/camel-component-schema.service.ts 85.71% 1 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##             main    #1467   +/-   ##
=======================================
  Coverage        ?   68.64%           
  Complexity      ?       25           
=======================================
  Files           ?      269           
  Lines           ?     7722           
  Branches        ?     1537           
=======================================
  Hits            ?     5301           
  Misses          ?     2372           
  Partials        ?       49           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@@ -109,7 +109,7 @@ export class CamelUriHelper {
queryString?.split('&').reduce((parameters, parameter) => {
if (parameter) {
const [key, stringValue] = parameter.split('=');
parameters[key] = getParsedValue(stringValue);
if (isDefined(stringValue) && stringValue !== '') parameters[key] = getParsedValue(stringValue);
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
if (isDefined(stringValue) && stringValue !== '') parameters[key] = getParsedValue(stringValue);
if (isDefined(stringValue) && stringValue !== '') {
parameters[key] = getParsedValue(stringValue);
}

Object.entries(CamelUriHelper.getParametersFromQueryString(queryUri)).reduce((parameters, parameter) => {
if (parameter) {
const [key, stringValue] = parameter;
if (catalogLookup.definition?.properties[key]) parameters[key] = stringValue;
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
if (catalogLookup.definition?.properties[key]) parameters[key] = stringValue;
if (catalogLookup.definition?.properties[key]) {
parameters[key] = stringValue;
}

}

return parameters;
}, {} as ParsedParameters) ?? {};
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
}, {} as ParsedParameters) ?? {};
}, {} as ParsedParameters);

Copy link

Quality Gate Failed Quality Gate failed

Failed conditions
22.1% Duplication on New Code (required ≤ 20%)

See analysis details on SonarCloud

@shivamG640 shivamG640 closed this Sep 30, 2024
@shivamG640
Copy link
Contributor Author

Created new PR : #1493

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.

Typing full URI in Endpoint's name generates bad YAML
2 participants