@cparra/apexdocs 2.15.0 → 2.16.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/README.md +10 -0
- package/docs/types/Classes/nspc.ChildClass.md +18 -26
- package/docs/types/Main/nspc.SampleClass.md +25 -25
- package/docs/types/Misc-Group/nspc.AtFutureRecipes.md +4 -0
- package/docs/types/Misc-Group/nspc.EscapedAnnotations.md +4 -0
- package/docs/types/Misc-Group/nspc.GrandparentClass.md +2 -2
- package/docs/types/Misc-Group/nspc.InterfaceWithInheritance.md +6 -10
- package/docs/types/Misc-Group/nspc.MemberGrouping.md +4 -4
- package/docs/types/Misc-Group/nspc.ParentClass.md +7 -7
- package/docs/types/Misc-Group/nspc.Reference1.md +4 -4
- package/docs/types/Misc-Group/nspc.Reference2.md +2 -2
- package/docs/types/Misc-Group/nspc.Reference3.md +1 -1
- package/docs/types/Misc-Group/nspc.Reference4.md +1 -1
- package/docs/types/Misc-Group/nspc.Reference5.md +1 -1
- package/docs/types/Misc-Group/nspc.Reference6.md +1 -1
- package/docs/types/Misc-Group/nspc.Reference7.md +1 -1
- package/docs/types/Misc-Group/nspc.SampleClassWithoutModifier.md +1 -1
- package/docs/types/Misc-Group/nspc.SampleRestResource.md +11 -19
- package/docs/types/Misc-Group/nspc.SampleRestResourceWithInnerClass.md +6 -10
- package/docs/types/Misc-Group/nspc.SampleRestResourceWithoutApexDocs.md +2 -2
- package/docs/types/README.md +6 -0
- package/docs/types/Sample-Interfaces/nspc.SampleInterface.md +6 -10
- package/examples/force-app/main/default/classes/EscapedAnnotations.cls +5 -0
- package/examples/force-app/main/default/classes/MemberGrouping.cls +1 -0
- package/examples/force-app/main/default/classes/SampleClass.cls +2 -0
- package/lib/model/markdown-generation-util/field-declaration-util.js +2 -2
- package/lib/model/markdown-generation-util/field-declaration-util.js.map +1 -1
- package/lib/model/markdown-generation-util/method-declaration-util.js +17 -13
- package/lib/model/markdown-generation-util/method-declaration-util.js.map +1 -1
- package/package.json +4 -4
- package/src/model/markdown-generation-util/field-declaration-util.ts +2 -2
- package/src/model/markdown-generation-util/method-declaration-util.ts +22 -13
package/README.md
CHANGED
|
@@ -69,6 +69,16 @@ public class MyClass {
|
|
|
69
69
|
```
|
|
70
70
|
|
|
71
71
|
* Apex docs blocks can now all be in a single line
|
|
72
|
+
|
|
73
|
+
📒 Note: If you wish to have multiple `@` tags in a single line but don't want them to be treated as ApexDoc annotations, you can
|
|
74
|
+
escape them by adding wrapping the annotation in ticks, for example
|
|
75
|
+
|
|
76
|
+
```apex
|
|
77
|
+
/**
|
|
78
|
+
* @MyCustomAnnotation This is a custom annotation with an `@embedded` annotation
|
|
79
|
+
*/
|
|
80
|
+
```
|
|
81
|
+
|
|
72
82
|
* Support for grouping blocks of related code within a class
|
|
73
83
|
* Support for HTML tags
|
|
74
84
|
* OpenApi REST specification generation
|
|
@@ -21,66 +21,58 @@ ChildClass
|
|
|
21
21
|
|
|
22
22
|
## Fields
|
|
23
23
|
|
|
24
|
-
### `privateStringFromChild` → `String`
|
|
24
|
+
### `private privateStringFromChild` → `String`
|
|
25
25
|
|
|
26
26
|
|
|
27
|
-
### `protectedGrandParentField` → `String`
|
|
27
|
+
### `protected protectedGrandParentField` → `String`
|
|
28
28
|
|
|
29
29
|
*Inherited*
|
|
30
30
|
|
|
31
|
-
### `protectedStringFromParent` → `String`
|
|
31
|
+
### `protected protectedStringFromParent` → `String`
|
|
32
32
|
|
|
33
33
|
*Inherited*
|
|
34
34
|
|
|
35
35
|
This is a protected string, use carefully.
|
|
36
36
|
|
|
37
|
-
### `publicStringFromParent` → `String`
|
|
37
|
+
### `public publicStringFromParent` → `String`
|
|
38
38
|
|
|
39
39
|
*Inherited*
|
|
40
40
|
|
|
41
41
|
---
|
|
42
42
|
## Properties
|
|
43
43
|
|
|
44
|
-
### `AProp` → `String`
|
|
44
|
+
### `protected AProp` → `String`
|
|
45
45
|
|
|
46
46
|
*Inherited*
|
|
47
47
|
|
|
48
48
|
---
|
|
49
49
|
## Methods
|
|
50
|
-
### `doSomething()`
|
|
51
|
-
### `override overridableMethodOverridden()`
|
|
50
|
+
### `public doSomething()`
|
|
51
|
+
### `public override overridableMethodOverridden()`
|
|
52
52
|
|
|
53
53
|
This method was overridden.
|
|
54
54
|
|
|
55
|
-
####
|
|
55
|
+
#### Returns
|
|
56
56
|
|
|
57
|
-
|
|
57
|
+
|Type|Description|
|
|
58
|
+
|---|---|
|
|
59
|
+
|String|A String.|
|
|
58
60
|
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
**Description**
|
|
62
|
-
|
|
63
|
-
A String.
|
|
64
|
-
|
|
65
|
-
### `execute()`
|
|
61
|
+
### `public execute()`
|
|
66
62
|
|
|
67
63
|
Executes the command.
|
|
68
64
|
|
|
69
|
-
### `getValue()`
|
|
65
|
+
### `public getValue()`
|
|
70
66
|
|
|
71
67
|
Returns a value based on the executed command.
|
|
72
68
|
|
|
73
|
-
####
|
|
74
|
-
|
|
75
|
-
**Type**
|
|
76
|
-
|
|
77
|
-
String
|
|
78
|
-
|
|
79
|
-
**Description**
|
|
69
|
+
#### Returns
|
|
80
70
|
|
|
81
|
-
|
|
71
|
+
|Type|Description|
|
|
72
|
+
|---|---|
|
|
73
|
+
|String|The value|
|
|
82
74
|
|
|
83
|
-
### `overridableMethod()`
|
|
75
|
+
### `public overridableMethod()`
|
|
84
76
|
|
|
85
77
|
*Inherited*
|
|
86
78
|
|
|
@@ -20,7 +20,7 @@ This is a class description. This class relates to [nspc.SampleInterface](types/
|
|
|
20
20
|
|
|
21
21
|
## Constructors
|
|
22
22
|
### My Super Group
|
|
23
|
-
##### `SampleClass()`
|
|
23
|
+
##### `public SampleClass()`
|
|
24
24
|
|
|
25
25
|
`NAMESPACEACCESSIBLE`
|
|
26
26
|
|
|
@@ -47,7 +47,7 @@ SampleClass sampleInstance = new SampleClass();
|
|
|
47
47
|
|
|
48
48
|
---
|
|
49
49
|
### Other
|
|
50
|
-
##### `SampleClass(String argument1, String argument2)`
|
|
50
|
+
##### `public SampleClass(String argument1, String argument2)`
|
|
51
51
|
|
|
52
52
|
Constructs a SampleClass with an argument.
|
|
53
53
|
|
|
@@ -62,28 +62,32 @@ Constructs a SampleClass with an argument.
|
|
|
62
62
|
## Fields
|
|
63
63
|
### Common Constants
|
|
64
64
|
|
|
65
|
-
* `ANOTHER_CONSTANT` → `String`
|
|
66
|
-
* `A_CONSTANT` → `String` [`NAMESPACEACCESSIBLE` ] - This is a constant.
|
|
67
|
-
* `listOfStrings` → `List<String>`
|
|
65
|
+
* `public ANOTHER_CONSTANT` → `String`
|
|
66
|
+
* `public A_CONSTANT` → `String` [`NAMESPACEACCESSIBLE` ] - This is a constant.
|
|
67
|
+
* `public listOfStrings` → `List<String>`
|
|
68
68
|
---
|
|
69
69
|
### 'General' Constants
|
|
70
70
|
|
|
71
|
-
* `GENERAL_ANOTHER_CONSTANT` → `String`
|
|
72
|
-
* `GENERAL_A_CONSTANT` → `String` [`NAMESPACEACCESSIBLE` ] - This is a constant.
|
|
71
|
+
* `public GENERAL_ANOTHER_CONSTANT` → `String`
|
|
72
|
+
* `public GENERAL_A_CONSTANT` → `String` [`NAMESPACEACCESSIBLE` ] - This is a constant.
|
|
73
73
|
---
|
|
74
74
|
### Other variables
|
|
75
75
|
|
|
76
|
-
* `someVariable` → `String`
|
|
76
|
+
* `public someVariable` → `String`
|
|
77
|
+
---
|
|
78
|
+
### Other
|
|
79
|
+
|
|
80
|
+
* `private somePrivateStuff` → `String`
|
|
77
81
|
---
|
|
78
82
|
## Properties
|
|
79
83
|
|
|
80
|
-
### `AnotherProp` → `Decimal`
|
|
84
|
+
### `public AnotherProp` → `Decimal`
|
|
81
85
|
|
|
82
86
|
`AURAENABLED`
|
|
83
87
|
|
|
84
88
|
This is a Decimal property.
|
|
85
89
|
|
|
86
|
-
### `MyProp` → `String`
|
|
90
|
+
### `public MyProp` → `String`
|
|
87
91
|
|
|
88
92
|
`AURAENABLED`
|
|
89
93
|
`DEPRECATED`
|
|
@@ -93,7 +97,7 @@ This is a String property.
|
|
|
93
97
|
---
|
|
94
98
|
## Methods
|
|
95
99
|
### A method group
|
|
96
|
-
##### `static sampleMethod(String argument1, String argument2)`
|
|
100
|
+
##### `public static sampleMethod(String argument1, String argument2)`
|
|
97
101
|
|
|
98
102
|
`NAMESPACEACCESSIBLE`
|
|
99
103
|
|
|
@@ -106,15 +110,11 @@ Executes commands based on the passed in argument.
|
|
|
106
110
|
|`argument1`|Argument1 to debug|
|
|
107
111
|
|`argument2`|Argument2 to debug|
|
|
108
112
|
|
|
109
|
-
######
|
|
110
|
-
|
|
111
|
-
**Type**
|
|
113
|
+
###### Returns
|
|
112
114
|
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
Empty string
|
|
115
|
+
|Type|Description|
|
|
116
|
+
|---|---|
|
|
117
|
+
|String|Empty string|
|
|
118
118
|
|
|
119
119
|
###### Example
|
|
120
120
|
```apex
|
|
@@ -123,7 +123,7 @@ System.debug(result);
|
|
|
123
123
|
```
|
|
124
124
|
|
|
125
125
|
|
|
126
|
-
##### `static anotherSampleMethod(String arg1)`
|
|
126
|
+
##### `public static anotherSampleMethod(String arg1)`
|
|
127
127
|
|
|
128
128
|
Something here
|
|
129
129
|
|
|
@@ -132,7 +132,7 @@ Something here
|
|
|
132
132
|
|
|
133
133
|
---
|
|
134
134
|
### Other
|
|
135
|
-
##### `static call()`
|
|
135
|
+
##### `public static call()`
|
|
136
136
|
|
|
137
137
|
Calls the method. This methods allows you to call it.
|
|
138
138
|
|
|
@@ -153,14 +153,14 @@ Inner class belonging to SampleClass.
|
|
|
153
153
|
|
|
154
154
|
#### Properties
|
|
155
155
|
|
|
156
|
-
##### `InnerProp` → `String`
|
|
156
|
+
##### `public InnerProp` → `String`
|
|
157
157
|
|
|
158
158
|
|
|
159
159
|
Description of the inner property.
|
|
160
160
|
|
|
161
161
|
---
|
|
162
162
|
#### Methods
|
|
163
|
-
##### `innerMethod()`
|
|
163
|
+
##### `public innerMethod()`
|
|
164
164
|
|
|
165
165
|
Executes from the inner class.
|
|
166
166
|
|
|
@@ -172,14 +172,14 @@ Inner class belonging to SampleClass.
|
|
|
172
172
|
|
|
173
173
|
#### Properties
|
|
174
174
|
|
|
175
|
-
##### `InnerProp` → `String`
|
|
175
|
+
##### `public InnerProp` → `String`
|
|
176
176
|
|
|
177
177
|
|
|
178
178
|
Description of the inner property.
|
|
179
179
|
|
|
180
180
|
---
|
|
181
181
|
#### Methods
|
|
182
|
-
##### `innerMethod()`
|
|
182
|
+
##### `public innerMethod()`
|
|
183
183
|
|
|
184
184
|
Executes from the inner class.
|
|
185
185
|
|
|
@@ -6,28 +6,24 @@
|
|
|
6
6
|
,
|
|
7
7
|
[nspc.AnotherInterface](types/Classes/nspc.AnotherInterface.md)
|
|
8
8
|
## Methods
|
|
9
|
-
### `execute()`
|
|
9
|
+
### `global execute()`
|
|
10
10
|
|
|
11
11
|
*Inherited*
|
|
12
12
|
|
|
13
13
|
|
|
14
14
|
Executes the command.
|
|
15
15
|
|
|
16
|
-
### `getValue()`
|
|
16
|
+
### `global getValue()`
|
|
17
17
|
|
|
18
18
|
*Inherited*
|
|
19
19
|
|
|
20
20
|
|
|
21
21
|
Returns a value based on the executed command.
|
|
22
22
|
|
|
23
|
-
####
|
|
23
|
+
#### Returns
|
|
24
24
|
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
String
|
|
28
|
-
|
|
29
|
-
**Description**
|
|
30
|
-
|
|
31
|
-
The value
|
|
25
|
+
|Type|Description|
|
|
26
|
+
|---|---|
|
|
27
|
+
|String|The value|
|
|
32
28
|
|
|
33
29
|
---
|
|
@@ -2,12 +2,12 @@
|
|
|
2
2
|
## Fields
|
|
3
3
|
### Group old syntax
|
|
4
4
|
|
|
5
|
-
* `anotherInGroup1` → `String`
|
|
6
|
-
* `inGroup1` → `String`
|
|
5
|
+
* `public anotherInGroup1` → `String`
|
|
6
|
+
* `public inGroup1` → `String`
|
|
7
7
|
---
|
|
8
8
|
### Group new syntax
|
|
9
9
|
Group's description
|
|
10
10
|
|
|
11
|
-
* `anotherInGroup2` → `String`
|
|
12
|
-
* `inGroup2` → `String` - Description for constant in group 2
|
|
11
|
+
* `public anotherInGroup2` → `String` - Description for another constant in group 2
|
|
12
|
+
* `public inGroup2` → `String` - Description for constant in group 2
|
|
13
13
|
---
|
|
@@ -8,30 +8,30 @@ ParentClass
|
|
|
8
8
|
|
|
9
9
|
## Fields
|
|
10
10
|
|
|
11
|
-
### `privateStringFromParent` → `String`
|
|
11
|
+
### `private privateStringFromParent` → `String`
|
|
12
12
|
|
|
13
13
|
|
|
14
|
-
### `protectedGrandParentField` → `String`
|
|
14
|
+
### `protected protectedGrandParentField` → `String`
|
|
15
15
|
|
|
16
16
|
*Inherited*
|
|
17
17
|
|
|
18
|
-
### `protectedStringFromParent` → `String`
|
|
18
|
+
### `protected protectedStringFromParent` → `String`
|
|
19
19
|
|
|
20
20
|
|
|
21
21
|
This is a protected string, use carefully.
|
|
22
22
|
|
|
23
|
-
### `publicStringFromParent` → `String`
|
|
23
|
+
### `public publicStringFromParent` → `String`
|
|
24
24
|
|
|
25
25
|
|
|
26
26
|
---
|
|
27
27
|
## Properties
|
|
28
28
|
|
|
29
|
-
### `AProp` → `String`
|
|
29
|
+
### `protected AProp` → `String`
|
|
30
30
|
|
|
31
31
|
*Inherited*
|
|
32
32
|
|
|
33
33
|
---
|
|
34
34
|
## Methods
|
|
35
|
-
### `overridableMethod()`
|
|
36
|
-
### `overridableMethodOverridden()`
|
|
35
|
+
### `public overridableMethod()`
|
|
36
|
+
### `public overridableMethodOverridden()`
|
|
37
37
|
---
|
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
# nspc.Reference1
|
|
2
2
|
## Fields
|
|
3
3
|
|
|
4
|
-
### `reference2Member` → `Reference2`
|
|
4
|
+
### `public reference2Member` → `Reference2`
|
|
5
5
|
|
|
6
6
|
|
|
7
7
|
This is a reference 2 member. Lorem.
|
|
8
8
|
|
|
9
|
-
### `reference3Member` → `Reference3`
|
|
9
|
+
### `public reference3Member` → `Reference3`
|
|
10
10
|
|
|
11
11
|
|
|
12
|
-
### `reference4Collection` → `List<Reference4>`
|
|
12
|
+
### `public reference4Collection` → `List<Reference4>`
|
|
13
13
|
|
|
14
14
|
|
|
15
|
-
### `reference5Member` → `Reference5`
|
|
15
|
+
### `public reference5Member` → `Reference5`
|
|
16
16
|
|
|
17
17
|
|
|
18
18
|
---
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
Account related operations
|
|
6
6
|
|
|
7
7
|
## Methods
|
|
8
|
-
### `static doDelete()`
|
|
8
|
+
### `global static doDelete()`
|
|
9
9
|
|
|
10
10
|
`HTTPDELETE`
|
|
11
11
|
|
|
@@ -32,21 +32,17 @@ Sample HTTP Delete method with references to other types.
|
|
|
32
32
|
|
|
33
33
|
**Http Response** statusCode: 307 schema: Reference7[untypedObject:Reference2]
|
|
34
34
|
|
|
35
|
-
### `static doGet()`
|
|
35
|
+
### `global static doGet()`
|
|
36
36
|
|
|
37
37
|
`HTTPGET`
|
|
38
38
|
|
|
39
39
|
This is a sample HTTP Get method
|
|
40
40
|
|
|
41
|
-
####
|
|
41
|
+
#### Returns
|
|
42
42
|
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
Account
|
|
46
|
-
|
|
47
|
-
**Description**
|
|
48
|
-
|
|
49
|
-
An Account SObject.
|
|
43
|
+
|Type|Description|
|
|
44
|
+
|---|---|
|
|
45
|
+
|Account|An Account SObject.|
|
|
50
46
|
|
|
51
47
|
|
|
52
48
|
**Http Parameter** name: limit in: query required: true description: Limits the number of items on a page schema: type: integer
|
|
@@ -69,21 +65,17 @@ An Account SObject.
|
|
|
69
65
|
|
|
70
66
|
**Http Response** statusCode: 100 schema: type: object properties: anotherObject: description: An object inside of an object type: object properties: message: type: string somethingElse: type: number
|
|
71
67
|
|
|
72
|
-
### `static doPost(String name, String phone, String website)`
|
|
68
|
+
### `global static doPost(String name, String phone, String website)`
|
|
73
69
|
|
|
74
70
|
`HTTPPOST`
|
|
75
71
|
|
|
76
72
|
This is a sample HTTP Post method
|
|
77
73
|
|
|
78
|
-
####
|
|
79
|
-
|
|
80
|
-
**Type**
|
|
81
|
-
|
|
82
|
-
String
|
|
83
|
-
|
|
84
|
-
**Description**
|
|
74
|
+
#### Returns
|
|
85
75
|
|
|
86
|
-
|
|
76
|
+
|Type|Description|
|
|
77
|
+
|---|---|
|
|
78
|
+
|String|A String SObject.|
|
|
87
79
|
|
|
88
80
|
|
|
89
81
|
**Summary** Posts an Account 2
|
|
@@ -5,21 +5,17 @@
|
|
|
5
5
|
Contact related operations
|
|
6
6
|
|
|
7
7
|
## Methods
|
|
8
|
-
### `static doGet()`
|
|
8
|
+
### `global static doGet()`
|
|
9
9
|
|
|
10
10
|
`HTTPGET`
|
|
11
11
|
|
|
12
12
|
This is a sample HTTP Get method
|
|
13
13
|
|
|
14
|
-
####
|
|
14
|
+
#### Returns
|
|
15
15
|
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
InnerClass
|
|
19
|
-
|
|
20
|
-
**Description**
|
|
21
|
-
|
|
22
|
-
A SampleRestResourceWithInnerClass.InnerClass Object.
|
|
16
|
+
|Type|Description|
|
|
17
|
+
|---|---|
|
|
18
|
+
|InnerClass|A SampleRestResourceWithInnerClass.InnerClass Object.|
|
|
23
19
|
|
|
24
20
|
|
|
25
21
|
**Http Response** statusCode: 200 schema: SampleRestResourceWithInnerClass.InnerClass
|
|
@@ -29,7 +25,7 @@ A SampleRestResourceWithInnerClass.InnerClass Object.
|
|
|
29
25
|
### InnerClass
|
|
30
26
|
#### Fields
|
|
31
27
|
|
|
32
|
-
##### `stringMember` → `String`
|
|
28
|
+
##### `global stringMember` → `String`
|
|
33
29
|
|
|
34
30
|
|
|
35
31
|
---
|
|
@@ -5,10 +5,10 @@
|
|
|
5
5
|
Order related operations
|
|
6
6
|
|
|
7
7
|
## Methods
|
|
8
|
-
### `static doGet(String param1, Reference1 param2)`
|
|
8
|
+
### `global static doGet(String param1, Reference1 param2)`
|
|
9
9
|
|
|
10
10
|
`HTTPGET`
|
|
11
|
-
### `static doPatch(String param1, Reference1 param2)`
|
|
11
|
+
### `global static doPatch(String param1, Reference1 param2)`
|
|
12
12
|
|
|
13
13
|
`HTTPPATCH`
|
|
14
14
|
---
|
package/docs/types/README.md
CHANGED
|
@@ -6,22 +6,18 @@ This is an interface description.
|
|
|
6
6
|
**Group** Sample Interfaces
|
|
7
7
|
|
|
8
8
|
## Methods
|
|
9
|
-
### `execute()`
|
|
9
|
+
### `global execute()`
|
|
10
10
|
|
|
11
11
|
Executes the command.
|
|
12
12
|
|
|
13
|
-
### `getValue()`
|
|
13
|
+
### `global getValue()`
|
|
14
14
|
|
|
15
15
|
Returns a value based on the executed command.
|
|
16
16
|
|
|
17
|
-
####
|
|
17
|
+
#### Returns
|
|
18
18
|
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
String
|
|
22
|
-
|
|
23
|
-
**Description**
|
|
24
|
-
|
|
25
|
-
The value
|
|
19
|
+
|Type|Description|
|
|
20
|
+
|---|---|
|
|
21
|
+
|String|The value|
|
|
26
22
|
|
|
27
23
|
---
|
|
@@ -11,6 +11,7 @@ public class MemberGrouping {
|
|
|
11
11
|
|
|
12
12
|
/** @description Description for constant in group 2 */
|
|
13
13
|
public static final String inGroup2;
|
|
14
|
+
/** @description Description for another constant in group 2 @future annotation */
|
|
14
15
|
public static final String anotherInGroup2;
|
|
15
16
|
/** @end-group */
|
|
16
17
|
}
|
|
@@ -20,7 +20,7 @@ exports.declareField = declareField;
|
|
|
20
20
|
function addFieldSection(markdownFile, mirrorModel, startingHeadingLevel, grouped) {
|
|
21
21
|
var _a, _b, _c;
|
|
22
22
|
if (!grouped) {
|
|
23
|
-
markdownFile.addTitle(`\`${mirrorModel.name}\` → \`${mirrorModel.typeReference.rawDeclaration}\``, startingHeadingLevel + 2);
|
|
23
|
+
markdownFile.addTitle(`\`${mirrorModel.access_modifier} ${mirrorModel.name}\` → \`${mirrorModel.typeReference.rawDeclaration}\``, startingHeadingLevel + 2);
|
|
24
24
|
markdownFile.addBlankLine();
|
|
25
25
|
if (mirrorModel.inherited) {
|
|
26
26
|
markdownFile.addText('*Inherited*');
|
|
@@ -51,7 +51,7 @@ function addFieldSection(markdownFile, mirrorModel, startingHeadingLevel, groupe
|
|
|
51
51
|
if ((_b = mirrorModel.docComment) === null || _b === void 0 ? void 0 : _b.description) {
|
|
52
52
|
description = ` - ${(_c = mirrorModel.docComment) === null || _c === void 0 ? void 0 : _c.description}`;
|
|
53
53
|
}
|
|
54
|
-
let listItemText = `\`${mirrorModel.name}\` → \`${mirrorModel.typeReference.rawDeclaration}\``;
|
|
54
|
+
let listItemText = `\`${mirrorModel.access_modifier} ${mirrorModel.name}\` → \`${mirrorModel.typeReference.rawDeclaration}\``;
|
|
55
55
|
if (mirrorModel.inherited) {
|
|
56
56
|
listItemText += '(*Inherited*)';
|
|
57
57
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"field-declaration-util.js","sourceRoot":"","sources":["../../../src/model/markdown-generation-util/field-declaration-util.ts"],"names":[],"mappings":";;;AAGA,SAAgB,YAAY,CAC1B,YAA0B,EAC1B,MAAsE,EACtE,oBAA4B,EAC5B,OAAO,GAAG,KAAK;IAEf,YAAY,CAAC,YAAY,EAAE,CAAC;IAC5B,MAAM;SACH,IAAI,CAAC,CAAC,KAAK,EAAE,KAAK,EAAE,EAAE;QACrB,IAAI,KAAK,CAAC,IAAI,GAAG,KAAK,CAAC,IAAI;YAAE,OAAO,CAAC,CAAC,CAAC;QACvC,IAAI,KAAK,CAAC,IAAI,GAAG,KAAK,CAAC,IAAI;YAAE,OAAO,CAAC,CAAC;QACtC,OAAO,CAAC,CAAC;IACX,CAAC,CAAC;SACD,OAAO,CAAC,CAAC,aAAa,EAAE,EAAE;QACzB,eAAe,CAAC,YAAY,EAAE,aAAa,EAAE,oBAAoB,EAAE,OAAO,CAAC,CAAC;IAC9E,CAAC,CAAC,CAAC;IAEL,YAAY,CAAC,iBAAiB,EAAE,CAAC;AACnC,CAAC;AAlBD,oCAkBC;AAED,SAAS,eAAe,CACtB,YAA0B,EAC1B,WAA4B,EAC5B,oBAA4B,EAC5B,OAAgB;;IAEhB,IAAI,CAAC,OAAO,EAAE;QACZ,YAAY,CAAC,QAAQ,CACnB,KAAK,WAAW,CAAC,IAAI,UAAU,WAAW,CAAC,aAAa,CAAC,cAAc,IAAI,
|
|
1
|
+
{"version":3,"file":"field-declaration-util.js","sourceRoot":"","sources":["../../../src/model/markdown-generation-util/field-declaration-util.ts"],"names":[],"mappings":";;;AAGA,SAAgB,YAAY,CAC1B,YAA0B,EAC1B,MAAsE,EACtE,oBAA4B,EAC5B,OAAO,GAAG,KAAK;IAEf,YAAY,CAAC,YAAY,EAAE,CAAC;IAC5B,MAAM;SACH,IAAI,CAAC,CAAC,KAAK,EAAE,KAAK,EAAE,EAAE;QACrB,IAAI,KAAK,CAAC,IAAI,GAAG,KAAK,CAAC,IAAI;YAAE,OAAO,CAAC,CAAC,CAAC;QACvC,IAAI,KAAK,CAAC,IAAI,GAAG,KAAK,CAAC,IAAI;YAAE,OAAO,CAAC,CAAC;QACtC,OAAO,CAAC,CAAC;IACX,CAAC,CAAC;SACD,OAAO,CAAC,CAAC,aAAa,EAAE,EAAE;QACzB,eAAe,CAAC,YAAY,EAAE,aAAa,EAAE,oBAAoB,EAAE,OAAO,CAAC,CAAC;IAC9E,CAAC,CAAC,CAAC;IAEL,YAAY,CAAC,iBAAiB,EAAE,CAAC;AACnC,CAAC;AAlBD,oCAkBC;AAED,SAAS,eAAe,CACtB,YAA0B,EAC1B,WAA4B,EAC5B,oBAA4B,EAC5B,OAAgB;;IAEhB,IAAI,CAAC,OAAO,EAAE;QACZ,YAAY,CAAC,QAAQ,CACnB,KAAK,WAAW,CAAC,eAAe,IAAI,WAAW,CAAC,IAAI,UAAU,WAAW,CAAC,aAAa,CAAC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AAW,CAAC,aAAa,CAAC,cAAc,IAAI,CAAC;QAC9H,IAAI,WAAW,CAAC,SAAS,EAAE;YACzB,YAAY,IAAI,eAAe,CAAC;SACjC;QACD,YAAY,IAAI,GAAG,WAAW,IAAI,WAAW,EAAE,CAAC;QAEhD,YAAY,CAAC,WAAW,CAAC,YAAY,CAAC,CAAC;QACvC,YAAY,CAAC,YAAY,EAAE,CAAC;KAC7B;AACH,CAAC"}
|
|
@@ -5,8 +5,10 @@ const doc_comment_annotation_util_1 = require("./doc-comment-annotation-util");
|
|
|
5
5
|
function declareMethod(markdownFile, methods, startingHeadingLevel, className = '') {
|
|
6
6
|
methods.forEach((currentMethod) => {
|
|
7
7
|
var _a, _b;
|
|
8
|
-
const signatureName = isMethod(currentMethod)
|
|
9
|
-
|
|
8
|
+
const signatureName = isMethod(currentMethod)
|
|
9
|
+
? `${currentMethod.name}`
|
|
10
|
+
: className;
|
|
11
|
+
markdownFile.addTitle(`\`${buildSignature(currentMethod.access_modifier, signatureName, currentMethod)}\``, startingHeadingLevel + 2);
|
|
10
12
|
// Inheritance tag
|
|
11
13
|
if (isMethod(currentMethod)) {
|
|
12
14
|
const asMethodMirror = currentMethod;
|
|
@@ -40,10 +42,18 @@ function declareMethod(markdownFile, methods, startingHeadingLevel, className =
|
|
|
40
42
|
markdownFile.addHorizontalRule();
|
|
41
43
|
}
|
|
42
44
|
exports.declareMethod = declareMethod;
|
|
43
|
-
function buildSignature(name, parameterAware) {
|
|
45
|
+
function buildSignature(accessModifier, name, parameterAware) {
|
|
44
46
|
let signature = `${name}(`;
|
|
45
47
|
if (isMethod(parameterAware) && parameterAware.memberModifiers.length) {
|
|
46
|
-
signature =
|
|
48
|
+
signature =
|
|
49
|
+
accessModifier +
|
|
50
|
+
' ' +
|
|
51
|
+
parameterAware.memberModifiers.join(' ') +
|
|
52
|
+
' ' +
|
|
53
|
+
signature;
|
|
54
|
+
}
|
|
55
|
+
else {
|
|
56
|
+
signature = accessModifier + ' ' + signature;
|
|
47
57
|
}
|
|
48
58
|
const signatureParameters = parameterAware.parameters.map((param) => `${param.typeReference.rawDeclaration} ${param.name}`);
|
|
49
59
|
signature += signatureParameters.join(', ');
|
|
@@ -69,15 +79,9 @@ function addReturns(markdownFile, methodModel, startingHeadingLevel) {
|
|
|
69
79
|
if (!((_a = methodModel.docComment) === null || _a === void 0 ? void 0 : _a.returnAnnotation)) {
|
|
70
80
|
return;
|
|
71
81
|
}
|
|
72
|
-
markdownFile.addTitle('
|
|
73
|
-
markdownFile.
|
|
74
|
-
markdownFile.
|
|
75
|
-
markdownFile.addBlankLine();
|
|
76
|
-
markdownFile.addText(methodModel.typeReference.rawDeclaration);
|
|
77
|
-
markdownFile.addBlankLine();
|
|
78
|
-
markdownFile.addText('**Description**');
|
|
79
|
-
markdownFile.addBlankLine();
|
|
80
|
-
markdownFile.addText((_b = methodModel.docComment) === null || _b === void 0 ? void 0 : _b.returnAnnotation.bodyLines.join(' '));
|
|
82
|
+
markdownFile.addTitle('Returns', startingHeadingLevel + 3);
|
|
83
|
+
markdownFile.initializeTable('Type', 'Description');
|
|
84
|
+
markdownFile.addTableRow(methodModel.typeReference.rawDeclaration, (_b = methodModel.docComment) === null || _b === void 0 ? void 0 : _b.returnAnnotation.bodyLines.join(' '));
|
|
81
85
|
markdownFile.addBlankLine();
|
|
82
86
|
}
|
|
83
87
|
function addThrowsBlock(markdownFile, docCommentAware, startingHeadingLevel) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"method-declaration-util.js","sourceRoot":"","sources":["../../../src/model/markdown-generation-util/method-declaration-util.ts"],"names":[],"mappings":";;;AAGA,+EAA+E;AAG/E,SAAgB,aAAa,CAC3B,YAA0B,EAC1B,OAA4D,EAC5D,oBAA4B,EAC5B,SAAS,GAAG,EAAE;IAEd,OAAO,CAAC,OAAO,CAAC,CAAC,aAAa,EAAE,EAAE;;QAChC,MAAM,aAAa,GAAG,QAAQ,CAAC,aAAa,CAAC,CAAC,CAAC,
|
|
1
|
+
{"version":3,"file":"method-declaration-util.js","sourceRoot":"","sources":["../../../src/model/markdown-generation-util/method-declaration-util.ts"],"names":[],"mappings":";;;AAGA,+EAA+E;AAG/E,SAAgB,aAAa,CAC3B,YAA0B,EAC1B,OAA4D,EAC5D,oBAA4B,EAC5B,SAAS,GAAG,EAAE;IAEd,OAAO,CAAC,OAAO,CAAC,CAAC,aAAa,EAAE,EAAE;;QAChC,MAAM,aAAa,GAAG,QAAQ,CAAC,aAAa,CAAC;YAC3C,CAAC,CAAC,GAAI,aAA6C,CAAC,IAAI,EAAE;YAC1D,CAAC,CAAC,SAAS,CAAC;QACd,YAAY,CAAC,QAAQ,CACnB,KAAK,cAAc,CAAC,aAAa,CAAC,eAAe,EAAE,aAAa,EAAE,aAAa,CAAC,IAAI,EACpF,oBAAoB,GAAG,CAAC,CACzB,CAAC;QAEF,kBAAkB;QAClB,IAAI,QAAQ,CAAC,aAAa,CAAC,EAAE;YAC3B,MAAM,cAAc,GAAG,aAA4C,CAAC;YACpE,IAAI,cAAc,CAAC,SAAS,EAAE;gBAC5B,YAAY,CAAC,YAAY,EAAE,CAAC;gBAC5B,YAAY,CAAC,OAAO,CAAC,aAAa,CAAC,CAAC;gBACpC,YAAY,CAAC,YAAY,EAAE,CAAC;aAC7B;SACF;QAED,aAAa,CAAC,WAAW,CAAC,OAAO,CAAC,CAAC,UAAU,EAAE,EAAE;YAC/C,YAAY,CAAC,YAAY,EAAE,CAAC;YAC5B,YAAY,CAAC,OAAO,CAAC,KAAK,UAAU,CAAC,IAAI,CAAC,WAAW,EAAE,IAAI,CAAC,CAAC;QAC/D,CAAC,CAAC,CAAC;QAEH,IAAI,MAAA,aAAa,CAAC,UAAU,0CAAE,WAAW,EAAE;YACzC,YAAY,CAAC,YAAY,EAAE,CAAC;YAC5B,YAAY,CAAC,OAAO,CAAC,aAAa,CAAC,UAAU,CAAC,WAAW,CAAC,CAAC;YAC3D,YAAY,CAAC,YAAY,EAAE,CAAC;SAC7B;QA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ra/apexdocs",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.16.0",
|
|
4
4
|
"description": "Library with CLI capabilities to generate documentation for Salesforce Apex classes.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"apex",
|
|
@@ -47,9 +47,9 @@
|
|
|
47
47
|
"eslint": "^8.0.1",
|
|
48
48
|
"eslint-config-prettier": "^8.3.0",
|
|
49
49
|
"eslint-plugin-prettier": "^4.0.0",
|
|
50
|
-
"husky": "^
|
|
50
|
+
"husky": "^8.0.3",
|
|
51
51
|
"jest": "^27.5.1",
|
|
52
|
-
"lint-staged": "^
|
|
52
|
+
"lint-staged": "^13.2.1",
|
|
53
53
|
"prettier": "^2.4.1",
|
|
54
54
|
"rimraf": "^3.0.2",
|
|
55
55
|
"ts-jest": "^27.1.3",
|
|
@@ -66,7 +66,7 @@
|
|
|
66
66
|
]
|
|
67
67
|
},
|
|
68
68
|
"dependencies": {
|
|
69
|
-
"@cparra/apex-reflection": "2.
|
|
69
|
+
"@cparra/apex-reflection": "2.4.0",
|
|
70
70
|
"chalk": "^4.1.2",
|
|
71
71
|
"fast-xml-parser": "^4.0.1",
|
|
72
72
|
"js-yaml": "^4.1.0",
|
|
@@ -29,7 +29,7 @@ function addFieldSection(
|
|
|
29
29
|
) {
|
|
30
30
|
if (!grouped) {
|
|
31
31
|
markdownFile.addTitle(
|
|
32
|
-
`\`${mirrorModel.name}\` → \`${mirrorModel.typeReference.rawDeclaration}\``,
|
|
32
|
+
`\`${mirrorModel.access_modifier} ${mirrorModel.name}\` → \`${mirrorModel.typeReference.rawDeclaration}\``,
|
|
33
33
|
startingHeadingLevel + 2,
|
|
34
34
|
);
|
|
35
35
|
markdownFile.addBlankLine();
|
|
@@ -65,7 +65,7 @@ function addFieldSection(
|
|
|
65
65
|
description = ` - ${mirrorModel.docComment?.description}`;
|
|
66
66
|
}
|
|
67
67
|
|
|
68
|
-
let listItemText = `\`${mirrorModel.name}\` → \`${mirrorModel.typeReference.rawDeclaration}\``;
|
|
68
|
+
let listItemText = `\`${mirrorModel.access_modifier} ${mirrorModel.name}\` → \`${mirrorModel.typeReference.rawDeclaration}\``;
|
|
69
69
|
if (mirrorModel.inherited) {
|
|
70
70
|
listItemText += '(*Inherited*)';
|
|
71
71
|
}
|
|
@@ -11,8 +11,13 @@ export function declareMethod(
|
|
|
11
11
|
className = '',
|
|
12
12
|
): void {
|
|
13
13
|
methods.forEach((currentMethod) => {
|
|
14
|
-
const signatureName = isMethod(currentMethod)
|
|
15
|
-
|
|
14
|
+
const signatureName = isMethod(currentMethod)
|
|
15
|
+
? `${(currentMethod as MethodMirrorWithInheritance).name}`
|
|
16
|
+
: className;
|
|
17
|
+
markdownFile.addTitle(
|
|
18
|
+
`\`${buildSignature(currentMethod.access_modifier, signatureName, currentMethod)}\``,
|
|
19
|
+
startingHeadingLevel + 2,
|
|
20
|
+
);
|
|
16
21
|
|
|
17
22
|
// Inheritance tag
|
|
18
23
|
if (isMethod(currentMethod)) {
|
|
@@ -63,10 +68,17 @@ type DocCommentAware = {
|
|
|
63
68
|
docComment?: DocComment;
|
|
64
69
|
};
|
|
65
70
|
|
|
66
|
-
function buildSignature(name: string, parameterAware: ParameterAware): string {
|
|
71
|
+
function buildSignature(accessModifier: string, name: string, parameterAware: ParameterAware): string {
|
|
67
72
|
let signature = `${name}(`;
|
|
68
73
|
if (isMethod(parameterAware) && (parameterAware as MethodMirrorWithInheritance).memberModifiers.length) {
|
|
69
|
-
signature =
|
|
74
|
+
signature =
|
|
75
|
+
accessModifier +
|
|
76
|
+
' ' +
|
|
77
|
+
(parameterAware as MethodMirrorWithInheritance).memberModifiers.join(' ') +
|
|
78
|
+
' ' +
|
|
79
|
+
signature;
|
|
80
|
+
} else {
|
|
81
|
+
signature = accessModifier + ' ' + signature;
|
|
70
82
|
}
|
|
71
83
|
const signatureParameters = parameterAware.parameters.map(
|
|
72
84
|
(param) => `${param.typeReference.rawDeclaration} ${param.name}`,
|
|
@@ -106,15 +118,12 @@ function addReturns(
|
|
|
106
118
|
return;
|
|
107
119
|
}
|
|
108
120
|
|
|
109
|
-
markdownFile.addTitle('
|
|
110
|
-
markdownFile.
|
|
111
|
-
markdownFile.
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
markdownFile.addText('**Description**');
|
|
116
|
-
markdownFile.addBlankLine();
|
|
117
|
-
markdownFile.addText(methodModel.docComment?.returnAnnotation.bodyLines.join(' '));
|
|
121
|
+
markdownFile.addTitle('Returns', startingHeadingLevel + 3);
|
|
122
|
+
markdownFile.initializeTable('Type', 'Description');
|
|
123
|
+
markdownFile.addTableRow(
|
|
124
|
+
methodModel.typeReference.rawDeclaration,
|
|
125
|
+
methodModel.docComment?.returnAnnotation.bodyLines.join(' '),
|
|
126
|
+
);
|
|
118
127
|
markdownFile.addBlankLine();
|
|
119
128
|
}
|
|
120
129
|
|