-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Closed
Closed
Copy link
Labels
developer-experienceIssues affecting ease of use and overall experience of LB usersIssues affecting ease of use and overall experience of LB usersspike
Milestone
Description
Originated from #2208.
Description
swagger-ui, the library powering our API Explorer, unfortunately does not support complex objects in query strings. This spike is to investigate if/how we can allow it.
Extracting from #2208 (comment) from @bajtos
Based on OAI/OpenAPI-Specification#1706 (comment) (cross-posted below), maybe we can switch filter encoding from deepObject style into JSON?
Here is an experiment we can try:
- Let's keep @param.query.object with no changes for backwards compatibility.
- Introduce a new helper @param.query.jsonObject that will use JSON encoding instead of deepObject style.
- Modify the function parseJsonIfNeeded to detect JSON encoding and parse the string value - see packages/rest/src/coercion/coerce-parameter.ts
- Update our example Todo controller to use @param.query.jsonObject - see examples/todo/src/controllers/todo.controller.ts
- Start the Todo app, open API Explorer and check how is the filter parameter handled.
Acceptance Criteria
- [ ] Review the workaround posted by various users in #2208
- Try out the experiment from @bajtos (listed above)
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
developer-experienceIssues affecting ease of use and overall experience of LB usersIssues affecting ease of use and overall experience of LB usersspike