kz.facilities.common-base.1.3.16.source-code.BaseApi.cmn Maven / Gradle / Ivy
package org.joinedworkz.facilities.common.base.api
/* generic response structures */
type ResponseContext {
totalNumberOfFilteredItems: Integer
totalNumberOfItems: Integer
}
type Error {
message: String
msgCode: Integer
fieldName: String
}
type ErrorResponse {
errors: Error[]
}
/* resource method types */
methodtype create POST consumes='*' produces=Id success=201
methodtype start POST consumes='*' produces=Id success=201 // start an action
methodtype read GET instance=true produces='*' success=200 errorResponse=ErrorResponse
methodtype downloadText GET instance=true produces='text/plain' success=200
methodtype update PUT instance=true consumes='*' produces='*' success=200
methodtype delete DELETE instance=true produces=Id success=200
methodtype query GET produces='*[]' success=200 paging=true sorting=true
responseContext=ResponseContext
errorResponse=ErrorResponse
methodtype list GET produces='*[]' success=200 paging=true sorting=true
errorResponse=ErrorResponse