@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.
Files changed (30) hide show
  1. package/README.md +22 -2
  2. package/docs/Misc-Group/nspc.Reference7.md +7 -0
  3. package/docs/Misc-Group/nspc.SampleRestResource.md +6 -0
  4. package/docs/README.md +3 -0
  5. package/docs/restapi.json +589 -571
  6. package/examples/force-app/main/default/classes/AnotherInterface.cls +1 -1
  7. package/examples/force-app/main/default/restapi/SampleRestResource.cls +4 -1
  8. package/examples/force-app/main/default/restapi/SampleRestResourceToSkip.cls +35 -0
  9. package/examples/force-app/main/default/restapi/references/Reference7.cls +3 -0
  10. package/lib/cli/generate.js +7 -1
  11. package/lib/cli/generate.js.map +1 -1
  12. package/lib/model/manifest.d.ts +4 -4
  13. package/lib/model/manifest.js +7 -2
  14. package/lib/model/manifest.js.map +1 -1
  15. package/lib/model/markdown-home-file.js +1 -1
  16. package/lib/model/markdown-home-file.js.map +1 -1
  17. package/lib/transpiler/openapi/parsers/ReferenceBuilder.js +48 -13
  18. package/lib/transpiler/openapi/parsers/ReferenceBuilder.js.map +1 -1
  19. package/lib/util/string-utils.d.ts +1 -1
  20. package/lib/util/string-utils.js +3 -3
  21. package/lib/util/string-utils.js.map +1 -1
  22. package/package.json +2 -2
  23. package/src/cli/generate.ts +6 -1
  24. package/src/model/apex-type-wrappers/MethodMirrorWrapper.ts +1 -1
  25. package/src/model/manifest.ts +18 -4
  26. package/src/model/markdown-home-file.ts +2 -2
  27. package/src/transpiler/openapi/__tests__/open-api-docs-processor.spec.ts +2 -2
  28. package/src/transpiler/openapi/parsers/ReferenceBuilder.ts +76 -19
  29. package/src/transpiler/openapi/parsers/__tests__/ReferenceBuilder.spec.ts +45 -1
  30. 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 docGenerator a set of files that fully document each one of you classes.
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
- * And more!
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.
@@ -0,0 +1,7 @@
1
+ # nspc.Reference7
2
+ ## Fields
3
+
4
+ ### `untypedObject` → `Object`
5
+
6
+
7
+ ---
@@ -29,6 +29,9 @@ Sample HTTP Delete method with references to other types.
29
29
 
30
30
  **Http Response** statusCode: 306 schema: List&lt;Reference1&gt;
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
 
package/docs/README.md CHANGED
@@ -37,6 +37,9 @@
37
37
  ### [nspc.Reference6](/Misc-Group/nspc.Reference6.md)
38
38
 
39
39
 
40
+ ### [nspc.Reference7](/Misc-Group/nspc.Reference7.md)
41
+
42
+
40
43
  ### [nspc.SampleClassWithoutModifier](/Misc-Group/nspc.SampleClassWithoutModifier.md)
41
44
 
42
45