mirror of
https://github.com/netbirdio/docs.git
synced 2026-05-04 08:16:35 +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:
@@ -157,18 +157,20 @@ echo $response;
|
||||
|
||||
</CodeGroup>
|
||||
|
||||
|
||||
|
||||
<CodeGroup title="Response">
|
||||
|
||||
<CodeGroup title="Response">
|
||||
```json {{ title: 'Example' }}
|
||||
[
|
||||
{
|
||||
"id": "chacbco6lnnbn6cg5s90",
|
||||
"name": "stage-host-1",
|
||||
"ip": "10.64.0.1",
|
||||
"connection_ip": "35.64.0.1",
|
||||
"connected": true,
|
||||
"last_seen": "2023-05-05T10:05:26.420578Z",
|
||||
"os": "Darwin 13.2.1",
|
||||
"kernel_version": "23.2.0",
|
||||
"geoname_id": 2643743,
|
||||
"version": "0.14.0",
|
||||
"groups": [
|
||||
{
|
||||
@@ -187,6 +189,8 @@ echo $response;
|
||||
"login_expired": false,
|
||||
"last_login": "2023-05-05T09:00:35.477782Z",
|
||||
"approval_required": true,
|
||||
"country_code": "DE",
|
||||
"city_name": "Berlin",
|
||||
"accessible_peers_count": 5
|
||||
}
|
||||
]
|
||||
@@ -197,9 +201,12 @@ echo $response;
|
||||
"id": "string",
|
||||
"name": "string",
|
||||
"ip": "string",
|
||||
"connection_ip": "string",
|
||||
"connected": "boolean",
|
||||
"last_seen": "string",
|
||||
"os": "string",
|
||||
"kernel_version": "string",
|
||||
"geoname_id": "integer",
|
||||
"version": "string",
|
||||
"groups": [
|
||||
{
|
||||
@@ -218,17 +225,16 @@ echo $response;
|
||||
"login_expired": "boolean",
|
||||
"last_login": "string",
|
||||
"approval_required": "boolean",
|
||||
"country_code": "string",
|
||||
"city_name": "string",
|
||||
"accessible_peers_count": "integer"
|
||||
}
|
||||
]
|
||||
```
|
||||
</CodeGroup>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</Col>
|
||||
</CodeGroup>
|
||||
|
||||
|
||||
</Col>
|
||||
</Row>
|
||||
|
||||
---
|
||||
@@ -397,17 +403,19 @@ echo $response;
|
||||
|
||||
</CodeGroup>
|
||||
|
||||
|
||||
|
||||
<CodeGroup title="Response">
|
||||
|
||||
<CodeGroup title="Response">
|
||||
```json {{ title: 'Example' }}
|
||||
{
|
||||
"id": "chacbco6lnnbn6cg5s90",
|
||||
"name": "stage-host-1",
|
||||
"ip": "10.64.0.1",
|
||||
"connection_ip": "35.64.0.1",
|
||||
"connected": true,
|
||||
"last_seen": "2023-05-05T10:05:26.420578Z",
|
||||
"os": "Darwin 13.2.1",
|
||||
"kernel_version": "23.2.0",
|
||||
"geoname_id": 2643743,
|
||||
"version": "0.14.0",
|
||||
"groups": [
|
||||
{
|
||||
@@ -426,6 +434,8 @@ echo $response;
|
||||
"login_expired": false,
|
||||
"last_login": "2023-05-05T09:00:35.477782Z",
|
||||
"approval_required": true,
|
||||
"country_code": "DE",
|
||||
"city_name": "Berlin",
|
||||
"accessible_peers": [
|
||||
{
|
||||
"id": "chacbco6lnnbn6cg5s90",
|
||||
@@ -442,9 +452,12 @@ echo $response;
|
||||
"id": "string",
|
||||
"name": "string",
|
||||
"ip": "string",
|
||||
"connection_ip": "string",
|
||||
"connected": "boolean",
|
||||
"last_seen": "string",
|
||||
"os": "string",
|
||||
"kernel_version": "string",
|
||||
"geoname_id": "integer",
|
||||
"version": "string",
|
||||
"groups": [
|
||||
{
|
||||
@@ -463,6 +476,8 @@ echo $response;
|
||||
"login_expired": "boolean",
|
||||
"last_login": "string",
|
||||
"approval_required": "boolean",
|
||||
"country_code": "string",
|
||||
"city_name": "string",
|
||||
"accessible_peers": [
|
||||
{
|
||||
"id": "string",
|
||||
@@ -474,13 +489,10 @@ echo $response;
|
||||
]
|
||||
}
|
||||
```
|
||||
</CodeGroup>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</Col>
|
||||
</CodeGroup>
|
||||
|
||||
|
||||
</Col>
|
||||
</Row>
|
||||
|
||||
---
|
||||
@@ -501,36 +513,30 @@ echo $response;
|
||||
</Properties>
|
||||
|
||||
#### Request-Body Parameters
|
||||
<Properties>
|
||||
|
||||
<Properties><Property name="name" type="string" required={true}>
|
||||
|
||||
<Property name="name" type="string" required={true}
|
||||
|
||||
|
||||
>
|
||||
|
||||
</Property>
|
||||
|
||||
|
||||
<Property name="ssh_enabled" type="boolean" required={true}
|
||||
|
||||
|
||||
>
|
||||
|
||||
</Property>
|
||||
</Property>
|
||||
<Property name="ssh_enabled" type="boolean" required={true}>
|
||||
|
||||
<Property name="login_expiration_enabled" type="boolean" required={true}
|
||||
|
||||
|
||||
>
|
||||
|
||||
</Property>
|
||||
|
||||
|
||||
<Property name="approval_required" type="boolean" required={false}
|
||||
|
||||
|
||||
>
|
||||
(Cloud only) Indicates whether peer needs approval
|
||||
</Property>
|
||||
</Properties>
|
||||
</Property>
|
||||
<Property name="login_expiration_enabled" type="boolean" required={true}>
|
||||
|
||||
|
||||
|
||||
</Property>
|
||||
<Property name="approval_required" type="boolean" required={false}>
|
||||
|
||||
(Cloud only) Indicates whether peer needs approval
|
||||
|
||||
</Property>
|
||||
</Properties>
|
||||
|
||||
|
||||
</Col>
|
||||
|
||||
<Col sticky>
|
||||
@@ -729,17 +735,19 @@ echo $response;
|
||||
|
||||
</CodeGroup>
|
||||
|
||||
|
||||
|
||||
<CodeGroup title="Response">
|
||||
|
||||
<CodeGroup title="Response">
|
||||
```json {{ title: 'Example' }}
|
||||
{
|
||||
"id": "chacbco6lnnbn6cg5s90",
|
||||
"name": "stage-host-1",
|
||||
"ip": "10.64.0.1",
|
||||
"connection_ip": "35.64.0.1",
|
||||
"connected": true,
|
||||
"last_seen": "2023-05-05T10:05:26.420578Z",
|
||||
"os": "Darwin 13.2.1",
|
||||
"kernel_version": "23.2.0",
|
||||
"geoname_id": 2643743,
|
||||
"version": "0.14.0",
|
||||
"groups": [
|
||||
{
|
||||
@@ -758,6 +766,8 @@ echo $response;
|
||||
"login_expired": false,
|
||||
"last_login": "2023-05-05T09:00:35.477782Z",
|
||||
"approval_required": true,
|
||||
"country_code": "DE",
|
||||
"city_name": "Berlin",
|
||||
"accessible_peers": [
|
||||
{
|
||||
"id": "chacbco6lnnbn6cg5s90",
|
||||
@@ -774,9 +784,12 @@ echo $response;
|
||||
"id": "string",
|
||||
"name": "string",
|
||||
"ip": "string",
|
||||
"connection_ip": "string",
|
||||
"connected": "boolean",
|
||||
"last_seen": "string",
|
||||
"os": "string",
|
||||
"kernel_version": "string",
|
||||
"geoname_id": "integer",
|
||||
"version": "string",
|
||||
"groups": [
|
||||
{
|
||||
@@ -795,6 +808,8 @@ echo $response;
|
||||
"login_expired": "boolean",
|
||||
"last_login": "string",
|
||||
"approval_required": "boolean",
|
||||
"country_code": "string",
|
||||
"city_name": "string",
|
||||
"accessible_peers": [
|
||||
{
|
||||
"id": "string",
|
||||
@@ -806,13 +821,10 @@ echo $response;
|
||||
]
|
||||
}
|
||||
```
|
||||
</CodeGroup>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</Col>
|
||||
</CodeGroup>
|
||||
|
||||
|
||||
</Col>
|
||||
</Row>
|
||||
|
||||
---
|
||||
@@ -974,11 +986,9 @@ echo $response;
|
||||
|
||||
</CodeGroup>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</Col>
|
||||
|
||||
|
||||
</Col>
|
||||
</Row>
|
||||
|
||||
---
|
||||
|
||||
Reference in New Issue
Block a user