-
Notifications
You must be signed in to change notification settings - Fork 13
/
Copy pathsearch_endpoints.json
33 lines (32 loc) · 1.16 KB
/
search_endpoints.json
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
---
layout: null
---
[
{%- assign sortedEndpoints = site.data.config-api-endpoints | sort:"path" -%}
{%- assign reposNoInterface = site.data.repos-no-interface -%}
{%- assign counter = 0 -%}
{%- for endpoint in sortedEndpoints -%}
{%- assign counter = counter | plus: 1 -%}
{%- assign docId = endpoint.path | append: "-" | append: counter | slugify -%}
{%- assign interface = endpoint.interface | strip -%}
{%- if interface == '' -%}
{%- if reposNoInterface contains endpoint.name or endpoint.name contains 'edge-'-%}
{%- assign interface = "[not relevant]" -%}
{%- elsif endpoint.name == 'okapi' -%}
{%- assign interface = 'okapi' -%}
{%- else -%}
{%- assign interface = "[not found in ModuleDescriptor]" -%}
{%- endif -%}
{%- endif -%}
{
"id": "{{ docId }}",
"moduleName": "{{ endpoint.name }}",
"path": "{{ endpoint.path }}",
"interface": "{{ interface }}",
"methods": "{{ endpoint.methods }}",
"apiDescription": "{{ endpoint.apiDescription }}",
"apiType": "{{ endpoint.apiType | upcase }}"
}
{%- unless forloop.last -%},{%- endunless -%}
{%- endfor -%}
]