question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Support for path/query parameters

See original GitHub issue

I 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:open
  • Created 3 years ago
  • Reactions:2
  • Comments:6

github_iconTop GitHub Comments

3reactions
xanscalecommented, Nov 16, 2021

this does not affect this library and it is not a bug either, but it is a misuse

1reaction
xanscalecommented, May 2, 2022

@JakeWharton you can close this UNissue

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found