Skip to content

Add client capabilities into the validator request for write only #283

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
99 changes: 55 additions & 44 deletions internal/schemavalidator/prefer_write_only_attribute.go
Original file line number Diff line number Diff line change
Expand Up @@ -96,10 +96,11 @@ func (av PreferWriteOnlyAttribute) Validate(ctx context.Context, req PreferWrite

func (av PreferWriteOnlyAttribute) ValidateBool(ctx context.Context, req validator.BoolRequest, resp *validator.BoolResponse) {
validateReq := PreferWriteOnlyAttributeRequest{
Config: req.Config,
ConfigValue: req.ConfigValue,
Path: req.Path,
PathExpression: req.PathExpression,
Config: req.Config,
ConfigValue: req.ConfigValue,
Path: req.Path,
PathExpression: req.PathExpression,
ClientCapabilities: req.ClientCapabilities,
}
validateResp := &PreferWriteOnlyAttributeResponse{}

Expand All @@ -110,10 +111,11 @@ func (av PreferWriteOnlyAttribute) ValidateBool(ctx context.Context, req validat

func (av PreferWriteOnlyAttribute) ValidateDynamic(ctx context.Context, req validator.DynamicRequest, resp *validator.DynamicResponse) {
validateReq := PreferWriteOnlyAttributeRequest{
Config: req.Config,
ConfigValue: req.ConfigValue,
Path: req.Path,
PathExpression: req.PathExpression,
Config: req.Config,
ConfigValue: req.ConfigValue,
Path: req.Path,
PathExpression: req.PathExpression,
ClientCapabilities: req.ClientCapabilities,
}
validateResp := &PreferWriteOnlyAttributeResponse{}

Expand All @@ -124,10 +126,11 @@ func (av PreferWriteOnlyAttribute) ValidateDynamic(ctx context.Context, req vali

func (av PreferWriteOnlyAttribute) ValidateFloat32(ctx context.Context, req validator.Float32Request, resp *validator.Float32Response) {
validateReq := PreferWriteOnlyAttributeRequest{
Config: req.Config,
ConfigValue: req.ConfigValue,
Path: req.Path,
PathExpression: req.PathExpression,
Config: req.Config,
ConfigValue: req.ConfigValue,
Path: req.Path,
PathExpression: req.PathExpression,
ClientCapabilities: req.ClientCapabilities,
}
validateResp := &PreferWriteOnlyAttributeResponse{}

Expand All @@ -138,10 +141,11 @@ func (av PreferWriteOnlyAttribute) ValidateFloat32(ctx context.Context, req vali

func (av PreferWriteOnlyAttribute) ValidateFloat64(ctx context.Context, req validator.Float64Request, resp *validator.Float64Response) {
validateReq := PreferWriteOnlyAttributeRequest{
Config: req.Config,
ConfigValue: req.ConfigValue,
Path: req.Path,
PathExpression: req.PathExpression,
Config: req.Config,
ConfigValue: req.ConfigValue,
Path: req.Path,
PathExpression: req.PathExpression,
ClientCapabilities: req.ClientCapabilities,
}
validateResp := &PreferWriteOnlyAttributeResponse{}

Expand All @@ -152,10 +156,11 @@ func (av PreferWriteOnlyAttribute) ValidateFloat64(ctx context.Context, req vali

func (av PreferWriteOnlyAttribute) ValidateInt32(ctx context.Context, req validator.Int32Request, resp *validator.Int32Response) {
validateReq := PreferWriteOnlyAttributeRequest{
Config: req.Config,
ConfigValue: req.ConfigValue,
Path: req.Path,
PathExpression: req.PathExpression,
Config: req.Config,
ConfigValue: req.ConfigValue,
Path: req.Path,
PathExpression: req.PathExpression,
ClientCapabilities: req.ClientCapabilities,
}
validateResp := &PreferWriteOnlyAttributeResponse{}

Expand All @@ -166,10 +171,11 @@ func (av PreferWriteOnlyAttribute) ValidateInt32(ctx context.Context, req valida

func (av PreferWriteOnlyAttribute) ValidateInt64(ctx context.Context, req validator.Int64Request, resp *validator.Int64Response) {
validateReq := PreferWriteOnlyAttributeRequest{
Config: req.Config,
ConfigValue: req.ConfigValue,
Path: req.Path,
PathExpression: req.PathExpression,
Config: req.Config,
ConfigValue: req.ConfigValue,
Path: req.Path,
PathExpression: req.PathExpression,
ClientCapabilities: req.ClientCapabilities,
}
validateResp := &PreferWriteOnlyAttributeResponse{}

Expand All @@ -180,10 +186,11 @@ func (av PreferWriteOnlyAttribute) ValidateInt64(ctx context.Context, req valida

func (av PreferWriteOnlyAttribute) ValidateList(ctx context.Context, req validator.ListRequest, resp *validator.ListResponse) {
validateReq := PreferWriteOnlyAttributeRequest{
Config: req.Config,
ConfigValue: req.ConfigValue,
Path: req.Path,
PathExpression: req.PathExpression,
Config: req.Config,
ConfigValue: req.ConfigValue,
Path: req.Path,
PathExpression: req.PathExpression,
ClientCapabilities: req.ClientCapabilities,
}
validateResp := &PreferWriteOnlyAttributeResponse{}

Expand All @@ -194,10 +201,11 @@ func (av PreferWriteOnlyAttribute) ValidateList(ctx context.Context, req validat

func (av PreferWriteOnlyAttribute) ValidateMap(ctx context.Context, req validator.MapRequest, resp *validator.MapResponse) {
validateReq := PreferWriteOnlyAttributeRequest{
Config: req.Config,
ConfigValue: req.ConfigValue,
Path: req.Path,
PathExpression: req.PathExpression,
Config: req.Config,
ConfigValue: req.ConfigValue,
Path: req.Path,
PathExpression: req.PathExpression,
ClientCapabilities: req.ClientCapabilities,
}
validateResp := &PreferWriteOnlyAttributeResponse{}

Expand All @@ -208,10 +216,11 @@ func (av PreferWriteOnlyAttribute) ValidateMap(ctx context.Context, req validato

func (av PreferWriteOnlyAttribute) ValidateNumber(ctx context.Context, req validator.NumberRequest, resp *validator.NumberResponse) {
validateReq := PreferWriteOnlyAttributeRequest{
Config: req.Config,
ConfigValue: req.ConfigValue,
Path: req.Path,
PathExpression: req.PathExpression,
Config: req.Config,
ConfigValue: req.ConfigValue,
Path: req.Path,
PathExpression: req.PathExpression,
ClientCapabilities: req.ClientCapabilities,
}
validateResp := &PreferWriteOnlyAttributeResponse{}

Expand All @@ -222,10 +231,11 @@ func (av PreferWriteOnlyAttribute) ValidateNumber(ctx context.Context, req valid

func (av PreferWriteOnlyAttribute) ValidateObject(ctx context.Context, req validator.ObjectRequest, resp *validator.ObjectResponse) {
validateReq := PreferWriteOnlyAttributeRequest{
Config: req.Config,
ConfigValue: req.ConfigValue,
Path: req.Path,
PathExpression: req.PathExpression,
Config: req.Config,
ConfigValue: req.ConfigValue,
Path: req.Path,
PathExpression: req.PathExpression,
ClientCapabilities: req.ClientCapabilities,
}
validateResp := &PreferWriteOnlyAttributeResponse{}

Expand All @@ -236,10 +246,11 @@ func (av PreferWriteOnlyAttribute) ValidateObject(ctx context.Context, req valid

func (av PreferWriteOnlyAttribute) ValidateString(ctx context.Context, req validator.StringRequest, resp *validator.StringResponse) {
validateReq := PreferWriteOnlyAttributeRequest{
Config: req.Config,
ConfigValue: req.ConfigValue,
Path: req.Path,
PathExpression: req.PathExpression,
Config: req.Config,
ConfigValue: req.ConfigValue,
Path: req.Path,
PathExpression: req.PathExpression,
ClientCapabilities: req.ClientCapabilities,
}
validateResp := &PreferWriteOnlyAttributeResponse{}

Expand Down
Loading