softwaremill / tapir

Rapid development of self-documenting APIs

Home Page:https://tapir.softwaremill.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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

limpid-kzonix opened this issue · comments

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? 💥