You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
10 lines
477 B
10 lines
477 B
#!/bin/bash |
|
set -euo pipefail |
|
curl -sf http://127.0.0.1:8091/api-docs/openapi.json | python3 -c " |
|
import sys, json |
|
d = json.load(sys.stdin) |
|
paths = [p for p in d.get('paths', {}) if 'project-search' in p] |
|
scopes = d.get('components', {}).get('securitySchemes', {}).get('oauth2ClientCredentials', {}).get('flows', {}).get('clientCredentials', {}).get('scopes', {}) |
|
print('project-search paths:', paths) |
|
print('project-search:read in scopes:', 'project-search:read' in scopes) |
|
"
|
|
|