DEV-12120: document supported document type schemas - #348
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.
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. |
Documents the account-scoped supported document type catalog and its on-demand extraction schema detail. The contract preserves every account-allowed option while exposing public catalog metadata only where a detail response exists.
Changes
GET /documents/typeswith optional description and schema metadata while keepingcodeandlabelrequired for every option.GET /documents/types/{code}for catalog-visible sanitized extraction-field structure and clarify that option-only list values return 404 from detail.document_representation.payloadvalidation in the API reference.usercomponent required to resolve existing OpenAPI references.Out-of-Scope Feedback
Testing
code/label, optional catalog metadata, the detail endpoint, option-only example, and public-safeuserschema.npm run generate:types --workspace @terminal49/sdknpm run build --workspace @terminal49/sdknpm run type-check --workspace @terminal49/sdknpm run lint --workspace @terminal49/sdknpm run test --workspace @terminal49/mcp -- --run src/annotations.test.tsnpm run test --workspace @terminal49/mcp -- --runcd docs && npx -y mintlify@latest broken-links.git diff --check.Terminal49-API.postman_collection.jsonis unchanged fromorigin/main.npx -y @stoplight/spectral-cli@6.16.3 lint --ruleset .spectral.mjs docs/openapi.jsoncannot fetch the deleted remote branchfeat/container-event-timestampsand returns HTTP 404.Evidence:
Attached Images and Videos
🎥 View recording: dev12120-final-docs-flow.webm
Session Details
(aside)to your comment to have me ignore it.Need help on this PR? Tag
@codesmith-botwith what you need. Autofix is disabled.Greptile Summary
This PR documents account-visible document-type metadata and a detail endpoint exposing sanitized extraction-field structure, while clarifying the distinction from versioned payload-validation schemas.
Confidence Score: 4/5
The generated TypeScript contract should be synchronized before merging; the malformed Postman detail example should also be corrected.
The OpenAPI source exposes a new typed operation that is absent from the committed SDK definitions, while the generated Postman response presents circular-reference diagnostics as example data.
Files Needing Attention: docs/openapi.json, sdks/typescript-sdk/src/generated/terminal49.ts, Terminal49-API.postman_collection.json
Important Files Changed
Flowchart
%%{init: {'theme': 'neutral'}}%% flowchart LR OpenAPI[docs/openapi.json] --> Docs[Mintlify API reference] OpenAPI --> Postman[Postman collection] OpenAPI --> Generator[SDK generate:types] Generator --> SDK[Generated TypeScript paths and schemas] List[GET /documents/types] --> Detail[GET /documents/types/code] Detail --> Sanitized[Sanitized extraction-field structure] Versioned[GET /document_schemas/id] --> Validator[Representation payload validator]Prompt To Fix All With AI
Reviews (1): Last reviewed commit: "chore: Auto-generate Postman collection ..." | Re-trigger Greptile