mirror of
https://github.com/netbirdio/netbird.git
synced 2025-06-01 07:35:35 +02:00
update openapi
This commit is contained in:
parent
1939973c2e
commit
75fbaf811b
@ -65,7 +65,7 @@ func (h *AccountsHandler) UpdateAccount(w http.ResponseWriter, r *http.Request)
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
var req api.PutApiAccountsAccountIdJSONBody
|
var req api.PutApiAccountsAccountIdJSONRequestBody
|
||||||
err = json.NewDecoder(r.Body).Decode(&req)
|
err = json.NewDecoder(r.Body).Decode(&req)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
util.WriteErrorResponse("couldn't parse JSON request", http.StatusBadRequest, w)
|
util.WriteErrorResponse("couldn't parse JSON request", http.StatusBadRequest, w)
|
||||||
|
@ -32,6 +32,7 @@ tags:
|
|||||||
components:
|
components:
|
||||||
schemas:
|
schemas:
|
||||||
Account:
|
Account:
|
||||||
|
type: object
|
||||||
properties:
|
properties:
|
||||||
id:
|
id:
|
||||||
description: Account ID
|
description: Account ID
|
||||||
@ -43,6 +44,7 @@ components:
|
|||||||
- id
|
- id
|
||||||
- settings
|
- settings
|
||||||
AccountSettings:
|
AccountSettings:
|
||||||
|
type: object
|
||||||
properties:
|
properties:
|
||||||
peer_login_expiration_enabled:
|
peer_login_expiration_enabled:
|
||||||
description: Enables or disables peer login expiration globally. After peer's login has expired the user has to log in (authenticate). Applies only to peers that were added by a user (interactive SSO login).
|
description: Enables or disables peer login expiration globally. After peer's login has expired the user has to log in (authenticate). Applies only to peers that were added by a user (interactive SSO login).
|
||||||
@ -55,6 +57,13 @@ components:
|
|||||||
required:
|
required:
|
||||||
- peer_login_expiration_enabled
|
- peer_login_expiration_enabled
|
||||||
- peer_login_expiration
|
- peer_login_expiration
|
||||||
|
AccountRequest:
|
||||||
|
type: object
|
||||||
|
properties:
|
||||||
|
settings:
|
||||||
|
$ref: '#/components/schemas/AccountSettings'
|
||||||
|
required:
|
||||||
|
- settings
|
||||||
User:
|
User:
|
||||||
type: object
|
type: object
|
||||||
properties:
|
properties:
|
||||||
@ -975,12 +984,7 @@ paths:
|
|||||||
content:
|
content:
|
||||||
'application/json':
|
'application/json':
|
||||||
schema:
|
schema:
|
||||||
type: object
|
$ref: '#/components/schemas/AccountRequest'
|
||||||
properties:
|
|
||||||
settings:
|
|
||||||
$ref: '#/components/schemas/AccountSettings'
|
|
||||||
required:
|
|
||||||
- settings
|
|
||||||
responses:
|
responses:
|
||||||
'200':
|
'200':
|
||||||
description: An Account object
|
description: An Account object
|
||||||
|
@ -122,6 +122,11 @@ type Account struct {
|
|||||||
Settings AccountSettings `json:"settings"`
|
Settings AccountSettings `json:"settings"`
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// AccountRequest defines model for AccountRequest.
|
||||||
|
type AccountRequest struct {
|
||||||
|
Settings AccountSettings `json:"settings"`
|
||||||
|
}
|
||||||
|
|
||||||
// AccountSettings defines model for AccountSettings.
|
// AccountSettings defines model for AccountSettings.
|
||||||
type AccountSettings struct {
|
type AccountSettings struct {
|
||||||
// PeerLoginExpiration Period of time after which peer login expires (seconds).
|
// PeerLoginExpiration Period of time after which peer login expires (seconds).
|
||||||
@ -788,11 +793,6 @@ type UserRequest struct {
|
|||||||
Role string `json:"role"`
|
Role string `json:"role"`
|
||||||
}
|
}
|
||||||
|
|
||||||
// PutApiAccountsAccountIdJSONBody defines parameters for PutApiAccountsAccountId.
|
|
||||||
type PutApiAccountsAccountIdJSONBody struct {
|
|
||||||
Settings AccountSettings `json:"settings"`
|
|
||||||
}
|
|
||||||
|
|
||||||
// GetApiUsersParams defines parameters for GetApiUsers.
|
// GetApiUsersParams defines parameters for GetApiUsers.
|
||||||
type GetApiUsersParams struct {
|
type GetApiUsersParams struct {
|
||||||
// ServiceUser Filters users and returns either regular users or service users
|
// ServiceUser Filters users and returns either regular users or service users
|
||||||
@ -800,7 +800,7 @@ type GetApiUsersParams struct {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// PutApiAccountsAccountIdJSONRequestBody defines body for PutApiAccountsAccountId for application/json ContentType.
|
// PutApiAccountsAccountIdJSONRequestBody defines body for PutApiAccountsAccountId for application/json ContentType.
|
||||||
type PutApiAccountsAccountIdJSONRequestBody PutApiAccountsAccountIdJSONBody
|
type PutApiAccountsAccountIdJSONRequestBody = AccountRequest
|
||||||
|
|
||||||
// PostApiDnsNameserversJSONRequestBody defines body for PostApiDnsNameservers for application/json ContentType.
|
// PostApiDnsNameserversJSONRequestBody defines body for PostApiDnsNameservers for application/json ContentType.
|
||||||
type PostApiDnsNameserversJSONRequestBody = NameserverGroupRequest
|
type PostApiDnsNameserversJSONRequestBody = NameserverGroupRequest
|
||||||
|
Loading…
x
Reference in New Issue
Block a user