mirror of
https://github.com/netbirdio/docs.git
synced 2026-04-21 09:56:35 +00:00
Add workflow for api gen and refactor genration script (#60)
* update gitignore * add first version of api generation flow * try to run flow * testing flow * update gen flow * switch flow to macOS * fix * add npm install * test workflow * Update API pages * test workflow with current main * refactor parser * merge examples and schema functions * merge examples and schema functions * merge parameters as well * revert template to single class component * update account * finalizing * update with the newest version of openapi * full flow * update * add docker command * split flow in two jobs * remove testing trigger --------- Co-authored-by: GitHub Actions <no-reply@github.com>
This commit is contained in:
@@ -1,4 +1,3 @@
|
||||
|
||||
export const title = 'Users'
|
||||
|
||||
|
||||
@@ -181,7 +180,8 @@ echo $response;
|
||||
"devs"
|
||||
],
|
||||
"is_current": true,
|
||||
"is_service_user": false
|
||||
"is_service_user": false,
|
||||
"is_blocked": false
|
||||
}
|
||||
]
|
||||
```
|
||||
@@ -197,7 +197,8 @@ echo $response;
|
||||
"string"
|
||||
],
|
||||
"is_current": "boolean",
|
||||
"is_service_user": "boolean"
|
||||
"is_service_user": "boolean",
|
||||
"is_blocked": "boolean"
|
||||
}
|
||||
]
|
||||
```
|
||||
@@ -490,7 +491,8 @@ echo $response;
|
||||
"devs"
|
||||
],
|
||||
"is_current": true,
|
||||
"is_service_user": false
|
||||
"is_service_user": false,
|
||||
"is_blocked": false
|
||||
}
|
||||
```
|
||||
```json {{ title: 'Schema' }}
|
||||
@@ -504,7 +506,8 @@ echo $response;
|
||||
"string"
|
||||
],
|
||||
"is_current": "boolean",
|
||||
"is_service_user": "boolean"
|
||||
"is_service_user": "boolean",
|
||||
"is_blocked": "boolean"
|
||||
}
|
||||
```
|
||||
</CodeGroup>
|
||||
@@ -548,6 +551,13 @@ echo $response;
|
||||
|
||||
>
|
||||
Groups to auto-assign to peers registered by this user
|
||||
</Property>
|
||||
|
||||
<Property name="is_blocked" type="boolean" required={true}
|
||||
|
||||
|
||||
>
|
||||
If set to true then user is blocked and can't use the system
|
||||
</Property>
|
||||
</Properties>
|
||||
</Col>
|
||||
@@ -563,7 +573,8 @@ curl -X PUT https://api.netbird.io/api/users/{userId} \
|
||||
"role": "admin",
|
||||
"auto_groups": [
|
||||
"devs"
|
||||
]
|
||||
],
|
||||
"is_blocked": false
|
||||
}'
|
||||
```
|
||||
|
||||
@@ -573,7 +584,8 @@ let data = JSON.stringify({
|
||||
"role": "admin",
|
||||
"auto_groups": [
|
||||
"devs"
|
||||
]
|
||||
],
|
||||
"is_blocked": false
|
||||
});
|
||||
let config = {
|
||||
method: 'put',
|
||||
@@ -605,7 +617,8 @@ payload = json.dumps({
|
||||
"role": "admin",
|
||||
"auto_groups": [
|
||||
"devs"
|
||||
]
|
||||
],
|
||||
"is_blocked": false
|
||||
})
|
||||
headers: {
|
||||
'Content-Type': 'application/json',
|
||||
@@ -637,7 +650,8 @@ func main() {
|
||||
"role": "admin",
|
||||
"auto_groups": [
|
||||
"devs"
|
||||
]
|
||||
],
|
||||
"is_blocked": false
|
||||
}`)
|
||||
client := &http.Client {
|
||||
}
|
||||
@@ -687,7 +701,8 @@ request.body = JSON.dump({
|
||||
"role": "admin",
|
||||
"auto_groups": [
|
||||
"devs"
|
||||
]
|
||||
],
|
||||
"is_blocked": false
|
||||
})
|
||||
response = https.request(request)
|
||||
puts response.read_body
|
||||
@@ -701,7 +716,8 @@ RequestBody body = RequestBody.create(mediaType, '{
|
||||
"role": "admin",
|
||||
"auto_groups": [
|
||||
"devs"
|
||||
]
|
||||
],
|
||||
"is_blocked": false
|
||||
}');
|
||||
Request request = new Request.Builder()
|
||||
.url("https://api.netbird.io/api/users/{userId}")
|
||||
@@ -731,7 +747,8 @@ curl_setopt_array($curl, array(
|
||||
"role": "admin",
|
||||
"auto_groups": [
|
||||
"devs"
|
||||
]
|
||||
],
|
||||
"is_blocked": false
|
||||
}',
|
||||
CURLOPT_HTTPHEADER => array(
|
||||
'Content-Type: application/json',
|
||||
@@ -762,7 +779,8 @@ echo $response;
|
||||
"devs"
|
||||
],
|
||||
"is_current": true,
|
||||
"is_service_user": false
|
||||
"is_service_user": false,
|
||||
"is_blocked": false
|
||||
}
|
||||
```
|
||||
```json {{ title: 'Schema' }}
|
||||
@@ -776,7 +794,8 @@ echo $response;
|
||||
"string"
|
||||
],
|
||||
"is_current": "boolean",
|
||||
"is_service_user": "boolean"
|
||||
"is_service_user": "boolean",
|
||||
"is_blocked": "boolean"
|
||||
}
|
||||
```
|
||||
</CodeGroup>
|
||||
@@ -795,7 +814,7 @@ echo $response;
|
||||
|
||||
<Row>
|
||||
<Col>
|
||||
Delete a User
|
||||
Delete a user
|
||||
|
||||
#### Path Parameters
|
||||
<Properties>
|
||||
|
||||
Reference in New Issue
Block a user