- update CreateUpdateCommonConfig doc
- remove required from ids
This commit is contained in:
1 parent
23108f2224
commit
1317696cb7
3 files changed
+6
-6
No files matched your search
@@ -43,8 +43,8 @@ func (c *commonConfig) GetConfigs(identities []string) []entity.CommonConfig {
|
||||
// @Tags Общие конфигурации
|
||||
// @Accept json
|
||||
// @Produce json
|
||||
// @Param body body entity.Config true "объект для сохранения"
|
||||
// @Success 200 {object} entity.Config
|
||||
// @Param body body entity.CommonConfig true "объект для сохранения"
|
||||
// @Success 200 {object} entity.CommonConfig
|
||||
// @Failure 404 {object} structure.GrpcError "если конфигурация не найдена"
|
||||
// @Failure 500 {object} structure.GrpcError
|
||||
// @Router /common_config/create_update_config [POST]
|
||||
|
||||
+3
-3
@@ -9,7 +9,7 @@ type ConfigData map[string]interface{}
|
||||
|
||||
type Config struct {
|
||||
tableName string `sql:"?db_schema.configs" json:"-"`
|
||||
Id string `json:"id" valid:"required~Required"`
|
||||
Id string `json:"id"`
|
||||
Name string `json:"name" valid:"required~Required"`
|
||||
CommonConfigs []string `json:"commonConfigs" pg:",array"`
|
||||
Description string `json:"description"`
|
||||
@@ -23,7 +23,7 @@ type Config struct {
|
||||
|
||||
type CommonConfig struct {
|
||||
tableName string `sql:"?db_schema.common_configs" json:"-"`
|
||||
Id string `json:"id" valid:"required~Required"`
|
||||
Id string `json:"id"`
|
||||
Name string `json:"name" valid:"required~Required"`
|
||||
Description string `json:"description"`
|
||||
CreatedAt time.Time `json:"createdAt" sql:",null"`
|
||||
@@ -33,7 +33,7 @@ type CommonConfig struct {
|
||||
|
||||
type ConfigSchema struct {
|
||||
tableName string `sql:"?db_schema.config_schemas" json:"-"`
|
||||
Id string `json:"id" valid:"required~Required"`
|
||||
Id string `json:"id"`
|
||||
Version string
|
||||
ModuleId string
|
||||
Schema schema.Schema
|
||||
|
||||
+1
-1
@@ -4,7 +4,7 @@ import "time"
|
||||
|
||||
type Module struct {
|
||||
tableName string `sql:"?db_schema.modules" json:"-"`
|
||||
Id string `json:"id" valid:"required~Required"`
|
||||
Id string `json:"id"`
|
||||
Name string `json:"name" valid:"required~Required"`
|
||||
CreatedAt time.Time `json:"createdAt" sql:",null"`
|
||||
LastConnectedAt time.Time `json:"lastConnectedAt"`
|
||||
|
||||
Reference in new issue
Block a user