From a914639eb5c45fac6d4f0faca239a01638477103 Mon Sep 17 00:00:00 2001 From: Artsiom Tsybulko Date: Mon, 27 Oct 2025 13:03:19 +0300 Subject: [PATCH 1/2] 45719 - add /api/doclist --- index.yml | 20 ++---------- p-doclist.yml | 89 +++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 91 insertions(+), 18 deletions(-) create mode 100644 p-doclist.yml diff --git a/index.yml b/index.yml index c759abcd..dfa30e70 100644 --- a/index.yml +++ b/index.yml @@ -43,24 +43,15 @@ paths: $ref: "./p-healthcheck.yml#/paths/~1healthz" /api/readyz: $ref: "./p-healthcheck.yml#/paths/~1readyz" + /api/doclist: + $ref: "./p-doclist.yml#/paths/~1doclist" tags: - name: process description: Everything about performing request and parsing response - - name: status_model - x-displayName: Status Model - description: | - - - name: text_model - x-displayName: Text Model - description: | - - name: images_model x-displayName: Images Model description: | - **Images model:** - - **Document image model:** - name: document_model x-displayName: Document Model @@ -69,10 +60,6 @@ tags: **Candidates model:** - - name: authenticity_model - x-displayName: Authenticity Model - description: | - x-tagGroups: - name: Requests @@ -82,11 +69,8 @@ x-tagGroups: - healthcheck - name: Models tags: - - status_model - - text_model - images_model - document_model - - authenticity_model components: schemas: diff --git a/p-doclist.yml b/p-doclist.yml new file mode 100644 index 00000000..dd008797 --- /dev/null +++ b/p-doclist.yml @@ -0,0 +1,89 @@ +openapi: 3.0.4 +paths: + /doclist: + get: + summary: "Returns the list of documents stored in the database that the Web Service API is running with." + operationId: doclist + responses: + 200: + description: "The list of documents stored in the database." + content: + application/json: + schema: + $ref: "#/components/schemas/DatabaseDocumentList" + +components: + schemas: + DatabaseDocumentList: + title: "DatabaseDocumentList" + type: object + required: + - items + properties: + items: + description: "The list of documents stored in the database." + type: array + items: + $ref: "#/components/schemas/DatabaseDocument" + + DatabaseDocument: + title: "DatabaseDocument" + type: object + required: + - barcode_fields + - country + - createad + - doc_type + - document + - graphic_fields + - id + - mrz + - rfid_chip + - text_fields + - updated + properties: + barcode_fields: + description: "Whether the document has a barcode." + type: boolean + country: + description: "Country name." + type: string + createad: + description: "Date when the document description was created in the database." + type: string + doc_type: + description: "Document type." + type: integer + document: + description: "Document name." + type: string + graphic_fields: + description: "The presence of graphic fields in the document." + type: boolean + id: + description: "Document code." + type: integer + mrz: + description: "The document has an MRZ." + type: boolean + region: + description: "Country region." + type: string + rfid_chip: + description: "The document has an RFID chip." + type: boolean + text_fields: + description: "The presence of text fields in the document." + type: boolean + updated: + description: "Date when the document description was updated in the database." + type: string + year: + description: "The year when the document was issued." + type: string + sovereignty: + description: "Guardian country." + type: string + deprecated: + description: "Whether the document has been withdrawn from circulation." + type: boolean From 0e8f7ed5666f5f803f83895cd4b0b9daeddb773e Mon Sep 17 00:00:00 2001 From: Artsiom Tsybulko Date: Tue, 28 Oct 2025 09:38:55 +0300 Subject: [PATCH 2/2] 45719 - add /api/doclist --- p-doclist.yml | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/p-doclist.yml b/p-doclist.yml index dd008797..961271f6 100644 --- a/p-doclist.yml +++ b/p-doclist.yml @@ -52,8 +52,7 @@ components: description: "Date when the document description was created in the database." type: string doc_type: - description: "Document type." - type: integer + $ref: "./e-document-type.yml#/components/schemas/DocumentType" document: description: "Document name." type: string @@ -85,5 +84,5 @@ components: description: "Guardian country." type: string deprecated: - description: "Whether the document has been withdrawn from circulation." + description: "Whether the document is no longer in circulation." type: boolean