-
Notifications
You must be signed in to change notification settings - Fork 6
/
build.gradle
106 lines (90 loc) · 3.65 KB
/
build.gradle
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
apply plugin: 'java'
apply plugin: 'maven'
group = 'com.qmino'
version = '2.1.2'
description = 'MireDot Petstore'
sourceCompatibility = 1.6
targetCompatibility = 1.6
buildscript {
repositories {
maven { url "http://nexus.qmino.com/content/repositories/miredot/" }
maven { url "https://repo.maven.apache.org/maven2" }
maven { url "http://nexus.qmino.com/content/repositories/miredot-snapshots" }
}
dependencies {
classpath "com.qmino:miredot-plugin:${miredotVersion}"
}
}
repositories {
maven { url "https://repo.maven.apache.org/maven2" }
maven { url "http://nexus.qmino.com/content/repositories/miredot/" }
maven { url "http://nexus.qmino.com/content/repositories/miredot-snapshots" }
}
dependencies {
compile group: 'org.jboss.resteasy', name: 'jaxrs-api', version: '2.3.2.Final'
compile group: 'org.jboss.resteasy', name: 'resteasy-jaxrs', version: '3.0.10.Final'
compile group: 'com.qmino', name: 'miredot-annotations', version: '1.5.0'
compile group: 'com.fasterxml.jackson.core', name: 'jackson-annotations', version: '2.2.0'
compile group: 'javax.servlet', name: 'javax.servlet-api', version: '3.1.0'
}
apply plugin: 'java'
apply plugin: 'miredot'
miredot {
source = sourceSets.main.allJava
destination = sourceSets.main.output
license = "${licenseKey}"
restModel {
filter {
includes = ['com.qmino.miredot.petstore.service.**', 'include2']
excludes = ['exclude']
}
httpStatusCodes {
'200' { document = 'always'; defaultMessage = 'The service call has completed successfully.' }
'401' {
document = 'explicit: com.qmino.miredot.petstore.exceptions.AuthorizationException'
defaultMessage = 'The user is logged in, but is not authorized to use this service.'
}
'412' { document = 'put,post'; defaultMessage = 'Invalid JSON/XML input.' }
'500' { document = 'always'; defaultMessage = 'Internal server exception. The service call did not succeed.' }
}
fieldVisibility = [GETTER: 'PUBLIC_ONLY', IS_GETTER: 'PUBLIC_ONLY',
SETTER : 'NON_PRIVATE',
CREATOR : 'PUBLIC_ONLY',
FIELD : 'PUBLIC_ONLY' ]
titleNamingStrategies = ['tag: summary', 'tag: title', 'firstsentence']
fieldNamingStrategy = 'Pascal'
typeReplacement {
'float' { target = 'floatnumber'; type = 'literal' }
'java.util.Date' { target = 'Seconds since Epoch'; type = 'literal' }
'myPackage.Person' { target = 'yourPackage.JsonPerson'; type = 'alternative' }
}
}
analysis {
checks = [JAVADOC_MISSING_SUMMARY: 'warn',
JAVADOC_MISSING_INTERFACEDOCUMENTATION: 'warn',
JAVADOC_MISSING_PARAMETER_DOCUMENTATION: 'warn',
JAVADOC_MISSING_EXCEPTION_DOCUMENTATION: 'warn',
JAVADOC_MISSING_AUTHORS: 'warn',
JAXRS_MISSING_PRODUCES: 'warn',
JAXRS_MISSING_CONSUMES: 'warn',
REST_UNMAPPED_EXCEPTION: 'warn',
]
}
output {
//location = 'outputdir'
formats {
'docx' {
title = 'docxTitle'
//location = 'docxoutputdir'
}
'html' {
title = 'My Cool Project, version ' + version
intro = 'petstoreRestApi.html'
baseUrl = 'http://www.gradle.org'
//location = 'htmloutputdir'
jsonDoc = 'Hidden'
initialCollapseLevel = 5
}
}
}
}