add swagger
This commit is contained in:
21
model/pd.go
21
model/pd.go
@@ -2,12 +2,23 @@ package model
|
||||
|
||||
import "github.com/google/uuid"
|
||||
|
||||
// swagger:model PersonalInformation
|
||||
type PersonalInformation struct {
|
||||
ID uuid.UUID `json:"id,omitempty" validate:"required_without_all=FirstName LastName Patronymic Phone"`
|
||||
FirstName string `json:"first_name,omitempty" validate:"required_without=ID"`
|
||||
LastName string `json:"last_name,omitempty" validate:"required_without=ID"`
|
||||
Patronymic string `json:"patronymic,omitempty" validate:"required_without=ID"`
|
||||
Phone string `json:"phone,omitempty" validate:"required_without=ID"`
|
||||
// The UUID of a person
|
||||
// example: 6204037c-30e6-408b-8aaa-dd8219860b4b
|
||||
ID uuid.UUID `json:"id,omitempty" validate:"required_without_all=FirstName LastName Patronymic Phone"`
|
||||
// The first name of a person
|
||||
// example: Иван
|
||||
FirstName string `json:"first_name,omitempty" validate:"required_without=ID"`
|
||||
// The last name of a person
|
||||
// example: Иванов
|
||||
LastName string `json:"last_name,omitempty" validate:"required_without=ID"`
|
||||
// The patronymic of a person
|
||||
// example: Иванович
|
||||
Patronymic string `json:"patronymic,omitempty" validate:"required_without=ID"`
|
||||
// The first name of a person
|
||||
// example: 79206321370
|
||||
Phone string `json:"phone,omitempty" validate:"required_without=ID"`
|
||||
}
|
||||
|
||||
type PersonalInformationCreate struct {
|
||||
|
||||
Reference in New Issue
Block a user