Skip to content

Commit

Permalink
RAML for batch endpoints
Browse files Browse the repository at this point in the history
  • Loading branch information
sebbrudzinski committed May 8, 2017
1 parent bc707c1 commit d77b166
Showing 1 changed file with 66 additions and 0 deletions.
66 changes: 66 additions & 0 deletions src/main/resources/api-definition.yaml
Expand Up @@ -208,6 +208,40 @@ schemas:
"items": { "type": "object", "$ref": "schemas/statusMessage.json" }
}
- uuidArray: |
{
"type": "array",
"items": { "type": "string", "title": "id" }
}
- requisitionError: |
{ "type": "object",
"$schema": "http://json-schema.org/draft-04/schema",
"title": "RequisitionError",
"description": "A single requisition error",
"properties": {
"error": { "type": "object", "$ref": "#/schemas/localizedMessage" },
"requisitionId": { "type": "string", "title": "id" }
}
}
- requisitionErrorArray: |
{
"type": "array",
"items": { "type": "object", "$ref": "#/schemas/requisitionError" }
}
- requisitionsProcessingStatus: |
{ "type": "object",
"$schema": "http://json-schema.org/draft-04/schema",
"title": "RequisitionsProcessingStatus",
"description": "An array of all requsitions that have been processed successfully and an array of errors.",
"properties": {
"requisitions": { "type": "object", "$ref": "#/schemas/requisitionDtoArray" },
"errors": { "type": "object", "$ref": "#/schemas/requisitionErrorArray" }
}
}
traits:
- secured:
queryParameters:
Expand Down Expand Up @@ -480,6 +514,38 @@ resourceTypes:
body:
application/json:
schema: localizedMessage
/approve:
post:
is: [ secured ]
body:
application/json:
schema: uuidArray
description: Attempts to approve requisitions with UUIDs provided in the request body. It always processes all the requisitions and returns an array of requisitions that have been approved successfully and an array of error messages.
responses:
"200":
body:
application/json:
schema: requisitionsProcessingStatus
"403":
body:
application/json:
schema: localizedMessage
/save:
put:
is: [ secured ]
body:
application/json:
schema: requisitionDtoArray
description: Saves requisitions with the UUIDs provided in the request body. It always processes all the requisitions and returns an array of requisitions that have been saved successfully and an array of error messages.
responses:
"200":
body:
application/json:
schema: requisitionsProcessingStatus
"403":
body:
application/json:
schema: localizedMessage
/{id}/print:
uriParameters:
id:
Expand Down

0 comments on commit d77b166

Please sign in to comment.