@lovrozagar/oat 0.2.0 → 0.2.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -99,6 +99,12 @@ paths:
99
99
  x-entity: { name: widget, action: create, identity: id }
100
100
  x-tenant: workspace_id
101
101
 
102
+ # ── x-feature-gate ───────────────────────────────────────────────────────
103
+ # Plan key this operation is sold behind. A 403 whose body is
104
+ # vars.type: feature_gate (and vars.feature matching this key, when present)
105
+ # is a coverage gap, not a seed defect — the backend matched the document.
106
+ x-feature-gate: widgets
107
+
102
108
  # ── x-invalidate ─────────────────────────────────────────────────────────
103
109
  # Which read routes this write changes. oat inverts these into the entity's
104
110
  # read surface — it is how the entity graph is built — AND verifies them: a
@@ -294,6 +300,60 @@ paths:
294
300
  status: { type: string, enum: [pending, running, complete, failed] }
295
301
  required: [export_id, status]
296
302
 
303
+ # ── public catalogue ──────────────────────────────────────────────────────
304
+ # No x-tenant, and `{template_id}` is not a tenant name. A second principal
305
+ # GETting a row created by the first is correct: the resource is shared.
306
+ # tenant.item-not-readable-cross-tenant does not apply here. The workspace
307
+ # widget above still does — tag → SECURITY, inferred → AMBIGUITY.
308
+ /v1/templates:
309
+ get:
310
+ operationId: template.list
311
+ summary: List public templates
312
+ x-entity: { name: template, action: list, identity: id }
313
+ responses:
314
+ "200":
315
+ description: A page of templates
316
+ content:
317
+ application/json:
318
+ schema:
319
+ type: object
320
+ properties:
321
+ templates: { type: array, items: { $ref: "#/components/schemas/Template" } }
322
+ required: [templates]
323
+ post:
324
+ operationId: template.create
325
+ summary: Publish a template
326
+ x-entity: { name: template, action: create, identity: id }
327
+ requestBody:
328
+ required: true
329
+ content:
330
+ application/json:
331
+ schema:
332
+ type: object
333
+ additionalProperties: false
334
+ properties:
335
+ name: { type: string, maxLength: 128 }
336
+ required: [name]
337
+ responses:
338
+ "201":
339
+ description: Created
340
+ content:
341
+ application/json:
342
+ schema: { $ref: "#/components/schemas/Template" }
343
+
344
+ /v1/templates/{template_id}:
345
+ get:
346
+ operationId: template.read
347
+ x-entity: { name: template, action: read, identity: id }
348
+ parameters:
349
+ - { name: template_id, in: path, required: true, schema: { type: string } }
350
+ responses:
351
+ "200":
352
+ description: A public template
353
+ content:
354
+ application/json:
355
+ schema: { $ref: "#/components/schemas/Template" }
356
+
297
357
  components:
298
358
  schemas:
299
359
  Widget:
@@ -309,3 +369,9 @@ components:
309
369
  updated_at: { type: string, format: date-time }
310
370
  deleted_at: { type: [string, "null"] }
311
371
  required: [id, workspace_id, name, status, priority, created_at, updated_at]
372
+ Template:
373
+ type: object
374
+ properties:
375
+ id: { type: string }
376
+ name: { type: string }
377
+ required: [id, name]
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lovrozagar/oat",
3
- "version": "0.2.0",
3
+ "version": "0.2.2",
4
4
  "description": "OpenAPI Tester — matrix-test a live API against its OpenAPI spec",
5
5
  "keywords": [
6
6
  "api",