Open tobywf opened 5 years ago
Example from EC2 in the deeplink package:
image({ region }) {
return `/ec2/v2/home?region=${region}#Images:sort=name`
},
instance({ region, resource }) {
return `/ec2/home?region=${region}#Instances:instanceId=${resource}`;
},
Proposal for adding this to a schema:
{
[...]
"deeplink": {
"mapping": {
"instanceId": "#/InstanceId"
},
"template": "https://{region}.console.aws.amazon.com/ec2/v2/home?region={region}#Instances:instanceId=${instanceId}"
}
}
where mapping
maps a simple key to a JSON pointer (URI fragment or not?) which can be applied to a resource blob, or empty if not required. global variables like region
don't need to be mapped.
Open questions:
going to move this to the schema repo for better tracking
Add an e.g.
deepLink
property to the schema that allows generating links to a resource givenidentifiers
. This is useful for the console.