You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardexpand all lines: docs/developer-guide/02-projects/image-builder-frontend/index.md
+14-25
Original file line number
Diff line number
Diff line change
@@ -10,6 +10,8 @@
10
10
## Table of Contents
11
11
1.[How to build and run image-builder-frontend](#frontend-development)
12
12
1.[Frontend Development](#frontend-development)
13
+
1.[API](#api-endpoints)
14
+
2.[Unleash feature flags](#unleash-feature-flags)
13
15
2.[Backend Development](#backend-development)
14
16
2.[File structure](#file-structure)
15
17
3.[Style Guidelines](#style-guidelines)
@@ -27,7 +29,7 @@ worrying if a feature from stage has been released yet.
27
29
28
30
#### Nodejs and npm version
29
31
30
-
Make sure you have npm@7 and node 15+ installed. If you need multiple versions of nodejs check out [nvm](https://github.com/nvm-sh/nvm).
32
+
Make sure you have npm@10 and node 18+ installed. If you need multiple versions of nodejs check out [nvm](https://github.com/nvm-sh/nvm).
31
33
32
34
#### Webpack proxy
33
35
@@ -90,17 +92,21 @@ Note that this requires you to have access to either production or stage (plus V
90
92
91
93
#### API endpoints
92
94
93
-
API endpoints are programmatically generated with the RTKQ library. This
94
-
sections overview the steps to add new APIs and endpoints.
95
+
API slice definitions are programmatically generated using the [@rtk-query/codegen-openapi](https://redux-toolkit.js.org/rtk-query/usage/code-generation) package.
96
+
97
+
OpenAPI schema for the endpoints are stored in `/api/schema`. Their
98
+
corresponding configuration files are stored in `/api/config`. Each endpoint
99
+
has a corresponding empty API slice and generated API slice which are stored in
100
+
`/src/store`.
95
101
96
102
##### Add a new API
97
103
98
-
For an hypothetical API called foobar
104
+
For a hypothetical API called foobar
99
105
100
-
1. Download the foobar api openapi json or yaml representation under
106
+
1. Download the foobar API OpenAPI json or yaml representation under
101
107
`api/schema/foobar.json`
102
108
103
-
2. Create a new "empty" api file under `src/store/emptyFoobarApi.ts` that has for
109
+
2. Create a new "empty" API file under `src/store/emptyFoobarApi.ts` that has following
0 commit comments