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

Generate URL for oneToMany using comma separated style for many-array #170

Merged
merged 5 commits into from
Nov 27, 2024

Conversation

nilspenzel
Copy link
Contributor

By default hey-api's handling of arrays when generating the URL for an API call does not adhere to the format prescribed by MOTIS.

@@ -7,3 +7,31 @@ export const coordinatesToStr = (c: Coordinates) => {
export const coordinatesToPlace = (c: Coordinates) => {
return `${c.lat},${c.lng},0`;
};

export const customQuerySerializer = (params: Record<string, unknown>): string => {
Copy link
Member

Choose a reason for hiding this comment

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

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Ich hatte die Option nicht gesehen, stimmt das ist deutlich einfacher und erfüllt den selben Zweck

@felixguendling felixguendling merged commit 8e3357e into master Nov 27, 2024
2 checks passed
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.

2 participants