Skip to content

Commit

Permalink
Merge pull request #47 from folio-org/MODLISTS-72
Browse files Browse the repository at this point in the history
MODLISTS-72: adding DTO file for list versions part1
  • Loading branch information
kjain110 authored Dec 14, 2023
2 parents a4e7ab2 + b99e0e6 commit e07f4ef
Show file tree
Hide file tree
Showing 2 changed files with 95 additions and 0 deletions.
23 changes: 23 additions & 0 deletions src/main/resources/swagger.api/list.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -350,6 +350,27 @@ paths:
application/json:
schema:
$ref: "#/components/schemas/ListAppError"
/lists/{id}/versions:
get:
operationId: getListVersions
tags:
- list
description: Get all the versions of the specified list.
parameters:
- $ref: '#/components/parameters/id'
responses:
'201':
description: 'Getting all the versions of the list'
content:
application/json:
schema:
$ref: '#/components/schemas/ListVersionDTO'
default:
description: unexpected error
content:
application/json:
schema:
$ref: "#/components/schemas/ListAppError"
components:
parameters:
id:
Expand Down Expand Up @@ -381,6 +402,8 @@ components:
$ref: schemas/ListExportDTO.json
ListSummaryResultsDTO:
$ref: schemas/ListSummaryResultsDTO.json
ListVersionDTO:
$ref: schemas/ListVersionDTO.json
ResultsetPage:
type: object
ContentItem:
Expand Down
72 changes: 72 additions & 0 deletions src/main/resources/swagger.api/schemas/ListVersionDTO.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"description": "List Version DTO",
"type": "object",
"properties": {
"id" : {
"description": "Version id",
"type": "string",
"format": "UUID"
},
"name" : {
"description": "List name",
"type": "string"
},
"description" : {
"description": "List description",
"type": "string"
},
"userFriendlyQuery" : {
"description": "User Friendly Query",
"type": "string"
},
"fqlQuery" : {
"description": "FQL Query",
"type": "string"
},
"fields": {
"description": "Fields to be included in list contents",
"type": "array",
"items": {
"type": "string"
}
},
"isActive" : {
"description": "Indicates a List is Active or not",
"type": "boolean"
},
"isPrivate" : {
"description": "Indicates a List is Private or not",
"type": "boolean"
},
"updatedBy": {
"description": "ID of the user who last updated the record (when available)",
"type": "string",
"format": "UUID"
},
"updatedByUsername": {
"description": "Username of the user who last updated the record (when available)",
"type": "string"
},
"updatedDate": {
"description": "Date and time when the record was last updated",
"type": "string",
"format": "date-time"
},
"listId": {
"description": "list id",
"type": "string",
"format": "UUID"
},
"version": {
"description": "Number of version",
"type": "integer"
}
},
"additionalProperties": false,
"required": [
"id",
"name",
"version"
]
}

0 comments on commit e07f4ef

Please sign in to comment.