@cparra/apexdocs 2.23.0 → 2.24.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.eslintrc.js +12 -12
- package/.github/workflows/close_stale.yml +22 -22
- package/.prettierrc.js +7 -7
- package/LICENSE +21 -21
- package/README.md +718 -718
- package/apexdocs.config.ts +13 -13
- package/docs/README.md +1 -1
- package/docs/restapi.json +589 -589
- package/docs/types/Classes/nspc.ChildClass.md +97 -97
- package/docs/types/Main/nspc.SampleClass.md +189 -189
- package/examples/force-app/main/default/classes/AnotherInterface.cls +16 -16
- package/examples/force-app/main/default/classes/ChildClass.cls +42 -42
- package/examples/force-app/main/default/classes/EscapedAnnotations.cls +5 -5
- package/examples/force-app/main/default/classes/GrandparentClass.cls +4 -4
- package/examples/force-app/main/default/classes/GroupedClass.cls +8 -8
- package/examples/force-app/main/default/classes/MemberGrouping.cls +17 -17
- package/examples/force-app/main/default/classes/ParentClass.cls +16 -16
- package/examples/force-app/main/default/classes/SampleClass.cls +166 -166
- package/examples/force-app/main/default/classes/SampleClass.cls-meta.xml +5 -5
- package/examples/force-app/main/default/classes/SampleClassWithoutModifier.cls +9 -9
- package/examples/force-app/main/default/classes/SampleInterface.cls +16 -16
- package/examples/force-app/main/default/restapi/SampleRestResource.cls +195 -195
- package/examples/force-app/main/default/restapi/SampleRestResourceToSkip.cls +35 -35
- package/examples/force-app/main/default/restapi/SampleRestResourceWithInnerClass.cls +24 -24
- package/examples/force-app/main/default/restapi/SampleRestResourceWithoutApexDocs.cls +15 -15
- package/examples/force-app/main/default/restapi/references/Reference1.cls +9 -9
- package/examples/force-app/main/default/restapi/references/Reference2.cls +9 -9
- package/examples/force-app/main/default/restapi/references/Reference3.cls +3 -3
- package/examples/force-app/main/default/restapi/references/Reference4.cls +3 -3
- package/examples/force-app/main/default/restapi/references/Reference5.cls +3 -3
- package/examples/force-app/main/default/restapi/references/Reference6.cls +6 -6
- package/examples/force-app/main/default/restapi/references/Reference7.cls +3 -3
- package/examples/includes/header.md +3 -3
- package/jest.config.js +5 -5
- package/lib/application/Apexdocs.d.ts +13 -13
- package/lib/application/Apexdocs.js +76 -76
- package/lib/cli/generate.d.ts +2 -2
- package/lib/cli/generate.js +130 -130
- package/lib/index.d.ts +1 -1
- package/lib/index.js +17 -17
- package/lib/model/apex-bundle.d.ts +6 -6
- package/lib/model/apex-bundle.js +10 -10
- package/lib/model/apex-type-wrappers/ClassMirrorWrapper.d.ts +7 -7
- package/lib/model/apex-type-wrappers/ClassMirrorWrapper.js +13 -13
- package/lib/model/apex-type-wrappers/MethodMirrorWrapper.d.ts +7 -7
- package/lib/model/apex-type-wrappers/MethodMirrorWrapper.js +11 -11
- package/lib/model/inheritance.d.ts +8 -8
- package/lib/model/inheritance.js +2 -2
- package/lib/model/manifest-diff.d.ts +27 -27
- package/lib/model/manifest-diff.js +68 -68
- package/lib/model/manifest.d.ts +22 -22
- package/lib/model/manifest.js +46 -46
- package/lib/model/markdown-file.d.ts +16 -16
- package/lib/model/markdown-file.js +106 -106
- package/lib/model/markdown-generation-util/doc-comment-annotation-util.d.ts +8 -8
- package/lib/model/markdown-generation-util/doc-comment-annotation-util.js +43 -43
- package/lib/model/markdown-generation-util/field-declaration-util.d.ts +3 -3
- package/lib/model/markdown-generation-util/field-declaration-util.js +54 -54
- package/lib/model/markdown-generation-util/index.d.ts +3 -3
- package/lib/model/markdown-generation-util/index.js +19 -19
- package/lib/model/markdown-generation-util/method-declaration-util.d.ts +4 -4
- package/lib/model/markdown-generation-util/method-declaration-util.js +114 -114
- package/lib/model/markdown-generation-util/type-declaration-util.d.ts +3 -3
- package/lib/model/markdown-generation-util/type-declaration-util.js +81 -81
- package/lib/model/markdown-home-file.d.ts +11 -11
- package/lib/model/markdown-home-file.js +53 -53
- package/lib/model/markdown-type-file.d.ts +26 -26
- package/lib/model/markdown-type-file.js +133 -133
- package/lib/model/openapi/apex-doc-types.d.ts +19 -19
- package/lib/model/openapi/apex-doc-types.js +4 -4
- package/lib/model/openapi/open-api-types.d.ts +93 -93
- package/lib/model/openapi/open-api-types.js +2 -2
- package/lib/model/openapi/open-api.d.ts +16 -16
- package/lib/model/openapi/open-api.js +33 -33
- package/lib/model/openapi/openapi-type-file.d.ts +7 -7
- package/lib/model/openapi/openapi-type-file.js +16 -16
- package/lib/model/outputFile.d.ts +10 -10
- package/lib/model/outputFile.js +28 -28
- package/lib/model/types-repository.d.ts +16 -16
- package/lib/model/types-repository.js +53 -53
- package/lib/service/apex-file-reader.d.ts +14 -14
- package/lib/service/apex-file-reader.js +45 -45
- package/lib/service/file-system.d.ts +14 -14
- package/lib/service/file-system.js +24 -24
- package/lib/service/file-writer.d.ts +6 -6
- package/lib/service/file-writer.js +33 -33
- package/lib/service/manifest-factory.d.ts +10 -10
- package/lib/service/manifest-factory.js +13 -13
- package/lib/service/metadata-processor.d.ts +3 -3
- package/lib/service/metadata-processor.js +16 -16
- package/lib/service/parser.d.ts +21 -21
- package/lib/service/parser.js +134 -134
- package/lib/service/state.d.ts +9 -9
- package/lib/service/state.js +19 -19
- package/lib/service/walkers/class-walker.d.ts +4 -4
- package/lib/service/walkers/class-walker.js +32 -32
- package/lib/service/walkers/enum-walker.d.ts +4 -4
- package/lib/service/walkers/enum-walker.js +10 -10
- package/lib/service/walkers/interface-walker.d.ts +4 -4
- package/lib/service/walkers/interface-walker.js +14 -14
- package/lib/service/walkers/walker-factory.d.ts +5 -5
- package/lib/service/walkers/walker-factory.js +20 -20
- package/lib/service/walkers/walker.d.ts +19 -19
- package/lib/service/walkers/walker.js +16 -16
- package/lib/settings.d.ts +64 -64
- package/lib/settings.js +88 -88
- package/lib/test-helpers/AnnotationBuilder.d.ts +12 -12
- package/lib/test-helpers/AnnotationBuilder.js +30 -30
- package/lib/test-helpers/ClassMirrorBuilder.d.ts +18 -18
- package/lib/test-helpers/ClassMirrorBuilder.js +53 -53
- package/lib/test-helpers/DocCommentAnnotationBuilder.d.ts +8 -8
- package/lib/test-helpers/DocCommentAnnotationBuilder.js +25 -25
- package/lib/test-helpers/DocCommentBuilder.d.ts +12 -12
- package/lib/test-helpers/DocCommentBuilder.js +37 -37
- package/lib/test-helpers/FieldMirrorBuilder.d.ts +18 -18
- package/lib/test-helpers/FieldMirrorBuilder.js +53 -53
- package/lib/test-helpers/MethodMirrorBuilder.d.ts +10 -10
- package/lib/test-helpers/MethodMirrorBuilder.js +36 -36
- package/lib/test-helpers/SettingsBuilder.d.ts +8 -8
- package/lib/test-helpers/SettingsBuilder.js +26 -26
- package/lib/transpiler/factory.d.ts +6 -6
- package/lib/transpiler/factory.js +31 -31
- package/lib/transpiler/file-container.d.ts +6 -6
- package/lib/transpiler/file-container.js +15 -15
- package/lib/transpiler/generator-choices.d.ts +1 -1
- package/lib/transpiler/generator-choices.js +2 -2
- package/lib/transpiler/markdown/class-file-generatorHelper.d.ts +8 -8
- package/lib/transpiler/markdown/class-file-generatorHelper.js +55 -55
- package/lib/transpiler/markdown/docsify/docsify-docs-processor.d.ts +6 -6
- package/lib/transpiler/markdown/docsify/docsify-docs-processor.js +12 -12
- package/lib/transpiler/markdown/jekyll/jekyll-docsProcessor.d.ts +11 -11
- package/lib/transpiler/markdown/jekyll/jekyll-docsProcessor.js +50 -50
- package/lib/transpiler/markdown/markdown-transpiler-base.d.ts +11 -11
- package/lib/transpiler/markdown/markdown-transpiler-base.js +23 -23
- package/lib/transpiler/markdown/plain-markdown/plain-docsProcessor.d.ts +6 -6
- package/lib/transpiler/markdown/plain-markdown/plain-docsProcessor.js +13 -13
- package/lib/transpiler/openapi/open-api-docs-processor.d.ts +13 -13
- package/lib/transpiler/openapi/open-api-docs-processor.js +74 -74
- package/lib/transpiler/openapi/parsers/Builder.d.ts +16 -16
- package/lib/transpiler/openapi/parsers/Builder.js +29 -29
- package/lib/transpiler/openapi/parsers/MethodParser.d.ts +20 -20
- package/lib/transpiler/openapi/parsers/MethodParser.js +166 -166
- package/lib/transpiler/openapi/parsers/ParameterObjectBuilder.d.ts +7 -7
- package/lib/transpiler/openapi/parsers/ParameterObjectBuilder.js +10 -10
- package/lib/transpiler/openapi/parsers/ReferenceBuilder.d.ts +39 -39
- package/lib/transpiler/openapi/parsers/ReferenceBuilder.js +225 -225
- package/lib/transpiler/openapi/parsers/RequestBodyBuilder.d.ts +10 -10
- package/lib/transpiler/openapi/parsers/RequestBodyBuilder.js +19 -19
- package/lib/transpiler/openapi/parsers/ResponsesBuilder.d.ts +7 -7
- package/lib/transpiler/openapi/parsers/ResponsesBuilder.js +21 -21
- package/lib/transpiler/processor-type-transpiler.d.ts +10 -10
- package/lib/transpiler/processor-type-transpiler.js +8 -8
- package/lib/transpiler/transpiler.d.ts +5 -5
- package/lib/transpiler/transpiler.js +26 -26
- package/lib/util/error-logger.d.ts +8 -8
- package/lib/util/error-logger.js +89 -89
- package/lib/util/logger.d.ts +21 -21
- package/lib/util/logger.js +57 -57
- package/lib/util/string-utils.d.ts +2 -2
- package/lib/util/string-utils.js +14 -14
- package/package.json +78 -78
- package/tsconfig.json +20 -20
- package/tslint.json +5 -5
|
@@ -1,195 +1,195 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @description Account related operations
|
|
3
|
-
*/
|
|
4
|
-
@RestResource(UrlMapping='/AccountService/*')
|
|
5
|
-
global with sharing class SampleRestResource {
|
|
6
|
-
/**
|
|
7
|
-
* @description Sample HTTP Delete method with references to other types.
|
|
8
|
-
* @http-parameter
|
|
9
|
-
* name: limit
|
|
10
|
-
* in: header
|
|
11
|
-
* required: true
|
|
12
|
-
* description: My sample description.
|
|
13
|
-
* schema: SampleClass
|
|
14
|
-
* @http-response
|
|
15
|
-
* statusCode: 200
|
|
16
|
-
* schema: SampleClass
|
|
17
|
-
* @http-response
|
|
18
|
-
* statusCode: 500
|
|
19
|
-
* schema: SampleClass
|
|
20
|
-
* @http-response
|
|
21
|
-
* statusCode: 304
|
|
22
|
-
* schema: ChildClass
|
|
23
|
-
* @http-response
|
|
24
|
-
* statusCode: 305
|
|
25
|
-
* schema: Reference1
|
|
26
|
-
* @http-response
|
|
27
|
-
* statusCode: 306
|
|
28
|
-
* schema: List<Reference1>
|
|
29
|
-
* @http-response
|
|
30
|
-
* statusCode: 307
|
|
31
|
-
* schema: Reference7[untypedObject:Reference2]
|
|
32
|
-
*/
|
|
33
|
-
@HttpDelete
|
|
34
|
-
global static void doDelete() {
|
|
35
|
-
RestRequest req = RestContext.request;
|
|
36
|
-
RestResponse res = RestContext.response;
|
|
37
|
-
String accountId = req.requestURI.substring(req.requestURI.lastIndexOf('/') + 1);
|
|
38
|
-
Account account = [SELECT Id FROM Account WHERE Id = :accountId];
|
|
39
|
-
delete account;
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
/**
|
|
43
|
-
* @description This is a sample HTTP Get method
|
|
44
|
-
* @return An Account SObject.
|
|
45
|
-
* @http-parameter
|
|
46
|
-
* name: limit
|
|
47
|
-
* in: query
|
|
48
|
-
* required: true
|
|
49
|
-
* description: Limits the number of items on a page
|
|
50
|
-
* schema:
|
|
51
|
-
* type: integer
|
|
52
|
-
* @http-parameter
|
|
53
|
-
* name: complex
|
|
54
|
-
* in: cookie
|
|
55
|
-
* description: A more complex schema
|
|
56
|
-
* schema:
|
|
57
|
-
* type: array
|
|
58
|
-
* items:
|
|
59
|
-
* type: object
|
|
60
|
-
* properties:
|
|
61
|
-
* name:
|
|
62
|
-
* type: string
|
|
63
|
-
* @http-response
|
|
64
|
-
* statusCode: 200
|
|
65
|
-
* schema:
|
|
66
|
-
* type: object
|
|
67
|
-
* properties:
|
|
68
|
-
* id:
|
|
69
|
-
* type: string
|
|
70
|
-
* description: The super Id.
|
|
71
|
-
* name:
|
|
72
|
-
* type: string
|
|
73
|
-
* phone:
|
|
74
|
-
* type: string
|
|
75
|
-
* format: byte
|
|
76
|
-
* @http-response
|
|
77
|
-
* statusCode: 500
|
|
78
|
-
* schema:
|
|
79
|
-
* type: string
|
|
80
|
-
* @http-response
|
|
81
|
-
* statusCode: 304
|
|
82
|
-
* schema:
|
|
83
|
-
* type: object
|
|
84
|
-
* properties:
|
|
85
|
-
* error:
|
|
86
|
-
* type: string
|
|
87
|
-
* @http-response
|
|
88
|
-
* statusCode: 400
|
|
89
|
-
* schema:
|
|
90
|
-
* type: array
|
|
91
|
-
* items:
|
|
92
|
-
* type: object
|
|
93
|
-
* properties:
|
|
94
|
-
* name:
|
|
95
|
-
* type: string
|
|
96
|
-
* @http-response
|
|
97
|
-
* statusCode: 100
|
|
98
|
-
* schema:
|
|
99
|
-
* type: object
|
|
100
|
-
* properties:
|
|
101
|
-
* anotherObject:
|
|
102
|
-
* description: An object inside of an object
|
|
103
|
-
* type: object
|
|
104
|
-
* properties:
|
|
105
|
-
* message:
|
|
106
|
-
* type: string
|
|
107
|
-
* somethingElse:
|
|
108
|
-
* type: number
|
|
109
|
-
*/
|
|
110
|
-
@HttpGet
|
|
111
|
-
global static Account doGet() {
|
|
112
|
-
RestRequest req = RestContext.request;
|
|
113
|
-
RestResponse res = RestContext.response;
|
|
114
|
-
String accountId = req.requestURI.substring(req.requestURI.lastIndexOf('/') + 1);
|
|
115
|
-
Account result = [SELECT Id, Name, Phone, Website FROM Account WHERE Id = :accountId];
|
|
116
|
-
return result;
|
|
117
|
-
}
|
|
118
|
-
|
|
119
|
-
/**
|
|
120
|
-
* @summary Posts an Account 2
|
|
121
|
-
* @description This is a sample HTTP Post method
|
|
122
|
-
* @return A String SObject.
|
|
123
|
-
* @http-parameter
|
|
124
|
-
* name: limit
|
|
125
|
-
* in: query
|
|
126
|
-
* required: true
|
|
127
|
-
* description: Limits the number of items on a page
|
|
128
|
-
* schema:
|
|
129
|
-
* type: integer
|
|
130
|
-
* @http-parameter
|
|
131
|
-
* name: complex
|
|
132
|
-
* in: cookie
|
|
133
|
-
* description: A more complex schema
|
|
134
|
-
* schema:
|
|
135
|
-
* type: array
|
|
136
|
-
* items:
|
|
137
|
-
* type: object
|
|
138
|
-
* properties:
|
|
139
|
-
* name:
|
|
140
|
-
* type: string
|
|
141
|
-
* @http-request-body
|
|
142
|
-
* description: This is an example of a request body
|
|
143
|
-
* required: true
|
|
144
|
-
* schema:
|
|
145
|
-
* type: array
|
|
146
|
-
* items:
|
|
147
|
-
* type: object
|
|
148
|
-
* properties:
|
|
149
|
-
* name:
|
|
150
|
-
* type: string
|
|
151
|
-
* @http-response
|
|
152
|
-
* statusCode: 200
|
|
153
|
-
* schema:
|
|
154
|
-
* type: object
|
|
155
|
-
* properties:
|
|
156
|
-
* id:
|
|
157
|
-
* type: string
|
|
158
|
-
* description: The super Id.
|
|
159
|
-
* name:
|
|
160
|
-
* type: string
|
|
161
|
-
* phone:
|
|
162
|
-
* type: string
|
|
163
|
-
* format: byte
|
|
164
|
-
* @http-response
|
|
165
|
-
* statusCode: 500
|
|
166
|
-
* schema:
|
|
167
|
-
* type: string
|
|
168
|
-
* @http-response
|
|
169
|
-
* statusCode: 304
|
|
170
|
-
* schema:
|
|
171
|
-
* type: object
|
|
172
|
-
* properties:
|
|
173
|
-
* error:
|
|
174
|
-
* type: string
|
|
175
|
-
* @http-response
|
|
176
|
-
* statusCode: 400
|
|
177
|
-
* schema:
|
|
178
|
-
* type: array
|
|
179
|
-
* items:
|
|
180
|
-
* type: object
|
|
181
|
-
* properties:
|
|
182
|
-
* name:
|
|
183
|
-
* type: string
|
|
184
|
-
*/
|
|
185
|
-
@HttpPost
|
|
186
|
-
global static String doPost(String name,
|
|
187
|
-
String phone, String website) {
|
|
188
|
-
Account account = new Account();
|
|
189
|
-
account.Name = name;
|
|
190
|
-
account.phone = phone;
|
|
191
|
-
account.website = website;
|
|
192
|
-
insert account;
|
|
193
|
-
return account.Id;
|
|
194
|
-
}
|
|
195
|
-
}
|
|
1
|
+
/**
|
|
2
|
+
* @description Account related operations
|
|
3
|
+
*/
|
|
4
|
+
@RestResource(UrlMapping='/AccountService/*')
|
|
5
|
+
global with sharing class SampleRestResource {
|
|
6
|
+
/**
|
|
7
|
+
* @description Sample HTTP Delete method with references to other types.
|
|
8
|
+
* @http-parameter
|
|
9
|
+
* name: limit
|
|
10
|
+
* in: header
|
|
11
|
+
* required: true
|
|
12
|
+
* description: My sample description.
|
|
13
|
+
* schema: SampleClass
|
|
14
|
+
* @http-response
|
|
15
|
+
* statusCode: 200
|
|
16
|
+
* schema: SampleClass
|
|
17
|
+
* @http-response
|
|
18
|
+
* statusCode: 500
|
|
19
|
+
* schema: SampleClass
|
|
20
|
+
* @http-response
|
|
21
|
+
* statusCode: 304
|
|
22
|
+
* schema: ChildClass
|
|
23
|
+
* @http-response
|
|
24
|
+
* statusCode: 305
|
|
25
|
+
* schema: Reference1
|
|
26
|
+
* @http-response
|
|
27
|
+
* statusCode: 306
|
|
28
|
+
* schema: List<Reference1>
|
|
29
|
+
* @http-response
|
|
30
|
+
* statusCode: 307
|
|
31
|
+
* schema: Reference7[untypedObject:Reference2]
|
|
32
|
+
*/
|
|
33
|
+
@HttpDelete
|
|
34
|
+
global static void doDelete() {
|
|
35
|
+
RestRequest req = RestContext.request;
|
|
36
|
+
RestResponse res = RestContext.response;
|
|
37
|
+
String accountId = req.requestURI.substring(req.requestURI.lastIndexOf('/') + 1);
|
|
38
|
+
Account account = [SELECT Id FROM Account WHERE Id = :accountId];
|
|
39
|
+
delete account;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
/**
|
|
43
|
+
* @description This is a sample HTTP Get method
|
|
44
|
+
* @return An Account SObject.
|
|
45
|
+
* @http-parameter
|
|
46
|
+
* name: limit
|
|
47
|
+
* in: query
|
|
48
|
+
* required: true
|
|
49
|
+
* description: Limits the number of items on a page
|
|
50
|
+
* schema:
|
|
51
|
+
* type: integer
|
|
52
|
+
* @http-parameter
|
|
53
|
+
* name: complex
|
|
54
|
+
* in: cookie
|
|
55
|
+
* description: A more complex schema
|
|
56
|
+
* schema:
|
|
57
|
+
* type: array
|
|
58
|
+
* items:
|
|
59
|
+
* type: object
|
|
60
|
+
* properties:
|
|
61
|
+
* name:
|
|
62
|
+
* type: string
|
|
63
|
+
* @http-response
|
|
64
|
+
* statusCode: 200
|
|
65
|
+
* schema:
|
|
66
|
+
* type: object
|
|
67
|
+
* properties:
|
|
68
|
+
* id:
|
|
69
|
+
* type: string
|
|
70
|
+
* description: The super Id.
|
|
71
|
+
* name:
|
|
72
|
+
* type: string
|
|
73
|
+
* phone:
|
|
74
|
+
* type: string
|
|
75
|
+
* format: byte
|
|
76
|
+
* @http-response
|
|
77
|
+
* statusCode: 500
|
|
78
|
+
* schema:
|
|
79
|
+
* type: string
|
|
80
|
+
* @http-response
|
|
81
|
+
* statusCode: 304
|
|
82
|
+
* schema:
|
|
83
|
+
* type: object
|
|
84
|
+
* properties:
|
|
85
|
+
* error:
|
|
86
|
+
* type: string
|
|
87
|
+
* @http-response
|
|
88
|
+
* statusCode: 400
|
|
89
|
+
* schema:
|
|
90
|
+
* type: array
|
|
91
|
+
* items:
|
|
92
|
+
* type: object
|
|
93
|
+
* properties:
|
|
94
|
+
* name:
|
|
95
|
+
* type: string
|
|
96
|
+
* @http-response
|
|
97
|
+
* statusCode: 100
|
|
98
|
+
* schema:
|
|
99
|
+
* type: object
|
|
100
|
+
* properties:
|
|
101
|
+
* anotherObject:
|
|
102
|
+
* description: An object inside of an object
|
|
103
|
+
* type: object
|
|
104
|
+
* properties:
|
|
105
|
+
* message:
|
|
106
|
+
* type: string
|
|
107
|
+
* somethingElse:
|
|
108
|
+
* type: number
|
|
109
|
+
*/
|
|
110
|
+
@HttpGet
|
|
111
|
+
global static Account doGet() {
|
|
112
|
+
RestRequest req = RestContext.request;
|
|
113
|
+
RestResponse res = RestContext.response;
|
|
114
|
+
String accountId = req.requestURI.substring(req.requestURI.lastIndexOf('/') + 1);
|
|
115
|
+
Account result = [SELECT Id, Name, Phone, Website FROM Account WHERE Id = :accountId];
|
|
116
|
+
return result;
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
/**
|
|
120
|
+
* @summary Posts an Account 2
|
|
121
|
+
* @description This is a sample HTTP Post method
|
|
122
|
+
* @return A String SObject.
|
|
123
|
+
* @http-parameter
|
|
124
|
+
* name: limit
|
|
125
|
+
* in: query
|
|
126
|
+
* required: true
|
|
127
|
+
* description: Limits the number of items on a page
|
|
128
|
+
* schema:
|
|
129
|
+
* type: integer
|
|
130
|
+
* @http-parameter
|
|
131
|
+
* name: complex
|
|
132
|
+
* in: cookie
|
|
133
|
+
* description: A more complex schema
|
|
134
|
+
* schema:
|
|
135
|
+
* type: array
|
|
136
|
+
* items:
|
|
137
|
+
* type: object
|
|
138
|
+
* properties:
|
|
139
|
+
* name:
|
|
140
|
+
* type: string
|
|
141
|
+
* @http-request-body
|
|
142
|
+
* description: This is an example of a request body
|
|
143
|
+
* required: true
|
|
144
|
+
* schema:
|
|
145
|
+
* type: array
|
|
146
|
+
* items:
|
|
147
|
+
* type: object
|
|
148
|
+
* properties:
|
|
149
|
+
* name:
|
|
150
|
+
* type: string
|
|
151
|
+
* @http-response
|
|
152
|
+
* statusCode: 200
|
|
153
|
+
* schema:
|
|
154
|
+
* type: object
|
|
155
|
+
* properties:
|
|
156
|
+
* id:
|
|
157
|
+
* type: string
|
|
158
|
+
* description: The super Id.
|
|
159
|
+
* name:
|
|
160
|
+
* type: string
|
|
161
|
+
* phone:
|
|
162
|
+
* type: string
|
|
163
|
+
* format: byte
|
|
164
|
+
* @http-response
|
|
165
|
+
* statusCode: 500
|
|
166
|
+
* schema:
|
|
167
|
+
* type: string
|
|
168
|
+
* @http-response
|
|
169
|
+
* statusCode: 304
|
|
170
|
+
* schema:
|
|
171
|
+
* type: object
|
|
172
|
+
* properties:
|
|
173
|
+
* error:
|
|
174
|
+
* type: string
|
|
175
|
+
* @http-response
|
|
176
|
+
* statusCode: 400
|
|
177
|
+
* schema:
|
|
178
|
+
* type: array
|
|
179
|
+
* items:
|
|
180
|
+
* type: object
|
|
181
|
+
* properties:
|
|
182
|
+
* name:
|
|
183
|
+
* type: string
|
|
184
|
+
*/
|
|
185
|
+
@HttpPost
|
|
186
|
+
global static String doPost(String name,
|
|
187
|
+
String phone, String website) {
|
|
188
|
+
Account account = new Account();
|
|
189
|
+
account.Name = name;
|
|
190
|
+
account.phone = phone;
|
|
191
|
+
account.website = website;
|
|
192
|
+
insert account;
|
|
193
|
+
return account.Id;
|
|
194
|
+
}
|
|
195
|
+
}
|
|
@@ -1,35 +1,35 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @description This rest resource should be skipped
|
|
3
|
-
* @ignore
|
|
4
|
-
*/
|
|
5
|
-
@RestResource(UrlMapping='/ResourceToSkip/*')
|
|
6
|
-
global with sharing class SampleRestResourceToSkip {
|
|
7
|
-
@HttpDelete
|
|
8
|
-
global static void doDelete() {
|
|
9
|
-
RestRequest req = RestContext.request;
|
|
10
|
-
RestResponse res = RestContext.response;
|
|
11
|
-
String accountId = req.requestURI.substring(req.requestURI.lastIndexOf('/') + 1);
|
|
12
|
-
Account account = [SELECT Id FROM Account WHERE Id = :accountId];
|
|
13
|
-
delete account;
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
@HttpGet
|
|
17
|
-
global static Account doGet() {
|
|
18
|
-
RestRequest req = RestContext.request;
|
|
19
|
-
RestResponse res = RestContext.response;
|
|
20
|
-
String accountId = req.requestURI.substring(req.requestURI.lastIndexOf('/') + 1);
|
|
21
|
-
Account result = [SELECT Id, Name, Phone, Website FROM Account WHERE Id = :accountId];
|
|
22
|
-
return result;
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
@HttpPost
|
|
26
|
-
global static String doPost(String name,
|
|
27
|
-
String phone, String website) {
|
|
28
|
-
Account account = new Account();
|
|
29
|
-
account.Name = name;
|
|
30
|
-
account.phone = phone;
|
|
31
|
-
account.website = website;
|
|
32
|
-
insert account;
|
|
33
|
-
return account.Id;
|
|
34
|
-
}
|
|
35
|
-
}
|
|
1
|
+
/**
|
|
2
|
+
* @description This rest resource should be skipped
|
|
3
|
+
* @ignore
|
|
4
|
+
*/
|
|
5
|
+
@RestResource(UrlMapping='/ResourceToSkip/*')
|
|
6
|
+
global with sharing class SampleRestResourceToSkip {
|
|
7
|
+
@HttpDelete
|
|
8
|
+
global static void doDelete() {
|
|
9
|
+
RestRequest req = RestContext.request;
|
|
10
|
+
RestResponse res = RestContext.response;
|
|
11
|
+
String accountId = req.requestURI.substring(req.requestURI.lastIndexOf('/') + 1);
|
|
12
|
+
Account account = [SELECT Id FROM Account WHERE Id = :accountId];
|
|
13
|
+
delete account;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
@HttpGet
|
|
17
|
+
global static Account doGet() {
|
|
18
|
+
RestRequest req = RestContext.request;
|
|
19
|
+
RestResponse res = RestContext.response;
|
|
20
|
+
String accountId = req.requestURI.substring(req.requestURI.lastIndexOf('/') + 1);
|
|
21
|
+
Account result = [SELECT Id, Name, Phone, Website FROM Account WHERE Id = :accountId];
|
|
22
|
+
return result;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
@HttpPost
|
|
26
|
+
global static String doPost(String name,
|
|
27
|
+
String phone, String website) {
|
|
28
|
+
Account account = new Account();
|
|
29
|
+
account.Name = name;
|
|
30
|
+
account.phone = phone;
|
|
31
|
+
account.website = website;
|
|
32
|
+
insert account;
|
|
33
|
+
return account.Id;
|
|
34
|
+
}
|
|
35
|
+
}
|
|
@@ -1,24 +1,24 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @description Contact related operations
|
|
3
|
-
*/
|
|
4
|
-
@RestResource(urlMapping='/Contact/*')
|
|
5
|
-
global with sharing class SampleRestResourceWithInnerClass {
|
|
6
|
-
/**
|
|
7
|
-
* @description This is a sample HTTP Get method
|
|
8
|
-
* @return A SampleRestResourceWithInnerClass.InnerClass Object.
|
|
9
|
-
* @http-response
|
|
10
|
-
* statusCode: 200
|
|
11
|
-
* schema: SampleRestResourceWithInnerClass.InnerClass
|
|
12
|
-
*/
|
|
13
|
-
@HttpGet
|
|
14
|
-
global static InnerClass doGet() {
|
|
15
|
-
RestRequest req = RestContext.request;
|
|
16
|
-
RestResponse res = RestContext.response;
|
|
17
|
-
String contactId = req.requestURI.substring(req.requestURI.lastIndexOf('/') + 1);
|
|
18
|
-
return new InnerClass();
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
global class InnerClass {
|
|
22
|
-
global String stringMember;
|
|
23
|
-
}
|
|
24
|
-
}
|
|
1
|
+
/**
|
|
2
|
+
* @description Contact related operations
|
|
3
|
+
*/
|
|
4
|
+
@RestResource(urlMapping='/Contact/*')
|
|
5
|
+
global with sharing class SampleRestResourceWithInnerClass {
|
|
6
|
+
/**
|
|
7
|
+
* @description This is a sample HTTP Get method
|
|
8
|
+
* @return A SampleRestResourceWithInnerClass.InnerClass Object.
|
|
9
|
+
* @http-response
|
|
10
|
+
* statusCode: 200
|
|
11
|
+
* schema: SampleRestResourceWithInnerClass.InnerClass
|
|
12
|
+
*/
|
|
13
|
+
@HttpGet
|
|
14
|
+
global static InnerClass doGet() {
|
|
15
|
+
RestRequest req = RestContext.request;
|
|
16
|
+
RestResponse res = RestContext.response;
|
|
17
|
+
String contactId = req.requestURI.substring(req.requestURI.lastIndexOf('/') + 1);
|
|
18
|
+
return new InnerClass();
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
global class InnerClass {
|
|
22
|
+
global String stringMember;
|
|
23
|
+
}
|
|
24
|
+
}
|
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @description Order related operations
|
|
3
|
-
*/
|
|
4
|
-
@RestResource(urlMapping='/Order/*')
|
|
5
|
-
global with sharing class SampleRestResourceWithoutApexDocs {
|
|
6
|
-
@HttpGet
|
|
7
|
-
global static String doGet(String param1, Reference1 param2) {
|
|
8
|
-
return 'Hello World!';
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
@HttpPatch
|
|
12
|
-
global static String doPatch(String param1, Reference1 param2) {
|
|
13
|
-
return 'Hello World!';
|
|
14
|
-
}
|
|
15
|
-
}
|
|
1
|
+
/**
|
|
2
|
+
* @description Order related operations
|
|
3
|
+
*/
|
|
4
|
+
@RestResource(urlMapping='/Order/*')
|
|
5
|
+
global with sharing class SampleRestResourceWithoutApexDocs {
|
|
6
|
+
@HttpGet
|
|
7
|
+
global static String doGet(String param1, Reference1 param2) {
|
|
8
|
+
return 'Hello World!';
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
@HttpPatch
|
|
12
|
+
global static String doPatch(String param1, Reference1 param2) {
|
|
13
|
+
return 'Hello World!';
|
|
14
|
+
}
|
|
15
|
+
}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
public class Reference1 {
|
|
2
|
-
/**
|
|
3
|
-
* @description This is a reference 2 member. Lorem.
|
|
4
|
-
*/
|
|
5
|
-
public Reference2 reference2Member;
|
|
6
|
-
public Reference3 reference3Member;
|
|
7
|
-
public List<Reference4> reference4Collection;
|
|
8
|
-
public Reference5 reference5Member;
|
|
9
|
-
}
|
|
1
|
+
public class Reference1 {
|
|
2
|
+
/**
|
|
3
|
+
* @description This is a reference 2 member. Lorem.
|
|
4
|
+
*/
|
|
5
|
+
public Reference2 reference2Member;
|
|
6
|
+
public Reference3 reference3Member;
|
|
7
|
+
public List<Reference4> reference4Collection;
|
|
8
|
+
public Reference5 reference5Member;
|
|
9
|
+
}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
public class Reference2 {
|
|
2
|
-
public String stringMember;
|
|
3
|
-
|
|
4
|
-
/**
|
|
5
|
-
* @description This is an object reference.
|
|
6
|
-
* @http-schema List<Reference3>
|
|
7
|
-
*/
|
|
8
|
-
public Object objectReference;
|
|
9
|
-
}
|
|
1
|
+
public class Reference2 {
|
|
2
|
+
public String stringMember;
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* @description This is an object reference.
|
|
6
|
+
* @http-schema List<Reference3>
|
|
7
|
+
*/
|
|
8
|
+
public Object objectReference;
|
|
9
|
+
}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
public class Reference3 {
|
|
2
|
-
public Boolean someBoolean;
|
|
3
|
-
}
|
|
1
|
+
public class Reference3 {
|
|
2
|
+
public Boolean someBoolean;
|
|
3
|
+
}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
public class Reference4 {
|
|
2
|
-
public String someString;
|
|
3
|
-
}
|
|
1
|
+
public class Reference4 {
|
|
2
|
+
public String someString;
|
|
3
|
+
}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
public class Reference5 {
|
|
2
|
-
public Reference6 reference6Member;
|
|
3
|
-
}
|
|
1
|
+
public class Reference5 {
|
|
2
|
+
public Reference6 reference6Member;
|
|
3
|
+
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
public class Reference6 {
|
|
2
|
-
/**
|
|
3
|
-
* @description This is the grandchild description.
|
|
4
|
-
*/
|
|
5
|
-
public String grandChildString;
|
|
6
|
-
}
|
|
1
|
+
public class Reference6 {
|
|
2
|
+
/**
|
|
3
|
+
* @description This is the grandchild description.
|
|
4
|
+
*/
|
|
5
|
+
public String grandChildString;
|
|
6
|
+
}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
public class Reference7 {
|
|
2
|
-
public Object untypedObject;
|
|
3
|
-
}
|
|
1
|
+
public class Reference7 {
|
|
2
|
+
public Object untypedObject;
|
|
3
|
+
}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
# Welcome to the Apex Docs documentation example.
|
|
2
|
-
|
|
3
|
-
This content will be added to the top of the home page.
|
|
1
|
+
# Welcome to the Apex Docs documentation example.
|
|
2
|
+
|
|
3
|
+
This content will be added to the top of the home page.
|
package/jest.config.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
module.exports = {
|
|
2
|
-
preset: 'ts-jest',
|
|
3
|
-
testEnvironment: 'node',
|
|
4
|
-
modulePathIgnorePatterns: ['<rootDir>/lib/'],
|
|
5
|
-
};
|
|
1
|
+
module.exports = {
|
|
2
|
+
preset: 'ts-jest',
|
|
3
|
+
testEnvironment: 'node',
|
|
4
|
+
modulePathIgnorePatterns: ['<rootDir>/lib/'],
|
|
5
|
+
};
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { ReflectionResult } from '@cparra/apex-reflection';
|
|
2
|
-
import ApexBundle from '../model/apex-bundle';
|
|
3
|
-
/**
|
|
4
|
-
* Application entry-point to generate documentation out of Apex source files.
|
|
5
|
-
*/
|
|
6
|
-
export declare class Apexdocs {
|
|
7
|
-
/**
|
|
8
|
-
* Generates documentation out of Apex source files.
|
|
9
|
-
*/
|
|
10
|
-
static generate(): void;
|
|
11
|
-
private static filterByScopes;
|
|
12
|
-
static _reflectionWithLogger: (apexBundle: ApexBundle) => ReflectionResult;
|
|
13
|
-
}
|
|
1
|
+
import { ReflectionResult } from '@cparra/apex-reflection';
|
|
2
|
+
import ApexBundle from '../model/apex-bundle';
|
|
3
|
+
/**
|
|
4
|
+
* Application entry-point to generate documentation out of Apex source files.
|
|
5
|
+
*/
|
|
6
|
+
export declare class Apexdocs {
|
|
7
|
+
/**
|
|
8
|
+
* Generates documentation out of Apex source files.
|
|
9
|
+
*/
|
|
10
|
+
static generate(): void;
|
|
11
|
+
private static filterByScopes;
|
|
12
|
+
static _reflectionWithLogger: (apexBundle: ApexBundle) => ReflectionResult;
|
|
13
|
+
}
|