@cparra/apexdocs 2.13.0-alpha.4 → 2.13.1
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 +22 -2
- package/docs/Misc-Group/nspc.Reference7.md +7 -0
- package/docs/Misc-Group/nspc.SampleRestResource.md +6 -0
- package/docs/README.md +3 -0
- package/docs/restapi.json +589 -571
- package/examples/force-app/main/default/classes/AnotherInterface.cls +1 -1
- package/examples/force-app/main/default/restapi/SampleRestResource.cls +4 -1
- package/examples/force-app/main/default/restapi/SampleRestResourceToSkip.cls +35 -0
- package/examples/force-app/main/default/restapi/references/Reference7.cls +3 -0
- package/lib/cli/generate.js +7 -1
- package/lib/cli/generate.js.map +1 -1
- package/lib/model/manifest.d.ts +4 -4
- package/lib/model/manifest.js +7 -2
- package/lib/model/manifest.js.map +1 -1
- package/lib/model/markdown-home-file.js +1 -1
- package/lib/model/markdown-home-file.js.map +1 -1
- package/lib/transpiler/openapi/parsers/ReferenceBuilder.js +48 -13
- package/lib/transpiler/openapi/parsers/ReferenceBuilder.js.map +1 -1
- package/lib/util/string-utils.d.ts +1 -1
- package/lib/util/string-utils.js +3 -3
- package/lib/util/string-utils.js.map +1 -1
- package/package.json +2 -2
- package/src/cli/generate.ts +6 -1
- package/src/model/apex-type-wrappers/MethodMirrorWrapper.ts +1 -1
- package/src/model/manifest.ts +18 -4
- package/src/model/markdown-home-file.ts +2 -2
- package/src/transpiler/openapi/__tests__/open-api-docs-processor.spec.ts +2 -2
- package/src/transpiler/openapi/parsers/ReferenceBuilder.ts +76 -19
- package/src/transpiler/openapi/parsers/__tests__/ReferenceBuilder.spec.ts +45 -1
- package/src/util/string-utils.ts +1 -1
package/README.md
CHANGED
|
@@ -13,7 +13,7 @@ the [Java based ApexDoc tool](https://github.com/SalesforceFoundation/ApexDoc) o
|
|
|
13
13
|
later maintained by Salesforce.org, as that tool is no longer being maintained.
|
|
14
14
|
|
|
15
15
|
ApexDocs is a Node.js library built on Typescript and hosted on [npm](https://www.npmjs.com/package/@cparra/apexdocs).
|
|
16
|
-
It offers CLI capabilities to automatically
|
|
16
|
+
It offers CLI capabilities to automatically document your source code, based on the ApexDoc style of documentation.
|
|
17
17
|
Additionally, it can be imported and consumed directly by your JavaScript code.
|
|
18
18
|
|
|
19
19
|
There are some key differences between ApexDocs and the Java based ApexDoc tool:
|
|
@@ -71,7 +71,10 @@ public class MyClass {
|
|
|
71
71
|
* Apex docs blocks can now all be in a single line
|
|
72
72
|
* Support for grouping blocks of related code within a class
|
|
73
73
|
* Support for HTML tags
|
|
74
|
-
*
|
|
74
|
+
* OpenApi REST specification generation
|
|
75
|
+
* Support for ignoring files and members from being documented
|
|
76
|
+
* Namespace support
|
|
77
|
+
* And much, much more!
|
|
75
78
|
|
|
76
79
|
### Demo
|
|
77
80
|
|
|
@@ -329,6 +332,23 @@ To fix this issue, when not sanitizing HTML, you should wrap any code that conta
|
|
|
329
332
|
treated as HTML within '\`'
|
|
330
333
|
or within `<code>` tags.
|
|
331
334
|
|
|
335
|
+
|
|
336
|
+
### Ignoring files and members
|
|
337
|
+
|
|
338
|
+
You can ignore files and members by using the `@ignore` tag on any ApexDoc block. If used at the class level, the entire
|
|
339
|
+
file will be ignored. If used at the member level, only that member will be ignored.
|
|
340
|
+
|
|
341
|
+
Example
|
|
342
|
+
|
|
343
|
+
```apex
|
|
344
|
+
/**
|
|
345
|
+
* @ignore
|
|
346
|
+
*/
|
|
347
|
+
public class MyClass {
|
|
348
|
+
public static void myMethod() {}
|
|
349
|
+
}
|
|
350
|
+
```
|
|
351
|
+
|
|
332
352
|
## Generating OpenApi REST Definitions
|
|
333
353
|
|
|
334
354
|
ApexDocs supports generating OpenApi 3.1.0 REST definitions based on any `@RestResource` classes in your source code.
|
|
@@ -29,6 +29,9 @@ Sample HTTP Delete method with references to other types.
|
|
|
29
29
|
|
|
30
30
|
**Http Response** statusCode: 306 schema: List<Reference1>
|
|
31
31
|
|
|
32
|
+
|
|
33
|
+
**Http Response** statusCode: 307 schema: Reference7[untypedObject:Reference2]
|
|
34
|
+
|
|
32
35
|
### `static doGet()`
|
|
33
36
|
|
|
34
37
|
`HTTPGET`
|
|
@@ -83,6 +86,9 @@ String
|
|
|
83
86
|
A String SObject.
|
|
84
87
|
|
|
85
88
|
|
|
89
|
+
**Summary** Posts an Account 2
|
|
90
|
+
|
|
91
|
+
|
|
86
92
|
**Http Parameter** name: limit in: query required: true description: Limits the number of items on a page schema: type: integer
|
|
87
93
|
|
|
88
94
|
|