loic911 / Rest-api-doc

MIT License
21 stars 32 forks source link

Extract the RestApiParam allowedvalues from an enum #24

Closed anthony-foulfoin closed 9 years ago

anthony-foulfoin commented 9 years ago

We could do something like that :

@RestApiParam([...], allowedvalues=Status.class)

With this enum :

enum Status {
    ONLINE,
    OFFLINE,
    BLOCKED,
   PUBLISHED,
   [...]
}

If we already have an enum, it avoids to do something like that :

@RestApiParam([...], allowedvalues=['ONLINE', 'OFFLINE', 'BLOCKED', 'PUBLISHED', ...])
loic911 commented 9 years ago

Available in 0.3.1 Thanks