Skip to content

[codex] Document public v4 answers endpoints#119

Merged
basit3407 merged 3 commits intomainfrom
codex/v4-answers-public-parity-docs
Apr 26, 2026
Merged

[codex] Document public v4 answers endpoints#119
basit3407 merged 3 commits intomainfrom
codex/v4-answers-public-parity-docs

Conversation

@basit3407
Copy link
Copy Markdown
Collaborator

What changed

This PR adds the public Content API v4 docs for the new answers endpoints introduced in the API repo.

Included changes only:

  • add /answers/by_ayah/{ayah_key} to openAPI/content/v4.json
  • add /answers/{question_id} to openAPI/content/v4.json
  • add /answers/count_within_range to openAPI/content/v4.json
  • add the generated MDX pages for those three endpoints in:
    • docs/content_apis_versioned/
    • docs/content_apis_versioned/4.0.0/

Scope

This branch intentionally contains only the answers-doc changes and no unrelated churn.

Why

The public API now exposes answers under Content API v4, so the OpenAPI spec and generated docs need to reflect the new public endpoints and response shapes.

Validation

  • yarn gen-all
  • yarn build

yarn build still fails in this repo due to an existing unrelated Markdown front matter parse error in:

  • docs/content_apis_versioned/posts-controller-feed.api.mdx

That failure is not caused by the answers docs in this PR.

Related

@cloudflare-workers-and-pages
Copy link
Copy Markdown

cloudflare-workers-and-pages Bot commented Apr 11, 2026

Deploying qf-api-docs with  Cloudflare Pages  Cloudflare Pages

Latest commit: e666b7a
Status: ✅  Deploy successful!
Preview URL: https://0cb1534f.qf-api-docs.pages.dev
Branch Preview URL: https://codex-v4-answers-public-pari.qf-api-docs.pages.dev

View logs

@basit3407 basit3407 marked this pull request as ready for review April 26, 2026 04:27
@basit3407 basit3407 requested a review from Copilot April 26, 2026 04:27
Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 2237c29994

ℹ️ 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".

Comment thread openAPI/content/v4.json
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds public documentation for new Content API v4 “Answers” endpoints by extending the OpenAPI spec and generating corresponding MDX API pages (latest + versioned 4.0.0) so the docs site can render these new resources.

Changes:

  • Added 3 new Answers endpoints to openAPI/content/v4.json (/answers/by_ayah/{ayah_key}, /answers/{question_id}, /answers/count_within_range) plus new schemas/responses.
  • Added generated MDX API docs pages for the 3 endpoints under docs/content_apis_versioned/ (latest).
  • Added the same generated MDX API docs pages under docs/content_apis_versioned/4.0.0/ (versioned).

Reviewed changes

Copilot reviewed 7 out of 7 changed files in this pull request and generated 9 comments.

Show a summary per file
File Description
openAPI/content/v4.json Documents new Answers endpoints and introduces associated DTO/error schemas.
docs/content_apis_versioned/list-ayah-answers.api.mdx Generated docs page for listing answers by ayah (latest).
docs/content_apis_versioned/get-answer-by-id.api.mdx Generated docs page for fetching an answer thread by question id (latest).
docs/content_apis_versioned/count-answers-within-range.api.mdx Generated docs page for counting answers in a verse range (latest).
docs/content_apis_versioned/4.0.0/list-ayah-answers.api.mdx Versioned (4.0.0) generated docs for listing answers by ayah.
docs/content_apis_versioned/4.0.0/get-answer-by-id.api.mdx Versioned (4.0.0) generated docs for fetching an answer thread by question id.
docs/content_apis_versioned/4.0.0/count-answers-within-range.api.mdx Versioned (4.0.0) generated docs for counting answers in a verse range.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread docs/content_apis_versioned/list-ayah-answers.api.mdx Outdated
Comment thread docs/content_apis_versioned/count-answers-within-range.api.mdx Outdated
Comment thread docs/content_apis_versioned/get-answer-by-id.api.mdx Outdated
Comment thread docs/content_apis_versioned/4.0.0/get-answer-by-id.api.mdx Outdated
Comment thread openAPI/content/v4.json
Comment thread docs/content_apis_versioned/4.0.0/list-ayah-answers.api.mdx Outdated
Comment thread docs/content_apis_versioned/4.0.0/count-answers-within-range.api.mdx Outdated
Comment thread docs/content_apis_versioned/list-ayah-answers.api.mdx
Comment thread docs/content_apis_versioned/4.0.0/list-ayah-answers.api.mdx
@basit3407
Copy link
Copy Markdown
Collaborator Author

@codex review

@chatgpt-codex-connector
Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Another round soon, please!

ℹ️ 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".

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds documentation for the new public Content API v4 “Answers” endpoints by updating the v4 OpenAPI spec and including the generated MDX pages in both the “latest” and “4.0.0” doc trees.

Changes:

  • Added three Answers paths to openAPI/content/v4.json with associated schemas and error responses.
  • Generated and added the corresponding .api.mdx pages for both unversioned and 4.0.0 versioned docs.
  • Updated both Content API sidebars to include a new “Answers” category pointing to the new pages.

Reviewed changes

Copilot reviewed 9 out of 9 changed files in this pull request and generated no comments.

Show a summary per file
File Description
openAPI/content/v4.json Adds the three Answers endpoints plus new Answers* DTO schemas and Answers-specific error response components.
docs/content_apis_versioned/sidebar.js Adds an “Answers” category to the latest Content API sidebar for discoverability.
docs/content_apis_versioned/list-ayah-answers.api.mdx New generated doc page for GET /answers/by_ayah/{ayah_key}.
docs/content_apis_versioned/get-answer-by-id.api.mdx New generated doc page for GET /answers/{question_id}.
docs/content_apis_versioned/count-answers-within-range.api.mdx New generated doc page for GET /answers/count_within_range.
docs/content_apis_versioned/4.0.0/sidebar.js Adds an “Answers” category to the v4.0.0 versioned sidebar.
docs/content_apis_versioned/4.0.0/list-ayah-answers.api.mdx Versioned (4.0.0) generated doc page for GET /answers/by_ayah/{ayah_key}.
docs/content_apis_versioned/4.0.0/get-answer-by-id.api.mdx Versioned (4.0.0) generated doc page for GET /answers/{question_id}.
docs/content_apis_versioned/4.0.0/count-answers-within-range.api.mdx Versioned (4.0.0) generated doc page for GET /answers/count_within_range.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@basit3407 basit3407 merged commit 2a0cc58 into main Apr 26, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

2 participants