All Downloads are FREE. Search and download functionalities are using the official Maven repository.

kz.facilities.common-base.1.3.40.source-code.BaseApi.cmn Maven / Gradle / Ivy

There is a newer version: 1.3.46
Show newest version
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'




© 2015 - 2024 Weber Informatics LLC | Privacy Policy