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

Add docs about array path params #3877

Closed
kciesielski opened this issue Jun 27, 2024 · 1 comment
Closed

Add docs about array path params #3877

kciesielski opened this issue Jun 27, 2024 · 1 comment
Labels

Comments

@kciesielski
Copy link
Member

kciesielski commented Jun 27, 2024

Initial issue:
We'd like to allow path params like .path[List[T]]("paramName") (https://swagger.io/docs/specification/serialization/)
Related discussion on community forum: https://softwaremill.community/t/path-parameter-style-support/411
I don't think there's proper support for this in Tapir nor an issue already registered for this feature.

Update: Turns out it's feasible with Delimited, so this issue becomes a task to add documentation.

@kciesielski kciesielski added the enhancement New feature or request label Jun 27, 2024
@kciesielski
Copy link
Member Author

kciesielski commented Jun 28, 2024

Turns out this can be nicely handled with Delimited, as Thijs nicely noticed in the forum thread:

given Codec[String, Name, TextPlain] = Codec.parsedString(Name.unsafeApply)
  .validate(Name.given_Schema_Name.validator)
given Codec[String, Delimited[",", Name], TextPlain] = Codec.delimited

Let's update the documentation or examples then.

@kciesielski kciesielski added good first issue Good for newcomers documentation and removed enhancement New feature or request labels Jul 1, 2024
@kciesielski kciesielski changed the title Add support for array path params Add docs about array path params Jul 1, 2024
@adamw adamw closed this as completed Oct 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants