-
Notifications
You must be signed in to change notification settings - Fork 0
Fix --json-path scoping and validation for URL inputs #219
Copy link
Copy link
Open
Labels
priority:mediumShould be done soonShould be done soonsize:sSmall — 1 to 4 hoursSmall — 1 to 4 hoursstaleInactive issue — review in next refinementInactive issue — review in next refinementstatus:readyRefined and ready for sprint selectionRefined and ready for sprint selectiontype:bugSomething isn't workingSomething isn't working
Description
Activity
Metadata
Metadata
Assignees
Labels
priority:mediumShould be done soonShould be done soonsize:sSmall — 1 to 4 hoursSmall — 1 to 4 hoursstaleInactive issue — review in next refinementInactive issue — review in next refinementstatus:readyRefined and ready for sprint selectionRefined and ready for sprint selectiontype:bugSomething isn't workingSomething isn't working
Problem
--json-pathalready selects the nested array used as rows for JSON input, but its current validation does not correctly account for per-URL--input-format.This valid command can fail because
-I jsonis attached to the preceding URL while--json-pathvalidation checks only the global input format:sql-pipe --url https://api.example.com/items -I json --json-path data.items 'SELECT * FROM url0'--json-pathis also global, while--input-formatand--http-headersupport per-URL configuration.Proposed Behavior
--json-pathafter a--urlapplies to that URL.--json-pathbefore any URL remains the global value for files and stdin.sql-pipe --url users=https://api.example.com/users -I json --json-path data.users --url orders=https://api.example.com/orders -I json --json-path results.orders 'SELECT * FROM users JOIN orders ON users.id = orders.user_id'Acceptance Criteria
UrlInput.--url ... -I json --json-path ....--json-pathis omitted.References
--json-path.