kz.facilities.common-base.1.3.40.source-code.BaseApi.cmn Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of common-base Show documentation
Show all versions of common-base Show documentation
DSL based modeling framework - facilities common base
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
/* formats */
const XML = 'xml'
const JSON = 'json'