Skip to content

📘 Add shared fields/word_fields reference and make endpoint references clickable#11

Merged
osamasayed merged 27 commits intoquran:mainfrom
basit3407:main
Jul 1, 2025
Merged

📘 Add shared fields/word_fields reference and make endpoint references clickable#11
osamasayed merged 27 commits intoquran:mainfrom
basit3407:main

Conversation

@basit3407
Copy link
Copy Markdown
Collaborator

@basit3407 basit3407 commented Jun 26, 2025

This PR includes the following documentation improvements (excluding the previously added mushafId parameter, which has now been reverted):

  1. 📘 Added a centralized field-reference.mdx page listing supported values for:
    • fields (verse-level fields)
    • word_fields (word-level fields)

These are used across multiple endpoints (e.g. /v4/verses/by_page) and are now referenced with clickable links in the relevant query parameter descriptions.

  1. 🔗 Made all endpoint references clickable across the docs:
    • /resources/recitations now links from endpoints like /recitations/{recitation_id}/by_chapter/...
    • /resources/translations linked from /translations/{translation_id}/by_chapter/...
    • /resources/tafsirs and /resources/languages linked from their respective usages

These improvements enhance cross-navigation and help developers explore related API endpoints more easily.

basit3407 added 18 commits June 24, 2025 11:02
in random verse endpoint

Added missing documentation for existing query parameters supported by the random verse endpoint:

- chapter_number
- page_number
- juz_number
- hizb_number
- rub_el_hizb_number
- ruku_number
- manzil_number

These parameters were already supported in the API but not reflected in the documentation. This update ensures developers are aware of all available filtering options when using the endpoint.
/tafsirs/{resource_id}/by_ayah/{ayah_key}

Fixed the incorrect response schema shown for the /tafsirs/{resource_id}/by_ayah/{ayah_key} endpoint in the docs.

The autogenerated version via <ApiTabs> was causing runtime crashes due to unresolved OpenAPI store references. Since that approach wasn't working despite correct infoPath and operationId setup, we manually wrote the MDX documentation using standard Docusaurus components.

Tested locally – page now renders successfully and reflects the accurate response structure.
list-ayah-tafsirs and regenerate MDX

Updated the OpenAPI schema (v4.json) for the /tafsirs/{resource_id}/by_ayah/{ayah_key} endpoint to ensure the response structure reflects the actual API output.

The previous crash with <ApiTabs> was due to incorrect or incomplete schema context. After fixing the schema, we ran:

- yarn clean-all
- yarn gen-all
- yarn start

The generated docs now render correctly and reflect the accurate response, eliminating the need for manual overrides.
…aceholders-in-v4.json

Fix unrendered model placeholders
…-tokens-in-v4.json

Fix placeholder endpoints
…in-get-todays-plan-api

Fix mushafId param docs
@vercel
Copy link
Copy Markdown

vercel Bot commented Jun 26, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
qf-api-docs ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jul 1, 2025 11:58am
@basit3407 basit3407 changed the title 📘 Add missing mushafId query parameter documentation to /v1/goals/get-todays-plan endpoint Jun 27, 2025
…g-other-endpoints

docs: link resource references
@basit3407 basit3407 changed the title 📘 Document mushafId for /v1/goals/get-todays-plan and add shared fields/word_fields reference Jun 27, 2025
Comment thread openAPI/user-related-apis/v1.json Outdated
…ushafid-in-get-todays-plan-api"

This reverts commit c498c43, reversing
changes made to 0969369.
@basit3407 basit3407 changed the title 📘 Document mushafId, add shared fields/word_fields reference, and make endpoint references clickable Jul 1, 2025
@basit3407 basit3407 requested a review from osamasayed July 1, 2025 12:05
@osamasayed osamasayed merged commit 900eba0 into quran:main Jul 1, 2025
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

2 participants