docs: correct Management API spec response schemas and rename spec file#604
docs: correct Management API spec response schemas and rename spec file#604d-klotz wants to merge 2 commits into
Conversation
Rename `Frigg Management API.yml` -> `frigg-management-api.yml`. The spaces broke unquoted shell paths, tripped some editors, and required URL/`<>` escaping in links. Updated all 40 references (20 swagger `src` + 20 link targets) in api-reference.md. No spec content change; Redocly still valid; embeds remain 1:1 with the spec. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Follow-up to PR #602. The response schemas/examples were partly inherited from the original GitBook spec and partly loose guesses; align them to the actual router code and the Entity Prisma model: - Entity: model the real persisted shape (id, userId, credentialId, name, moduleName, externalId, data, timestamps) instead of the guessed {id,user,name} - AuthCallbackResult: { credential_id, entity_id, type } with concrete example values (were {{generated...}} placeholders that leaked into a response body) - AuthorizationRequirements / Options: align to observed shapes (oauth `url` vs apiKey `jsonSchema`; `options` arrays) instead of asserting jsonSchema/uiSchema - Replace remaining {{...}} placeholders in request/response examples with concrete values; keep {{var}} only on reusable path/header parameters - Reference (skills/frigg/.../management-api.md): POST /api/authorize returns `type`, not `entityType` (matches process-authorization-callback.js) Re-validated: Redocly valid; 16 paths / 20 operations; all $refs resolve. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
|
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: ba86ee676d
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| jsonSchema: | ||
| type: object | ||
| additionalProperties: true | ||
| description: JSON Schema describing the credential form (API-key modules). | ||
| uiSchema: | ||
| type: object | ||
| additionalProperties: true |
There was a problem hiding this comment.
Document nested form requirements
For API-key/form auth modules, the management route returns the module's authorization requirements verbatim (integration-router.js calls module.getAuthorizationRequirements()), and the existing CLI/form consumers read the schema from authReqs.data.jsonSchema/authReqs.data.uiSchema (see packages/devtools/frigg-cli/auth-command/api-key-flow.js). Moving these fields to top-level here will make generated docs/clients tell users to read response.jsonSchema, which is undefined for those modules, so form-based authorization flows will not render correctly.
Useful? React with 👍 / 👎.



Summary
"Frigg Management API.yml"→frigg-management-api.yml(spaces in filename broke unquoted shell/editor paths){% swagger %}embeds indocs/reference/api-reference.mdto reference the new filenameEntityschema now matches the Prisma model (id,userId,credentialId,name,moduleName,externalId,data,createdAt,updatedAt)AuthCallbackResult(POST /api/authorizeresponse) uses concrete example values ("7","12","hubspot") — no more{{generatedCredentialId}}placeholders in response bodiesOptionsresponse schema correctly typed as{ options: array }AuthorizationRequirementsschema covers both OAuth ({ type: "oauth2", url: "..." }) and API-key ({ type: "apiKey", jsonSchema: {...} }) flowsmanagement-api.mdreference: authorize callback response fieldentityType→type(matchesprocess-authorization-callback.jsline 142)Test plan
docs/.gitbook/assets/frigg-management-api.ymlinto Postman — no validation errorsPOST /api/authorizeresponse example shows{ "credential_id": "12", "entity_id": "7", "type": "hubspot" }(no{{...}}placeholders)🤖 Generated with Claude Code
📦 Published PR as canary version:
2.0.0--canary.604.ba86ee6.0✨ Test out this PR locally via:
npm install @friggframework/core@2.0.0--canary.604.ba86ee6.0 npm install @friggframework/devtools@2.0.0--canary.604.ba86ee6.0 npm install @friggframework/eslint-config@2.0.0--canary.604.ba86ee6.0 npm install @friggframework/prettier-config@2.0.0--canary.604.ba86ee6.0 npm install @friggframework/schemas@2.0.0--canary.604.ba86ee6.0 npm install @friggframework/serverless-plugin@2.0.0--canary.604.ba86ee6.0 npm install @friggframework/test@2.0.0--canary.604.ba86ee6.0 npm install @friggframework/ui@2.0.0--canary.604.ba86ee6.0 # or yarn add @friggframework/core@2.0.0--canary.604.ba86ee6.0 yarn add @friggframework/devtools@2.0.0--canary.604.ba86ee6.0 yarn add @friggframework/eslint-config@2.0.0--canary.604.ba86ee6.0 yarn add @friggframework/prettier-config@2.0.0--canary.604.ba86ee6.0 yarn add @friggframework/schemas@2.0.0--canary.604.ba86ee6.0 yarn add @friggframework/serverless-plugin@2.0.0--canary.604.ba86ee6.0 yarn add @friggframework/test@2.0.0--canary.604.ba86ee6.0 yarn add @friggframework/ui@2.0.0--canary.604.ba86ee6.0