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: separated strings are not restored correctly #112

Merged
merged 6 commits into from
Jun 23, 2023
Merged

Conversation

Himenon
Copy link
Owner

@Himenon Himenon commented Jun 23, 2023

Summary

fix: #111

Test Plan

@@ -111,7 +111,7 @@ export const generateUrlTemplateExpression = (
} else {
urlTemplate.push({
type: "string",
value: value.startsWith("/") ? value : "/" + value,
Copy link
Owner Author

Choose a reason for hiding this comment

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

root cause

@Himenon Himenon changed the title fix: parse error fix: separated strings are not restored correctly. Jun 23, 2023
@Himenon Himenon marked this pull request as ready for review June 23, 2023 12:25
@Himenon Himenon changed the title fix: separated strings are not restored correctly. fix: separated strings are not restored correctly Jun 23, 2023
@@ -71,8 +71,8 @@ export const generateUrlTemplateExpression = (
Object.keys(patternMap).forEach(pathParameterName => {
if (new RegExp(pathParameterName).test(replacedText)) {
const { text, escaped } = escapeText(patternMap[pathParameterName]);
const variableDeclaraText = escaped ? `params.parameter[${text}]` : `params.parameter.${text}`;
Copy link
Owner Author

Choose a reason for hiding this comment

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

typo

@Himenon Himenon merged commit c4b47c8 into main Jun 23, 2023
2 checks passed
@Himenon Himenon deleted the fix/bug-111 branch June 23, 2023 12:33
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.

Bug: paths like /foo/{id}.json does not work
1 participant