Skip to content

Commit d406ce9

Browse files
Fix: Description added on app store discovery. (#2092)
* added description on app store discovery * description on app store list * app store discover - api spec added
1 parent b629e99 commit d406ce9

File tree

3 files changed

+129
-1
lines changed

3 files changed

+129
-1
lines changed

pkg/appStore/bean/bean.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -282,6 +282,7 @@ type AppStoreWithVersion struct {
282282
UpdatedOn time.Time `json:"updated_on"`
283283
Version string `json:"version"`
284284
Deprecated bool `json:"deprecated"`
285+
Description string `json:"description"`
285286
}
286287

287288
type AppStoreFilter struct {

pkg/appStore/discover/repository/AppStoreApplicationVersionRepository.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,8 @@ func (impl *AppStoreApplicationVersionRepositoryImpl) FindAll() ([]appStoreBean.
9494

9595
func (impl *AppStoreApplicationVersionRepositoryImpl) FindWithFilter(filter *appStoreBean.AppStoreFilter) ([]appStoreBean.AppStoreWithVersion, error) {
9696
var appStoreWithVersion []appStoreBean.AppStoreWithVersion
97-
query := "SELECT asv.version, asv.icon,asv.deprecated ,asv.id as app_store_application_version_id, aps.*, ch.name as chart_name" +
97+
query := "SELECT asv.version, asv.icon,asv.deprecated,asv.id as app_store_application_version_id," +
98+
" asv.description, aps.*, ch.name as chart_name" +
9899
" FROM app_store_application_version asv" +
99100
" INNER JOIN app_store aps ON asv.app_store_id = aps.id" +
100101
" INNER JOIN chart_repo ch ON aps.chart_repo_id = ch.id" +

specs/app-store.yaml

Lines changed: 126 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,126 @@
1+
openapi: "3.0.0"
2+
info:
3+
version: 1.0.0
4+
title: Devtron Labs
5+
paths:
6+
/orchestrator/app-store/discover/:
7+
get:
8+
description: this api will return all the charts from charts repos.
9+
parameters: [ ]
10+
responses:
11+
'200':
12+
description: list response
13+
content:
14+
application/json:
15+
schema:
16+
properties:
17+
code:
18+
type: integer
19+
description: status code
20+
status:
21+
type: string
22+
description: status
23+
result:
24+
allOf:
25+
- type: object
26+
properties:
27+
appId:
28+
type: integer
29+
description: unique application id
30+
required:
31+
- appId
32+
- $ref: '#/components/schemas/AppStore'
33+
default:
34+
description: unexpected error
35+
content:
36+
application/json:
37+
schema:
38+
$ref: '#/components/schemas/ErrorResponse'
39+
40+
41+
42+
43+
44+
45+
# components mentioned below
46+
components:
47+
schemas:
48+
AppStore:
49+
type: object
50+
required:
51+
- id
52+
- name
53+
properties:
54+
id:
55+
type: integer
56+
description: app store id
57+
name:
58+
type: string
59+
description: app store name
60+
appStoreApplicationVersionId:
61+
type: integer
62+
description: app store version id
63+
chart_git_location:
64+
type: string
65+
description: chart git repo location
66+
chart_name:
67+
type: string
68+
description: chart name
69+
chart_repo_id:
70+
type: integer
71+
description: app store and chart repo link id
72+
deprecated:
73+
type: boolean
74+
description: deprecated app store flag
75+
description:
76+
type: string
77+
description: app store description, short summary
78+
icon:
79+
type: string
80+
description: app store icon link
81+
created_on:
82+
type: string
83+
description: created on
84+
updated_on:
85+
type: string
86+
description: modification date
87+
version:
88+
type: string
89+
description: app store version
90+
active:
91+
type: boolean
92+
description: active app store
93+
94+
ErrorResponse:
95+
required:
96+
- code
97+
- status
98+
properties:
99+
code:
100+
type: integer
101+
format: int32
102+
description: Error code
103+
status:
104+
type: string
105+
description: Error message
106+
errors:
107+
type: array
108+
description: errors
109+
items:
110+
$ref: '#/components/schemas/Error'
111+
112+
Error:
113+
required:
114+
- code
115+
- status
116+
properties:
117+
code:
118+
type: integer
119+
format: int32
120+
description: Error internal code
121+
internalMessage:
122+
type: string
123+
description: Error internal message
124+
userMessage:
125+
type: string
126+
description: Error user message

0 commit comments

Comments
 (0)