@@ -, +, @@ --- .../definitions/preservation_train.yaml | 2 +- .../definitions/preservation_train_item.yaml | 35 +++++++++++++++++++ api/v1/swagger/paths/preservation_trains.yaml | 7 +++- api/v1/swagger/swagger.yaml | 2 ++ 4 files changed, 44 insertions(+), 2 deletions(-) create mode 100644 api/v1/swagger/definitions/preservation_train_item.yaml --- a/api/v1/swagger/definitions/preservation_train.yaml +++ a/api/v1/swagger/definitions/preservation_train.yaml @@ -3,7 +3,7 @@ type: object properties: train_id: type: integer - description: internally assigned agreement identifier + description: internally assigned train identifier readOnly: true name: description: name of the train --- a/api/v1/swagger/definitions/preservation_train_item.yaml +++ a/api/v1/swagger/definitions/preservation_train_item.yaml @@ -0,0 +1,35 @@ +--- +type: object +properties: + train_item_id: + type: integer + description: internally assigned train item identifier + readOnly: true + train_id: + type: integer + description: internally train identifier + item_id: + type: integer + description: internally item identifier + user_train_item_id: + type: integer + description: internally user train item identifier + processing_id: + description: internally processing identifier + type: integer + added_on: + description: add date + type: + - string + - "null" + attributes: + description: attribute list + type: + - array + - "null" + +additionalProperties: false +required: + - train_id + - processing_id + --- a/api/v1/swagger/paths/preservation_trains.yaml +++ a/api/v1/swagger/paths/preservation_trains.yaml @@ -572,6 +572,7 @@ - catalogue_item - catalogue_item.biblio collectionFormat: csv + additionalProperties: false responses: 200: description: An item in train @@ -624,11 +625,15 @@ required: true schema: type: object + properties: + train_id: + description: Train id + type: integer responses: 201: description: A successfully copied item schema: - type: object + $ref: "../swagger.yaml#/definitions/preservation_train_item" 400: description: Bad parameter schema: --- a/api/v1/swagger/swagger.yaml +++ a/api/v1/swagger/swagger.yaml @@ -102,6 +102,8 @@ definitions: $ref: ./definitions/preservation_config.yaml preservation_train: $ref: ./definitions/preservation_train.yaml + preservation_train_item: + $ref: ./definitions/preservation_train_item.yaml preservation_processing: $ref: ./definitions/preservation_processing.yaml quote: --