Skip to content

Commit f191a88

Browse files
Update lookup script
Signed-off-by: Lukasz Gryglicki <[email protected]> Assisted by [OpenAI](https://platform.openai.com/) Assisted by [GitHub Copilot](https://github.com/features/copilot)
1 parent 93f52ac commit f191a88

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

utils/count_apis.sh

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,15 @@ jq -r '
1515
| select(.) # drop non-matches
1616
| .p
1717
' "${1}" \
18+
| sed -E 's#/{2,}#/#g' \
19+
| sed -E 's#/$##' \
20+
| sed -E 's#\.(png|svg|css|js|json|xml)$#.<asset>#g' \
21+
| sed -E 's#^/v[0-9]+/swagger\.<asset>$#/v*/swagger#g' \
22+
| sed -E 's#^/v[0-9]+/api-docs$#/v*/api-docs#g' \
23+
| sed -E 's#^/v[0-9]+/(api/)?graphql(\.php)?$#/v*/graphql#g' \
24+
| sed -E 's#^/v[0-9]+/graph(i)?ql(/.*)?$#/v*/graphiql#g' \
25+
| sed -E 's#^/v[0-9]+/(explorer|console|playground|altair)$#/v*/graphql-ui#g' \
26+
| sed -E 's#/([A-Za-z0-9]{5,8})(/|$)#/<shortid>\2#g' \
1827
| sed -E 's/[0-9a-fA-F-]{36}/<uuid>/g' \
1928
| sed -E ':a;s#/([0-9]{1,})(/|$)#/<id>\2#g;ta' \
2029
| sed -E 's#/(00|a0)[A-Za-z0-9]{13,16}(/|$)#/<sfid>\2#g' \

0 commit comments

Comments
 (0)