mirror of
https://github.com/netbirdio/docs.git
synced 2026-04-19 17:06:36 +00:00
Change API parser to handle nested objects (#159)
* rewrite parser to handle new format and nested objects * add properties section also to nested properties * update docs manually
This commit is contained in:
@@ -29,6 +29,8 @@ export const apiNavigation = [
|
||||
{ title: 'Groups', href: '/api/resources/groups' },
|
||||
{ title: 'Rules', href: '/api/resources/rules' },
|
||||
{ title: 'Policies', href: '/api/resources/policies' },
|
||||
{ title: 'Posture-Checks', href: '/api/resources/posture-checks' },
|
||||
{ title: 'Geo-Locations', href: '/api/resources/geo-locations' },
|
||||
{ title: 'Routes', href: '/api/resources/routes' },
|
||||
{ title: 'DNS', href: '/api/resources/dns' },
|
||||
{ title: 'Events', href: '/api/resources/events' },
|
||||
|
||||
@@ -98,12 +98,12 @@ export function Property({ name, type, required, min, max, minLen, maxLen, enumL
|
||||
{type}
|
||||
</dd>
|
||||
<dt className="sr-only">Required</dt>
|
||||
<dd className="font-mono text-xs text-red-600 dark:text-red-600">
|
||||
{required && 'required'}
|
||||
</dd>
|
||||
<dd className="font-mono text-xs text-zinc-400 dark:text-zinc-500">
|
||||
{!required && 'optional'}
|
||||
</dd>
|
||||
{required && <dd className="font-mono text-xs text-red-600 dark:text-red-600">
|
||||
required
|
||||
</dd>}
|
||||
{!required && <dd className="font-mono text-xs text-zinc-400 dark:text-zinc-500">
|
||||
optional
|
||||
</dd>}
|
||||
<dt className="sr-only">Enum</dt>
|
||||
<dd className="w-full flex-none [&>:first-child]:mt-0 [&>:last-child]:mb-0">
|
||||
{/*{enumList && "Possible values: [" + enumList.split(',').forEach((type) => (<tag>{type}</tag>)) + "]"}*/}
|
||||
|
||||
Reference in New Issue
Block a user