Closed j-d-carmichael closed 2 years ago
src/paths/user/{email}/lists/get.yml
GET We know the http verb is a kind of action, get, create, update and "update a little bit of" LISTS is the thing we get {email} When {} we know we have a variable, so in English "for $var" usually will make sense user is the harder bit.. specially if there are more
For example this is a harder one
src/paths/user/{email}/action/lists/get.yml
or
src/paths/item/{id}/comment/{id}/like/post.yml
Will be interesting to build a series of potentials on here and see :)
Simplified with idea from @p-mcgowan just grab the last url segment and expose to the tpl engine
{{ segments.first }}
{{ segments.secondLast }}
{{ segments.last }}
{{ segments[n] }}
{{ verb }}
then you could just stick that in the injector or wherever else
https://github.com/j-d-carmichael/boats/blob/main/src/nunjucksHelpers/autoSummary.ts
Human sentence version released
nice.. the tag is a helper and added to the inject helper.. as is the opid etc etc.
But summary is not and it is a pain to manually write this out when the rolder structure should basically be doing this for us.
eg
src/paths/user/{email}/lists/get.yml
Could equate to
Get lists for {email} for users