File tree Expand file tree Collapse file tree 1 file changed +5
-11
lines changed
api/broker/binding_request_parser Expand file tree Collapse file tree 1 file changed +5
-11
lines changed Original file line number Diff line number Diff line change @@ -53,22 +53,16 @@ func (brp *bindRequestParser) Parse(details domain.BindDetails) (models.AppScali
5353 scalingPolicyRaw = details .RawParameters
5454 }
5555
56- var err error
57-
58- // This just gets used for legacy-reasons. The actually parsing happens in the step
59- // afterwards. But it still does not validate against the schema, which is done here .
60- _ , err = brp .getPolicyFromJsonRawMessage (scalingPolicyRaw )
56+ // 🏚️ This parser currently uses a module that originally was written to do the validation
57+ // against a json-schema. This validation however needs to be performed in the future within
58+ // this parser, because we want to support several parsers where each one may work with a
59+ // different json- schema.
60+ scalingPolicy , err : = brp .getPolicyFromJsonRawMessage (scalingPolicyRaw )
6161 if err != nil {
6262 err := fmt .Errorf ("validation-error against the json-schema:\n \t %w" , err )
6363 return models.AppScalingConfig {}, err
6464 }
6565
66- scalingPolicy , err := models .ScalingPolicyFromRawJSON (scalingPolicyRaw )
67- if err != nil {
68- err := fmt .Errorf ("could not parse scaling policy from request:\n \t %w" , err )
69- return models.AppScalingConfig {}, err
70- }
71-
7266 // 🏚️ Subsequently we assume that this credential-type-configuration is part of the
7367 // scaling-policy and check it accordingly. However this is legacy and not in line with the
7468 // current terminology of “PolicyDefinition”, “ScalingPolicy”, “BindingConfig” and
You can’t perform that action at this time.
0 commit comments