mirror of
https://github.com/netbirdio/netbird.git
synced 2026-04-18 00:06:38 +00:00
refactor to use name instead of description
This commit is contained in:
@@ -292,12 +292,9 @@ components:
|
||||
id:
|
||||
description: ID of a token
|
||||
type: string
|
||||
description:
|
||||
description: Description of the token
|
||||
name:
|
||||
description: Name of the token
|
||||
type: string
|
||||
# hashed_token:
|
||||
# description: Hashed representation of the token
|
||||
# type: string
|
||||
expiration_date:
|
||||
description: Date the token expires
|
||||
type: string
|
||||
@@ -315,8 +312,7 @@ components:
|
||||
format: date-time
|
||||
required:
|
||||
- id
|
||||
- description
|
||||
# - hashed_token
|
||||
- name
|
||||
- expiration_date
|
||||
- created_by
|
||||
- created_at
|
||||
@@ -324,14 +320,14 @@ components:
|
||||
PersonalAccessTokenRequest:
|
||||
type: object
|
||||
properties:
|
||||
description:
|
||||
description: Description of the token
|
||||
name:
|
||||
description: Name of the token
|
||||
type: string
|
||||
expires_in:
|
||||
description: Expiration in days
|
||||
type: integer
|
||||
required:
|
||||
- description
|
||||
- name
|
||||
- expires_in
|
||||
GroupMinimum:
|
||||
type: object
|
||||
|
||||
@@ -387,9 +387,6 @@ type PersonalAccessToken struct {
|
||||
// CreatedBy User ID of the user who created the token
|
||||
CreatedBy string `json:"created_by"`
|
||||
|
||||
// Description Description of the token
|
||||
Description string `json:"description"`
|
||||
|
||||
// ExpirationDate Date the token expires
|
||||
ExpirationDate time.Time `json:"expiration_date"`
|
||||
|
||||
@@ -398,15 +395,18 @@ type PersonalAccessToken struct {
|
||||
|
||||
// LastUsed Date the token was last used
|
||||
LastUsed time.Time `json:"last_used"`
|
||||
|
||||
// Name Name of the token
|
||||
Name string `json:"name"`
|
||||
}
|
||||
|
||||
// PersonalAccessTokenRequest defines model for PersonalAccessTokenRequest.
|
||||
type PersonalAccessTokenRequest struct {
|
||||
// Description Description of the token
|
||||
Description string `json:"description"`
|
||||
|
||||
// ExpiresIn Expiration in days
|
||||
ExpiresIn int `json:"expires_in"`
|
||||
|
||||
// Name Name of the token
|
||||
Name string `json:"name"`
|
||||
}
|
||||
|
||||
// Policy defines model for Policy.
|
||||
|
||||
Reference in New Issue
Block a user