Merged
Conversation
Model additions: - Info.summary optional field - SuccessAction.name and FailureAction.name required fields - Parameter.value widened from String to Object (spec allows boolean/number/object/array/null) - Workflow.dependsOn changed from String to List<String> (spec defines it as an array) - CriterionExpressionType model for jsonpath/xpath type+version objects - Criterion.type now deserialises both plain strings and CriterionExpressionType objects via CriterionTypeDeserializer Validator additions: - arazzo version pattern validated against ^1\.0\.\d+(-.+)?$ - SourceDescription.name pattern validated against ^[A-Za-z0-9_\-]+$ - SuccessAction and FailureAction name field validated as required - validateCriterion handles CriterionExpressionType (checks type is jsonpath/xpath, version is present, context is required) - validateComponents now validates successActions and failureActions keys and contents - validateWorkflow checks each dependsOn entry references an existing workflow Co-authored-by: factory-droid[bot] <138933559+factory-droid[bot]@users.noreply.github.com>
…plication Move shared fields name, type, workflowId, stepId, criteria and their getters/setters/addCriteria into a common Action base class. Both SuccessAction and FailureAction now extend it, retaining only their own fluent builder methods and FailureAction-specific retry fields. Co-authored-by: factory-droid[bot] <138933559+factory-droid[bot]@users.noreply.github.com>
Extract parameter-validation loop into validateStepParameters() to bring validateStep cognitive complexity from 17 down to 15 (S3776). Co-authored-by: factory-droid[bot] <138933559+factory-droid[bot]@users.noreply.github.com>
Co-authored-by: factory-droid[bot] <138933559+factory-droid[bot]@users.noreply.github.com>
Co-authored-by: factory-droid[bot] <138933559+factory-droid[bot]@users.noreply.github.com>
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



Summary
Adds the model fields and validator logic for the Arazzo 1.0 spec features that were previously absent.
Model changes
InfosummaryfieldSuccessActionnamefieldFailureActionnamefieldParametervaluewidened fromStringtoObject(spec allows boolean, number, object, array, null)WorkflowdependsOnchanged fromStringtoList<String>(spec defines it as an array)CriterionExpressionType{ type, version }expression type object (jsonpath/xpath)Criteriontypenow deserialises both plain strings andCriterionExpressionTypeobjects viaCriterionTypeDeserializer; typed accessorsgetType()andgetExpressionType()providedValidator changes
arazzoversion: validated against pattern^1\.0\.\d+(-.+)?$SourceDescription.name: validated against pattern^[A-Za-z0-9_\-]+$SuccessAction.name/FailureAction.name: both checked as required fieldsCriterionexpression type: validatestypeisjsonpathorxpath,versionis present, andcontextis providedvalidateComponents: now validatessuccessActionsandfailureActions(key format + content)validateWorkflow: each entry independsOnis checked to reference an existing workflowTests
All new features are covered by tests (30+ new test cases added).