Swagger Definition
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-05-2023
08:17 AM
06-05-2023
08:17 AM
Swagger Definition
What is best practice to use query parameters or path parameters?
1 REPLY 1
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-14-2023
08:30 AM
06-14-2023
08:30 AM
Hi @Akanksha11
What's the use case?
A general rule of thumb for RESTful style APIs is to use path parameters to identify a specific resource (perhaps even resources), while query parameters are used to filter or sort the data returned for those resources.
Check out https://swagger.io/docs/specification/describing-parameters/ for some examples
Cheers,
Frank
