Skip to content
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

Make JobStepCreator fields more consistent through the api #3759

Merged
merged 1 commit into from
Apr 13, 2023

Conversation

MDeLuise
Copy link
Contributor

Brief description of the PR.
This PR makes the jobStepProperties more consistent through the api.

Related Issue
This PR fixes #3580.

Description of the solution adopted
Before the changes the following were the getter and setter methods of the JobStepCreator

  • getStepProperties
  • setJobStepProperties

After the changes the getter and setter methods of the JobStepCreator are:

  • getStepProperties
  • setStepProperties: to use instead of the old setJobStepProperties
  • setJobStepProperties: deprecated, left there only to ensure backward compatibility
  • getJobStepPropertiesDeprecated: deprecated, left there only to ensure backward compatibility
  • setJobStepPropertiesDeprecated: deprecated, left there only to ensure backward compatibility

Any side note on the changes made

  • In a future release the deprecated methods will be removed
  • Until the removal of the deprecated methods, the Swagger UI example of JobStepCreator will be the following:
    {
      "type": "jobStepCreator",
      "name": "Step 1",
      "description": "A step with a description",
      "stepIndex": 0,
      "jobStepDefinitionId": "Aw",
      "stepProperties": [
        {
          "name": "bundleId",
          "propertyType": "java.lang.String",
          "propertyValue": "999"
        }
      ],
      "jobStepProperties": [
        {
          "name": "bundleId",
          "propertyType": "java.lang.String",
          "propertyValue": "999"
        }
      ]
    }
    
    Both stepProperties and jobStepProperties will be present and functional, even if the latter is deprecated.

@codecov
Copy link

codecov bot commented Apr 12, 2023

Codecov Report

Merging #3759 (f90f4a3) into develop (32bf96a) will increase coverage by 2.27%.
The diff coverage is 40.00%.

❗ Current head f90f4a3 differs from pull request most recent head 5935bd5. Consider uploading reports for the commit 5935bd5 to get more accurate results

Impacted file tree graph

@@              Coverage Diff              @@
##             develop    #3759      +/-   ##
=============================================
+ Coverage      50.04%   52.32%   +2.27%     
  Complexity        26       26              
=============================================
  Files           1864     1865       +1     
  Lines          35264    35269       +5     
  Branches        2784     2784              
=============================================
+ Hits           17649    18453     +804     
+ Misses         16708    15852     -856     
- Partials         907      964      +57     
Impacted Files Coverage Δ
.../service/job/step/internal/JobStepCreatorImpl.java 87.50% <ø> (ø)
...eclipse/kapua/service/job/step/JobStepCreator.java 40.00% <40.00%> (ø)

... and 76 files with indirect coverage changes

@Coduz Coduz merged commit 199fb12 into eclipse:develop Apr 13, 2023
@MDeLuise MDeLuise deleted the fix/api-field-name-consistent branch April 13, 2023 13:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Step properties field having different names
2 participants