Conversation
|
Preview deployment for your docs. Learn more about Mintlify Previews.
|
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
| "/documents/types/{code}": { | ||
| "get": { |
There was a problem hiding this comment.
Generated SDK contract is stale
When TypeScript SDK consumers use the newly documented detail endpoint, the committed generated contract contains neither GET /documents/types/{code} nor its response schemas, so the endpoint and response types are unavailable from the package. Regenerate sdks/typescript-sdk/src/generated/terminal49.ts from this OpenAPI update.
Knowledge Base Used: TypeScript SDK models and generation
Prompt To Fix With AI
This is a comment left during a code review.
Path: docs/openapi.json
Line: 9506-9507
Comment:
**Generated SDK contract is stale**
When TypeScript SDK consumers use the newly documented detail endpoint, the committed generated contract contains neither `GET /documents/types/{code}` nor its response schemas, so the endpoint and response types are unavailable from the package. Regenerate `sdks/typescript-sdk/src/generated/terminal49.ts` from this OpenAPI update.
**Knowledge Base Used:** [TypeScript SDK models and generation](https://app.greptile.com/terminal49/-/custom-context/knowledge-base/terminal49/api/-/docs/typescript-sdk-models-and-generation.md)
---
For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!
There was a problem hiding this comment.
Addressed in 4057614. The TypeScript SDK contract was regenerated from the updated OpenAPI source; SDK build, typecheck, and lint all pass.
| "value": "application/json" | ||
| } | ||
| ], | ||
| "body": "{\n \"document_type\": {\n \"code\": \"<string>\",\n \"label\": \"<string>\",\n \"description\": \"<string>\",\n \"schema\": {\n \"id\": \"<string>\",\n \"version\": \"<string>\",\n \"format\": \"json_schema\",\n \"payload\": {\n \"type\": \"<string>\",\n \"format\": \"<string>\",\n \"enum\": [\n \"\",\n \"\"\n ],\n \"properties\": {\n \"key_0\": {\n \"value\": \"<Circular reference to #/components/schemas/sanitized_extraction_schema detected>\"\n }\n },\n \"items\": {\n \"value\": \"<Circular reference to #/components/schemas/sanitized_extraction_schema detected>\"\n },\n \"required\": [\n \"<string>\",\n \"<string>\"\n ]\n }\n }\n }\n}", |
There was a problem hiding this comment.
Circular-reference diagnostics pollute example
The generated detail response contains literal <Circular reference ... detected> values under payload.properties and payload.items. This exposes generator diagnostics instead of realistic response data, making the new endpoint's primary Postman example misleading and unusable as a sample payload.
Prompt To Fix With AI
This is a comment left during a code review.
Path: Terminal49-API.postman_collection.json
Line: 9455
Comment:
**Circular-reference diagnostics pollute example**
The generated detail response contains literal `<Circular reference ... detected>` values under `payload.properties` and `payload.items`. This exposes generator diagnostics instead of realistic response data, making the new endpoint's primary Postman example misleading and unusable as a sample payload.
---
For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.There was a problem hiding this comment.
Resolved by rebasing onto current main and force-pushing the reviewed source changes. Terminal49-API.postman_collection.json is now unchanged from origin/main, so the generated circular-reference example is no longer part of this PR.
There was a problem hiding this comment.
Dismissing. Terminal49-API.postman_collection.json is generated by .github/workflows/generate_postman.yml on every push that touches docs/openapi.json and is not hand-edited (AGENTS.md). The <Circular reference ...> placeholder is openapi-to-postman's schema faker hitting sanitized_extraction_schema, which is genuinely recursive (a JSON Schema whose properties/items are schemas). Fixing the placeholder would mean either flattening the real contract or hand-editing a generated artifact; neither is worth it for a sample value.
311fb49 to
4057614
Compare
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
9bb386e to
b6ef855
Compare
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
Drops unrelated formatting churn, reuses #/components/schemas/error for the 401/404 responses, removes non-conventional additionalProperties:false, removes a customer name from a public description, and narrows the user component to verified fields.
Also inlines the single-use route include constant.
b6ef855 to
8c515e6
Compare
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
1c926b0 to
71e2d65
Compare
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 71e2d65302
ℹ️ 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".
| @@ -9366,12 +9366,12 @@ | |||
| "value": "application/json" | |||
| } | |||
| ], | |||
| "body": "{\n \"document_types\": [\n {\n \"code\": \"<string>\",\n \"label\": \"<string>\"\n },\n {\n \"code\": \"<string>\",\n \"label\": \"<string>\"\n }\n ]\n}", | |||
| "body": "{\n \"document_types\": [\n {\n \"code\": \"<string>\",\n \"label\": \"<string>\",\n \"description\": \"<string>\",\n \"schema\": {\n \"id\": \"<string>\",\n \"version\": \"<string>\",\n \"detail_url\": \"<string>\"\n }\n },\n {\n \"code\": \"<string>\",\n \"label\": \"<string>\",\n \"description\": \"<string>\",\n \"schema\": {\n \"id\": \"<string>\",\n \"version\": \"<string>\",\n \"detail_url\": \"<string>\"\n }\n }\n ]\n}", | |||
There was a problem hiding this comment.
Publish usable document-type examples in Postman
When consumers import the regenerated Postman collection, this example shows every list item with schema, contradicting the newly documented option-only shape; the detail example also contains literal <Circular reference ... detected> placeholders instead of a usable extraction schema. Ensure the OpenAPI source/generation configuration emits the concrete examples already defined in the spec, then regenerate the collection rather than publishing these schema-faked responses.
AGENTS.md reference: AGENTS.md:L51-L53
Useful? React with 👍 / 👎.
Documents the account-scoped document type catalog (
GET /documents/types) and the new on-demand detail endpoint (GET /documents/types/{code}) that returns a type's sanitized extraction-field structure. Regenerates the TypeScript SDK contract from the updated spec.Changes
GET /documents/types:codeandlabelstay required for every option; catalog-visible types additionally returndescriptionandschema.{id,version,detail_url}.GET /documents/types/{code}: new operation returningdocument_type_detailwith a recursivesanitized_extraction_schemapayload. Option-only codes return404.document_schemas/{id}payload used to validatedocument_representation.payload.#/components/schemas/usercomponent (id, type, openattributes) so the SDK generator resolves every$ref.#/components/schemas/errorlike the rest of the spec;additionalProperties: falseis kept only onsanitized_extraction_schema, where it encodes the sanitizer's key allow-list.sdks/typescript-sdk/src/generated/terminal49.ts. The undocumented/containers/{id}/routepath drops out of the generated types, soContainerManager.route()now usestransport.executeManual, matching the existingcustom_fieldscalls.documents/get-a-document-typeand nav entry; descriptions updated on the list and document-schema pages.Test plan
Run locally on the rebased head:
npm run generate:types --workspace @terminal49/sdk(committed output)npm run build --workspace @terminal49/sdk,npm run type-check --workspace @terminal49/sdk,npm run lint --workspace @terminal49/sdknpm run test --workspace @terminal49/sdk -- --run(106 passed, 1 skipped)npm run docs --workspace @terminal49/sdkleavesdocs/sdk/referenceunchangednpm run build --workspace @terminal49/mcp && npm run test --workspace @terminal49/mcp -- --run(223 passed)npx tsc --noEmit -p tsconfig.jsoncd docs && npx -y mintlify@latest broken-links(no broken links)git diff --checkspectral lint --ruleset .spectral.mjs docs/openapi.jsonfails to fetch the remote ruleset (HTTP 404 for branchfeat/container-event-timestamps). Pre-existing; not fixed here.Not verified: the shapes above against a live backend response.
user.attributesis left open for that reason.