softwaremill / softwaremill/tapir

Enchancement of the Endpoint DSL to support multiple path variables or combination of path variable and literal within single path segment

Open
#3,747 0 comments 4 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Scala
Stars
1.5k
Forks
468
Avg merge
5h 37m
Merged PRs (30d)
34

Description

The details are described here - https://softwaremill.community/t/how-to-handle-extraction-of-two-or-more-variables-within-single-path-segment/367/1

  • multiple path variables and literals in the same path segment, e.g., /people/{firstName}-{lastName}/SSN
  • path variable and literal within the same path segment, e.g. ,people/{firstName}-some-literal/SSN or /people/some-literal-{firstName}/SSN

The main objective is to partially support the capabilities described by RFC-6570 URI template spec.

Many other frameworks, including Micronaut, Spring, Quarkus, ktor, dotnet, actix-web, implement the URI template specification in some way. In the Scala ecosystem, we do not have the support of such things in any framework or library.

This limitation prevents users from defining the Resource-Oriented API (specifically custom methods of API-136) with good OpenAPI spec
image

Imagine Tapir becoming the Chuck Norris of Scala routing 😎, leaving all other frameworks in the dust with this killer feature. Plus, it would totally align with the cool kids in other ecosystems 🔥

💥 How awesome would that be? 💥

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with Tapir's Endpoint DSL and review the linked community discussion alongside RFC-6570. Define how multiple variables and literals in one path segment should be represented, including the examples in the issue, and verify that the resulting endpoints support the stated OpenAPI use case.

Written by the indexing model from the issue text.

Assessment

Tech stack
scala
Domain
api
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.