Skip to content

Commit 5e4afeb

Browse files
authored
Document bulk Quran script endpoints in v4 OpenAPI (#32)
* Document bulk Quran verses script endpoint * add /quran/verses/{script} path to v4 OpenAPI spec with supported scripts and filters * document pagination and sample payload matching existing verse schema * Document indopak nastaleeq script endpoint * add /quran/verses/indopak_nastaleeq path to v4 OpenAPI spec with structural filters * describe response payload containing text_indopak_nastaleeq verse text and sample data
1 parent effc78e commit 5e4afeb

7 files changed

Lines changed: 670 additions & 2 deletions

File tree

‎docs/content_apis_versioned/4.0.0/quran-verses-by-script.api.mdx‎

Lines changed: 74 additions & 0 deletions
Large diffs are not rendered by default.

‎docs/content_apis_versioned/4.0.0/quran-verses-indopak-nastaleeq.api.mdx‎

Lines changed: 74 additions & 0 deletions
Large diffs are not rendered by default.

‎docs/content_apis_versioned/4.0.0/sidebar.js‎

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎docs/content_apis_versioned/quran-verses-by-script.api.mdx‎

Lines changed: 74 additions & 0 deletions
Large diffs are not rendered by default.

‎docs/content_apis_versioned/quran-verses-indopak-nastaleeq.api.mdx‎

Lines changed: 74 additions & 0 deletions
Large diffs are not rendered by default.

‎docs/content_apis_versioned/sidebar.js‎

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎openAPI/content/v4.json‎

Lines changed: 372 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2972,6 +2972,218 @@
29722972
}
29732973
}
29742974
},
2975+
"/quran/verses/{script}": {
2976+
"get": {
2977+
"tags": [
2978+
"Quran"
2979+
],
2980+
"summary": "Get Quran verses in a specific script",
2981+
"description": "Stream the complete Quran text in the requested script. Use the structural filters to limit results to a chapter, juz, hizb, rub el hizb, manzil, ruku, or page.",
2982+
"operationId": "quran-verses-by-script",
2983+
"parameters": [
2984+
{
2985+
"name": "script",
2986+
"in": "path",
2987+
"description": "Script identifier for the response payload. Supported values: `uthmani`, `uthmani_simple`, `uthmani_tajweed`, `indopak`, `indopak_nastaleeq`, `imlaei`, `imlaei_simple`, `qpc_hafs`, `qpc_nastaleeq`, `code_v1`, `code_v2`, `v1_image`.",
2988+
"required": true,
2989+
"schema": {
2990+
"type": "string",
2991+
"enum": [
2992+
"uthmani",
2993+
"uthmani_simple",
2994+
"uthmani_tajweed",
2995+
"indopak",
2996+
"indopak_nastaleeq",
2997+
"imlaei",
2998+
"imlaei_simple",
2999+
"qpc_hafs",
3000+
"qpc_nastaleeq",
3001+
"code_v1",
3002+
"code_v2",
3003+
"v1_image"
3004+
]
3005+
}
3006+
},
3007+
{
3008+
"name": "chapter_number",
3009+
"in": "query",
3010+
"description": "Filter verses to a specific surah.",
3011+
"schema": {
3012+
"maximum": 114,
3013+
"minimum": 1,
3014+
"type": "integer"
3015+
}
3016+
},
3017+
{
3018+
"name": "juz_number",
3019+
"in": "query",
3020+
"description": "Filter verses to a specific juz.",
3021+
"schema": {
3022+
"maximum": 30,
3023+
"minimum": 1,
3024+
"type": "integer"
3025+
}
3026+
},
3027+
{
3028+
"name": "page_number",
3029+
"in": "query",
3030+
"description": "Filter verses to a Madani Mushaf page.",
3031+
"schema": {
3032+
"maximum": 604,
3033+
"minimum": 1,
3034+
"type": "integer"
3035+
}
3036+
},
3037+
{
3038+
"name": "hizb_number",
3039+
"in": "query",
3040+
"description": "Filter verses to a specific hizb.",
3041+
"schema": {
3042+
"maximum": 60,
3043+
"minimum": 1,
3044+
"type": "integer"
3045+
}
3046+
},
3047+
{
3048+
"name": "rub_el_hizb_number",
3049+
"in": "query",
3050+
"description": "Filter verses to a specific rub el hizb.",
3051+
"schema": {
3052+
"maximum": 240,
3053+
"minimum": 1,
3054+
"type": "integer"
3055+
}
3056+
},
3057+
{
3058+
"name": "manzil_number",
3059+
"in": "query",
3060+
"description": "Filter verses to a specific manzil.",
3061+
"schema": {
3062+
"maximum": 7,
3063+
"minimum": 1,
3064+
"type": "integer"
3065+
}
3066+
},
3067+
{
3068+
"name": "ruku_number",
3069+
"in": "query",
3070+
"description": "Filter verses to a specific ruku.",
3071+
"schema": {
3072+
"maximum": 558,
3073+
"minimum": 1,
3074+
"type": "integer"
3075+
}
3076+
},
3077+
{
3078+
"name": "verse_key",
3079+
"in": "query",
3080+
"description": "Fetch a single ayah by its `chapter:verse` key.",
3081+
"schema": {
3082+
"type": "string"
3083+
}
3084+
},
3085+
{
3086+
"name": "page",
3087+
"in": "query",
3088+
"description": "Result page number (pagination).",
3089+
"schema": {
3090+
"type": "integer",
3091+
"default": 1
3092+
}
3093+
},
3094+
{
3095+
"name": "per_page",
3096+
"in": "query",
3097+
"description": "Records per page (maximum 50).",
3098+
"schema": {
3099+
"maximum": 50,
3100+
"minimum": 1,
3101+
"type": "integer",
3102+
"default": 10
3103+
}
3104+
}
3105+
],
3106+
"responses": {
3107+
"200": {
3108+
"description": "Successful response",
3109+
"content": {
3110+
"application/json": {
3111+
"schema": {
3112+
"type": "object",
3113+
"properties": {
3114+
"verses": {
3115+
"type": "array",
3116+
"items": {
3117+
"$ref": "#/components/schemas/verse"
3118+
}
3119+
},
3120+
"pagination": {
3121+
"$ref": "#/components/schemas/pagination"
3122+
}
3123+
}
3124+
},
3125+
"example": {
3126+
"verses": [
3127+
{
3128+
"id": 1,
3129+
"verse_key": "1:1",
3130+
"chapter_id": 1,
3131+
"text_uthmani": "بِسْمِ ٱللَّهِ ٱلرَّحْمَٰنِ ٱلرَّحِيمِ",
3132+
"code_v1": null,
3133+
"code_v2": null,
3134+
"image_url": null,
3135+
"juz_number": 1,
3136+
"hizb_number": 1,
3137+
"rub_el_hizb_number": 1,
3138+
"manzil_number": 1,
3139+
"ruku_number": 1,
3140+
"page_number": 1
3141+
}
3142+
],
3143+
"pagination": {
3144+
"per_page": 10,
3145+
"current_page": 1,
3146+
"next_page": 2,
3147+
"total_pages": 62,
3148+
"total_records": 6236
3149+
}
3150+
}
3151+
}
3152+
}
3153+
},
3154+
"400": {
3155+
"$ref": "#/components/responses/invalidRequest"
3156+
},
3157+
"401": {
3158+
"$ref": "#/components/responses/unauthorized"
3159+
},
3160+
"403": {
3161+
"$ref": "#/components/responses/forbidden"
3162+
},
3163+
"404": {
3164+
"$ref": "#/components/responses/notFound"
3165+
},
3166+
"422": {
3167+
"$ref": "#/components/responses/unprocessableEntity"
3168+
},
3169+
"500": {
3170+
"$ref": "#/components/responses/internalServerError"
3171+
},
3172+
"502": {
3173+
"$ref": "#/components/responses/badGateway"
3174+
},
3175+
"503": {
3176+
"$ref": "#/components/responses/serviceUnavailable"
3177+
},
3178+
"504": {
3179+
"$ref": "#/components/responses/gatewayTimeout"
3180+
},
3181+
"429": {
3182+
"$ref": "#/components/responses/rateLimitExceeded"
3183+
}
3184+
}
3185+
}
3186+
},
29753187
"/quran/verses/indopak": {
29763188
"get": {
29773189
"tags": [
@@ -3122,6 +3334,166 @@
31223334
}
31233335
}
31243336
},
3337+
"/quran/verses/indopak_nastaleeq": {
3338+
"get": {
3339+
"tags": [
3340+
"Quran"
3341+
],
3342+
"summary": "Get Indopak Nastaleeq Script of ayah",
3343+
"description": "Get Indopak Nastaleeq script of ayah. Use query strings to filter results, leave all query string blank if you want to fetch Indopak Nastaleeq script of whole Quran.",
3344+
"operationId": "QURAN-verses-indopak-nastaleeq",
3345+
"parameters": [
3346+
{
3347+
"name": "chapter_number",
3348+
"in": "query",
3349+
"description": "If you want to get Indopak Nastaleeq script of a specific surah.",
3350+
"schema": {
3351+
"maximum": 114,
3352+
"minimum": 1,
3353+
"type": "integer"
3354+
}
3355+
},
3356+
{
3357+
"name": "juz_number",
3358+
"in": "query",
3359+
"description": "If you want to get Indopak Nastaleeq script of a specific juz.",
3360+
"schema": {
3361+
"maximum": 30,
3362+
"minimum": 1,
3363+
"type": "integer"
3364+
}
3365+
},
3366+
{
3367+
"name": "page_number",
3368+
"in": "query",
3369+
"description": "If you want to get Indopak Nastaleeq script of a Madani Mushaf page",
3370+
"schema": {
3371+
"maximum": 604,
3372+
"minimum": 1,
3373+
"type": "integer"
3374+
}
3375+
},
3376+
{
3377+
"name": "hizb_number",
3378+
"in": "query",
3379+
"description": "If you want to get Indopak Nastaleeq script of a specific hizb.",
3380+
"schema": {
3381+
"maximum": 60,
3382+
"minimum": 1,
3383+
"type": "integer"
3384+
}
3385+
},
3386+
{
3387+
"name": "rub_el_hizb_number",
3388+
"in": "query",
3389+
"description": "If you want to get Indopak Nastaleeq script of a specific Rub el Hizb.",
3390+
"schema": {
3391+
"maximum": 240,
3392+
"minimum": 1,
3393+
"type": "integer"
3394+
}
3395+
},
3396+
{
3397+
"name": "manzil_number",
3398+
"in": "query",
3399+
"description": "If you want to get Indopak Nastaleeq script of a specific manzil.",
3400+
"schema": {
3401+
"maximum": 7,
3402+
"minimum": 1,
3403+
"type": "integer"
3404+
}
3405+
},
3406+
{
3407+
"name": "ruku_number",
3408+
"in": "query",
3409+
"description": "If you want to get Indopak Nastaleeq script of a specific ruku.",
3410+
"schema": {
3411+
"maximum": 558,
3412+
"minimum": 1,
3413+
"type": "integer"
3414+
}
3415+
},
3416+
{
3417+
"name": "verse_key",
3418+
"in": "query",
3419+
"description": "If you want to get Indopak Nastaleeq script of a specific ayah.",
3420+
"schema": {
3421+
"type": "string"
3422+
}
3423+
}
3424+
],
3425+
"responses": {
3426+
"200": {
3427+
"description": "Successful response",
3428+
"content": {
3429+
"application/json": {
3430+
"schema": {
3431+
"type": "object",
3432+
"properties": {
3433+
"verses": {
3434+
"type": "array",
3435+
"items": {
3436+
"type": "object",
3437+
"properties": {
3438+
"id": {
3439+
"type": "integer"
3440+
},
3441+
"verse_key": {
3442+
"type": "string"
3443+
},
3444+
"text_indopak_nastaleeq": {
3445+
"type": "string"
3446+
}
3447+
}
3448+
}
3449+
}
3450+
}
3451+
},
3452+
"example": {
3453+
"verses": [
3454+
{
3455+
"id": 1,
3456+
"verse_key": "1:1",
3457+
"text_indopak_nastaleeq": "بِسۡمِ اللهِ الرَّحۡمٰنِ الرَّحِيمِ"
3458+
}
3459+
]
3460+
}
3461+
}
3462+
}
3463+
},
3464+
"400": {
3465+
"$ref": "#/components/responses/invalidRequest"
3466+
},
3467+
"401": {
3468+
"$ref": "#/components/responses/unauthorized"
3469+
},
3470+
"403": {
3471+
"$ref": "#/components/responses/forbidden"
3472+
},
3473+
"404": {
3474+
"$ref": "#/components/responses/notFound"
3475+
},
3476+
"422": {
3477+
"$ref": "#/components/responses/unprocessableEntity"
3478+
},
3479+
"500": {
3480+
"$ref": "#/components/responses/internalServerError"
3481+
},
3482+
"502": {
3483+
"$ref": "#/components/responses/badGateway"
3484+
},
3485+
"503": {
3486+
"$ref": "#/components/responses/serviceUnavailable"
3487+
},
3488+
"504": {
3489+
"$ref": "#/components/responses/gatewayTimeout"
3490+
},
3491+
"429": {
3492+
"$ref": "#/components/responses/rateLimitExceeded"
3493+
}
3494+
}
3495+
}
3496+
},
31253497
"/quran/verses/uthmani_tajweed": {
31263498
"get": {
31273499
"tags": [

0 commit comments

Comments
 (0)