Skip to content

Commit

Permalink
Type the fetch.resource more tightly to locations.
Browse files Browse the repository at this point in the history
Part of #45.
  • Loading branch information
jkomoros committed Jul 22, 2023
1 parent ed4d9b2 commit d361251
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
9 changes: 8 additions & 1 deletion seed-schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -1816,7 +1816,14 @@
"$ref": "#/definitions/seedData/anyOf/0/properties/prompt/anyOf/1"
},
{
"type": "string",
"anyOf": [
{
"$ref": "#/definitions/seedData/anyOf/0/properties/prompt/anyOf/1/properties/packet/anyOf/0"
},
{
"$ref": "#/definitions/seedData/anyOf/0/properties/prompt/anyOf/1/properties/packet/anyOf/1"
}
],
"description": "The URL of the resource to fetch"
}
]
Expand Down
2 changes: 1 addition & 1 deletion src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -698,7 +698,7 @@ export type FetchMethod = z.infer<typeof fetchMethod>;
const seedDataConfigFetch = {
type: z.literal('fetch'),
properties: {
resource: z.string().describe('The URL of the resource to fetch'),
resource: seedPacketLocation.describe('The URL of the resource to fetch'),
method: fetchMethod.optional().describe('The method (default GET)'),
body: z.string().optional().describe('The body to pass')
}
Expand Down

0 comments on commit d361251

Please sign in to comment.