models.dsl.Enumerations.rapid Maven / Gradle / Ivy
/*
This is a Zen Model template. Customize it to reflect your services
and data types.
*/
rapidModel Enumerations
resourceAPI EnumerationsInterface baseURI "http://my-namespace.com"
objectResource EnumerationsObject type UseEnum
mediaTypes
application/xml
method GET getEnumerationsObject
request
response EnumerationsObject statusCode 200
response statusCode 404
dataModel EnumerationsDataModel
structure myDataType
id : string
id2 : string
/** String enumeration */
enum string Suit
/** Clubs*/
CLUBS : "clubs"
SPADES : "spades"
DIAMONDS : "diamonds"
HEARTS : "hearts"
/** Integer enumeration */
enum int Record
ONE : 1
TWO : 2
THREE : 3
FOUR : 4
FIVE : 5
SIX : 6
SEVEN : 7
EIGHT : 8
NINE : 9
TEN : 10
ELEVEN : 11
TWELVE : 12
THIRTEEN : 13
/** Enumeration with implicit literal values*/
enum string Colors
RED
GREEN
BLUE
structure UseEnum
useIntEnum : Record
useStringEnum : Suit
/** A special Boolean enum borrowed from http://thedailywtf.com/Articles/What_Is_Truth_0x3f_.aspx */
enum int Boolean
TRUE: 1
FALSE: 0
FILE_NOT_FOUND: -404