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
- perform all CRUD operations regardless resource ownership (RBAC)
223
+
- all attributes can be edited except ingress that can be only set on resource creation event (ABAC)
224
+
225
+
A user with team role can:
226
+
227
+
- perform all CRUD operations only withing its own team (RBAC)
228
+
- all attributes can be edited except ingress that isn be only read (ABAC)
229
+
230
+
#### 2.3.3 Limitations
231
+
232
+
##### 2.3.3.1 OpenAPI-generator limitations
233
+
234
+
<!-- Add more issues if you spot them and know the limitations/work-arounds -->
235
+
236
+
Known issues:
237
+
238
+
-https://github.com/redkubes/otomi-api/issues/155
239
+
240
+
###### Problem
241
+
242
+
It doesn't matter if you've entered a valid OpenAPI specification, it isn't useful as long as it isn't generated as a client library.
243
+
244
+
###### Cause
245
+
246
+
There are too many variations of this problem to be listed here and still make sense, but they follow the following cycle in general:
247
+
248
+
1.`src/openapi/\*.yaml` cannot be dereferenced/bundled by parsing JSON `$refs`.
249
+
2. Dereferenced/bundled OpenAPI spec cannot be generated
250
+
3. Client libary in `vendors/client/otomi-api/axios/...` cannot be compiled with `tsc`
251
+
4. Code cannot be committed in version control (Git)
252
+
5. Consume API methods and/or models
253
+
254
+
###### Solutions
255
+
256
+
In this paragraph the causes are addressed by the corresponding number under "Cause":
257
+
258
+
1. In the `npm run ...` scripts, `vendors/openapi/otomi-api.json` may be deleted to see if the spec can be successfully dereferenced/bundled and used as input for `openapi-generator`.
259
+
2. The `openapi-generator` can throw useful/meaningful errors. But there are errors under known issues (see above) that need a work-around.
260
+
3. These errors happen the most arbitrarily. See if you can go back in your small increments in `src/openapi/...` until you can successfully build the client library again.
261
+
4. These errors are often due to our own code. E.g.: a generated model is used, and by changing the OpenAPI spec you change the schema. Models used to rely on the schema and now they are missing.
262
+
5. If you change the name of a schema, add a title, etc., the respective reference might change. Then the consumption in the API library might break.
263
+
264
+
###### Note
265
+
266
+
- Also check if you can successfully generate the client library again after committing, just as a pre-caution.
267
+
- To determine a successful generation of the client library, please check out the generated models in `vendors/client/otomi-api/axios/models` if they make sense or not.
268
+
- As general advice, make sure to increment the specification VERY slowly and always see if a spec can be generated or not.
269
+
196
270
## 2. Viewing/consuming openapi spec
197
271
198
272
In order to inspect the api file it is recommended to either:
0 commit comments