ework.profiles.rest-api.2023.0.1.source-code.generate-all.groovy Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of rest-api Show documentation
Show all versions of rest-api Show documentation
A profile for REST API applications
import org.grails.cli.interactive.completers.DomainClassCompleter
description( "Generates a controller that performs REST operations" ) {
usage "grace generate-all [DOMAIN CLASS]"
argument name:'Domain Class', description:"The name of the Domain Class", required:true
completer DomainClassCompleter
synonyms 'generate-resource-controller'
flag name:'force', description:"Whether to overwrite existing files"
}
if(args) {
generateController(*args)
generateViews(*args)
generateUnitTest(*args)
generateFunctionalTest(*args)
}
else {
error "No domain class specified"
}