Skip to content

Commit 72c8e55

Browse files
Create new endpoint for retrieving files of a specified version
1 parent 70caa69 commit 72c8e55

File tree

2 files changed

+198
-0
lines changed

2 files changed

+198
-0
lines changed

swagger_documentation/openapi.json

Lines changed: 108 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -524,6 +524,114 @@
524524
"x-subcategory": "Public Article"
525525
}
526526
},
527+
"/articles/{article_id}/versions/{version_id}/files": {
528+
"get": {
529+
"tags": [
530+
"articles"
531+
],
532+
"summary": "Public Article version files",
533+
"description": "Article version file details",
534+
"operationId": "article_version_files",
535+
"parameters": [
536+
{
537+
"name": "article_id",
538+
"in": "path",
539+
"description": "Article Unique identifier",
540+
"required": true,
541+
"schema": {
542+
"minimum": 1,
543+
"type": "integer",
544+
"format": "int64"
545+
}
546+
},
547+
{
548+
"name": "version_id",
549+
"in": "path",
550+
"description": "Article Version Unique identifier",
551+
"required": true,
552+
"schema": {
553+
"minimum": 1,
554+
"type": "integer",
555+
"format": "int64"
556+
}
557+
},
558+
{
559+
"name": "page",
560+
"in": "query",
561+
"description": "Page number. Used for pagination with page_size",
562+
"schema": {
563+
"maximum": 5000,
564+
"minimum": 1,
565+
"type": "integer",
566+
"format": "int64"
567+
}
568+
},
569+
{
570+
"name": "page_size",
571+
"in": "query",
572+
"description": "The number of results included on a page. Used for pagination with page",
573+
"schema": {
574+
"maximum": 1000,
575+
"minimum": 1,
576+
"type": "integer",
577+
"format": "int64",
578+
"default": 10
579+
}
580+
},
581+
{
582+
"name": "limit",
583+
"in": "query",
584+
"description": "Number of results included on a page. Used for pagination with query",
585+
"schema": {
586+
"maximum": 1000,
587+
"minimum": 1,
588+
"type": "integer",
589+
"format": "int64"
590+
}
591+
},
592+
{
593+
"name": "offset",
594+
"in": "query",
595+
"description": "Where to start the listing(the offset of the first result). Used for pagination with limit",
596+
"schema": {
597+
"maximum": 5000,
598+
"minimum": 0,
599+
"type": "integer",
600+
"format": "int64"
601+
}
602+
}
603+
],
604+
"responses": {
605+
"200": {
606+
"description": "OK. List of article files",
607+
"content": {
608+
"application/json": {
609+
"schema": {
610+
"type": "array",
611+
"items": {
612+
"$ref": "#/components/schemas/PublicFile"
613+
}
614+
}
615+
}
616+
}
617+
},
618+
"400": {
619+
"description": "Bad Request",
620+
"content": {}
621+
},
622+
"404": {
623+
"description": "Not Found",
624+
"content": {}
625+
},
626+
"500": {
627+
"description": "Internal Server Error",
628+
"content": {}
629+
}
630+
},
631+
"security": [],
632+
"x-subcategory": "Public Article files"
633+
}
634+
},
527635
"/articles/{article_id}/download": {
528636
"get": {
529637
"tags": [

swagger_documentation/swagger.json

Lines changed: 90 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -444,6 +444,96 @@
444444
}
445445
}
446446
},
447+
"/articles/{article_id}/versions/{version_id}/files": {
448+
"get": {
449+
"tags": [
450+
"articles"
451+
],
452+
"x-subcategory": "Public Article version files",
453+
"operationId": "article_version_files",
454+
"summary": "Article version file details",
455+
"description": "File by version id",
456+
"security": [],
457+
"parameters": [
458+
{
459+
"name": "article_id",
460+
"in": "path",
461+
"description": "Article Unique identifier",
462+
"required": true,
463+
"type": "integer",
464+
"format": "int64",
465+
"minimum": 1
466+
},
467+
{
468+
"name": "version_id",
469+
"in": "path",
470+
"description": "Article Version Unique identifier",
471+
"required": true,
472+
"type": "integer",
473+
"format": "int64",
474+
"minimum": 1
475+
},
476+
{
477+
"name": "page",
478+
"in": "query",
479+
"description": "Page number. Used for pagination with page_size",
480+
"required": false,
481+
"type": "integer",
482+
"format": "int64",
483+
"minimum": 1,
484+
"maximum": 5000
485+
},
486+
{
487+
"name": "page_size",
488+
"in": "query",
489+
"description": "The number of results included on a page. Used for pagination with page",
490+
"required": false,
491+
"type": "integer",
492+
"format": "int64",
493+
"minimum": 1,
494+
"maximum": 1000,
495+
"default": 10
496+
},
497+
{
498+
"name": "limit",
499+
"in": "query",
500+
"description": "Number of results included on a page. Used for pagination with query",
501+
"required": false,
502+
"type": "integer",
503+
"format": "int64",
504+
"minimum": 1,
505+
"maximum": 1000
506+
},
507+
{
508+
"name": "offset",
509+
"in": "query",
510+
"description": "Where to start the listing(the offset of the first result). Used for pagination with limit",
511+
"required": false,
512+
"type": "integer",
513+
"format": "int64",
514+
"minimum": 0,
515+
"maximum": 5000
516+
}
517+
],
518+
"responses": {
519+
"200": {
520+
"description": "OK. File representation",
521+
"schema": {
522+
"$ref": "#/definitions/PublicFile"
523+
}
524+
},
525+
"400": {
526+
"description": "Bad Request"
527+
},
528+
"404": {
529+
"description": "Not Found"
530+
},
531+
"500": {
532+
"description": "Internal Server Error"
533+
}
534+
}
535+
}
536+
},
447537
"/articles/{article_id}/download": {
448538
"get": {
449539
"tags": [

0 commit comments

Comments
 (0)