Bugzilla – Attachment 152897 Details for
Bug 33105
Add vendor issues
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 33105: REST API specs
Bug-33105-REST-API-specs.patch (text/plain), 5.65 KB, created by
Marcel de Rooy
on 2023-06-30 10:00:38 UTC
(
hide
)
Description:
Bug 33105: REST API specs
Filename:
MIME Type:
Creator:
Marcel de Rooy
Created:
2023-06-30 10:00:38 UTC
Size:
5.65 KB
patch
obsolete
>From ab845a69639debab792d75652bec55ab9f26bd31 Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Tue, 11 Apr 2023 23:12:18 +0200 >Subject: [PATCH] Bug 33105: REST API specs >Content-Type: text/plain; charset=utf-8 > >Signed-off-by: Jonathan Field <jonathan.fieeld@ptfs-europe.com> >--- > api/v1/swagger/definitions/vendor_issue.yaml | 37 ++++++++ > .../paths/acquisitions_vendor_issues.yaml | 92 +++++++++++++++++++ > api/v1/swagger/swagger.yaml | 4 + > 3 files changed, 133 insertions(+) > create mode 100644 api/v1/swagger/definitions/vendor_issue.yaml > create mode 100644 api/v1/swagger/paths/acquisitions_vendor_issues.yaml > >diff --git a/api/v1/swagger/definitions/vendor_issue.yaml b/api/v1/swagger/definitions/vendor_issue.yaml >new file mode 100644 >index 0000000000..a281a84f59 >--- /dev/null >+++ b/api/v1/swagger/definitions/vendor_issue.yaml >@@ -0,0 +1,37 @@ >+--- >+type: object >+properties: >+ issue_id: >+ type: integer >+ description: internally assigned vendor identifier >+ readOnly: true >+ vendor_id: >+ type: >+ - string >+ description: Vendor id >+ type: >+ type: >+ - string >+ - "null" >+ description: Type of the issue >+ started_on: >+ type: >+ - string >+ - "null" >+ description: Start date >+ ended_on: >+ type: >+ - string >+ - "null" >+ description: End date >+ notes: >+ type: >+ - string >+ - "null" >+ description: Notes >+ _strings: >+ type: >+ - object >+ - "null" >+ description: A list of stringified coded values >+additionalProperties: false >diff --git a/api/v1/swagger/paths/acquisitions_vendor_issues.yaml b/api/v1/swagger/paths/acquisitions_vendor_issues.yaml >new file mode 100644 >index 0000000000..ca0fe92ea0 >--- /dev/null >+++ b/api/v1/swagger/paths/acquisitions_vendor_issues.yaml >@@ -0,0 +1,92 @@ >+--- >+"/acquisitions/vendors/{vendor_id}/issues": >+ get: >+ x-mojo-to: Acquisitions::Vendor::Issues#list >+ operationId: listVendorIssues >+ tags: >+ - vendors >+ summary: List vendor issues >+ produces: >+ - application/json >+ parameters: >+ - $ref: "../swagger.yaml#/parameters/vendor_id_pp" >+ - description: Case insensitive search on issue's id >+ in: query >+ name: issue_id >+ required: false >+ type: integer >+ - description: Case insensitive search on vendor's id >+ in: query >+ name: vendor_id >+ required: false >+ type: integer >+ - name: type >+ in: query >+ description: Case insensitive search on issue type >+ required: false >+ type: string >+ - description: Case insensitive search on issue start date >+ in: query >+ name: started_on >+ required: false >+ type: string >+ - description: Case insensitive search on issue end date >+ in: query >+ name: ended_on >+ required: false >+ type: string >+ - name: notes >+ in: query >+ description: Case insensitive search on issue's notes >+ required: false >+ type: string >+ - name: x-koha-embed >+ in: header >+ required: false >+ description: Embed list sent as a request header >+ type: array >+ items: >+ type: string >+ enum: >+ - +strings >+ collectionFormat: csv >+ - $ref: "../swagger.yaml#/parameters/match" >+ - $ref: "../swagger.yaml#/parameters/order_by" >+ - $ref: "../swagger.yaml#/parameters/page" >+ - $ref: "../swagger.yaml#/parameters/per_page" >+ - $ref: "../swagger.yaml#/parameters/q_param" >+ - $ref: "../swagger.yaml#/parameters/q_body" >+ - $ref: "../swagger.yaml#/parameters/q_header" >+ - $ref: "../swagger.yaml#/parameters/request_id_header" >+ responses: >+ "200": >+ description: A list of issues >+ schema: >+ type: array >+ items: >+ $ref: "../swagger.yaml#/definitions/vendor_issue" >+ "401": >+ description: Authentication required >+ schema: >+ $ref: "../swagger.yaml#/definitions/error" >+ 403: >+ description: Access forbidden >+ schema: >+ $ref: "../swagger.yaml#/definitions/error" >+ "404": >+ description: Resource not found >+ schema: >+ $ref: "../swagger.yaml#/definitions/error" >+ 500: >+ description: |- >+ Internal server error. Possible `error_code` attribute values: >+ * `internal_server_error` >+ schema: >+ $ref: "../swagger.yaml#/definitions/error" >+ 503: >+ description: Under maintenance >+ schema: >+ $ref: "../swagger.yaml#/definitions/error" >+ x-koha-authorization: >+ permissions: >+ acquisition: issues_manage >diff --git a/api/v1/swagger/swagger.yaml b/api/v1/swagger/swagger.yaml >index 9e60aa77a2..e6b7cf5bb6 100644 >--- a/api/v1/swagger/swagger.yaml >+++ b/api/v1/swagger/swagger.yaml >@@ -108,6 +108,8 @@ definitions: > $ref: ./definitions/transfer_limit.yaml > vendor: > $ref: ./definitions/vendor.yaml >+ vendor_issue: >+ $ref: ./definitions/vendor_issue.yaml > paths: > /acquisitions/baskets/managers: > $ref: paths/acquisitions_baskets.yaml#/~1acquisitions~1baskets~1managers >@@ -125,6 +127,8 @@ paths: > $ref: ./paths/acquisitions_vendors.yaml#/~1acquisitions~1vendors > "/acquisitions/vendors/{vendor_id}": > $ref: "./paths/acquisitions_vendors.yaml#/~1acquisitions~1vendors~1{vendor_id}" >+ "/acquisitions/vendors/{vendor_id}/issues": >+ $ref: "./paths/acquisitions_vendor_issues.yaml#/~1acquisitions~1vendors~1{vendor_id}~1issues" > /advanced_editor/macros: > $ref: ./paths/advancededitormacros.yaml#/~1advanced_editor~1macros > /advanced_editor/macros/shared: >-- >2.30.2
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 33105
:
149509
|
149510
|
149511
|
149512
|
149513
|
149514
|
149515
|
149530
|
149531
|
149532
|
149556
|
149557
|
149558
|
149559
|
149560
|
149561
|
149562
|
152894
|
152895
|
152896
|
152897
|
152898
|
152899
|
152900
|
153117
|
153118
|
153119
|
153122
|
153123
|
153125
|
153126
|
153127
|
153128
|
153129
|
153130
|
153131
|
153132
|
153133
|
153134
|
153135
|
153136
|
153137
|
153730
|
153731