api_binding_ui 3.2.0 → 3.3.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.
package/README.md CHANGED
@@ -8,7 +8,7 @@ Spec: [`spec/FRAMEWORK.md`](spec/FRAMEWORK.md). Agent rules: [`SKILL.md`](SKILL.
8
8
 
9
9
  1. **Ids.** Every bindable component gets `componentId="<product>.<screen>[.<sub-screen>].<component>"`, e.g. `collections.worklist.add-notes.submit`.
10
10
  2. **Register.** List kinds and the screen → component → part tree in `registry.json` (below). The studio's navigation comes from it.
11
- 3. **Docs, once.** Download the OpenAPI file into the repo (e.g. `openapi/collections.yaml`). Orval, the studio and the generator all read that one file.
11
+ 3. **Docs, once.** Download the OpenAPI file into the repo (e.g. `openapi/index.yaml`). Orval, the studio and the generator all read that one file.
12
12
  4. **Generate, then wire once.** Run Orval (below) and `npx api-binding generate bindings.json`. Every screen gets its hook with nothing bound yet; each screen calls it and falls back to its own values:
13
13
 
14
14
  ```tsx
@@ -41,6 +41,8 @@ export default defineConfig({ plugins: [/* …, */ bindingStudio()] }); // rea
41
41
  - Adds a floating **Bind API** button to every HTML page (SPA and server-rendered). It opens the studio over the app on the screen being shown, found from the `data-component-id` attributes the user can see; anything covered by a layer above it does not count.
42
42
  - **Alt+click** any component to open the studio on it; holding Alt outlines components.
43
43
  - The studio is served by the dev server under `/__binding/`, which reads and writes `bindings.json` and fetches the docs server-side. Writes are same-origin only.
44
+ - Orval's OpenAPI loader needs `ajv@8`; package managers that hoist an older ajv (bun does) need `ajv@^8` added as a devDependency.
45
+ - On start it generates the API client (runs the app's `orval.config.ts`, when present) and the screen hooks, before the server takes requests, so a project can run without committed generated code.
44
46
  - Every save, and every edit of `registry.json`, regenerates the screen hooks (errors are printed in the dev server's terminal; nothing is written then). Vite does not watch `bindings.json`, so a save never reloads the page under the studio.
45
47
 
46
48
  ## registry.json