Skip to content

Commit e1662d7

Browse files
expose step-type version (#364)
1 parent 1616c4b commit e1662d7

File tree

3 files changed

+44
-2
lines changed

3 files changed

+44
-2
lines changed

lib/logic/entities/StepType.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,12 @@ class StepType extends Entity {
99
this.name = this.info.metadata.name;
1010
this.visibility = this.info.metadata.isPublic ? 'public' : 'private';
1111
this.official = this.info.metadata.official ? "true": "false";
12+
this.version = this.info.metadata.version;
1213
this.category = this.info.metadata.categories;
1314
this.stage = this.info.metadata.stage;
1415
this.created = this.info.metadata.created_at ? new Date(this.info.metadata.created_at) : undefined;
1516
this.updated = this.info.metadata.updated_at ? new Date(this.info.metadata.updated_at) : undefined;
16-
this.defaultColumns = ['name', 'category', 'official', 'visibility', 'stage', 'updated', 'created'];
17+
this.defaultColumns = ['name', 'version', 'category', 'official', 'visibility', 'stage', 'updated', 'created'];
1718
this.wideColumns = this.defaultColumns;
1819
}
1920

openapi.json

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5769,6 +5769,47 @@
57695769
}
57705770
}
57715771
},
5772+
"/step-types/{name}/versions": {
5773+
"get": {
5774+
"parameters": [
5775+
{
5776+
"description": "Name of step",
5777+
"in": "path",
5778+
"name": "name",
5779+
"required": true,
5780+
"schema": {
5781+
"type": "string"
5782+
}
5783+
}
5784+
],
5785+
"responses": {
5786+
"200": {
5787+
"$ref": "#/components/responses/Json"
5788+
}
5789+
},
5790+
"tags": [
5791+
"step-types"
5792+
],
5793+
"operationId": "steps-get-version",
5794+
"summary": "Get Versions",
5795+
"x-sdk-interface": "steps.getStepVersions",
5796+
"x-endpoint": {
5797+
"isEndpoint": false,
5798+
"auth": {
5799+
"middleware": [
5800+
"auth.isAuthenticatedOrAnonymous"
5801+
],
5802+
"acl": {
5803+
"resource": "step-type"
5804+
}
5805+
},
5806+
"postMiddleware": [
5807+
"global.iseMiddleware"
5808+
],
5809+
"handler": "steps.getStepVersions"
5810+
}
5811+
}
5812+
},
57725813

57735814
"/projects": {
57745815
"post": {

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "codefresh",
3-
"version": "0.33.3",
3+
"version": "0.34.0",
44
"description": "Codefresh command line utility",
55
"main": "index.js",
66
"preferGlobal": true,

0 commit comments

Comments
 (0)