Support for path/query parameters
See original GitHub issueI am using strongly typed ids (currently with data class until inline class support is available):
@Serializable
data class UserId(val value: Long)
@Serializable
data class User(val id: UserId, val name: String)
interface UsersService {
@GET("users")
suspend fun getUsers(): List<User> // this works
@GET("users/{id}")
suspend fun getUser(@Path("id") id: UserId): User // this doesn't work, because the path is `.../users/UserId(value=1)`
}
Issue Analytics
- State:
- Created 3 years ago
- Reactions:2
- Comments:6
Top Results From Across the Web
What are Query Parameters (in API terms) - RapidAPI
Query parameters have unique attributes which help to define resources in a better way. Path parameters, on the other hand, have dynamic resources, ......
Read more >Working with Path and Query Parameters
Path and query parameters are supported in TIBCO BusinessWorks Container Edition REST APIs. Path parameters can be applied only at the root level...
Read more >Path and Query String Parameter Calls to a RESTful Web ...
For some services, path parameters offer a more descriptive and distinct style that enforce a specific way of querying resources, whereas old- ...
Read more >Query Parameters - FastAPI
All the same process that applied for path parameters also applies for query parameters: Editor support (obviously); Data "parsing"; Data validation ...
Read more >What are Path Parameters? Technical topics explained simply
Path parameters are request parameters attached to a URL that point to a specific REST API resource. The path parameter is separated from ......
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
this does not affect this library and it is not a bug either, but it is a misuse
@JakeWharton you can close this UNissue