@cparra/apexdocs 2.11.0 → 2.12.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/docs/restapi.json CHANGED
@@ -10,7 +10,7 @@
10
10
  }
11
11
  ],
12
12
  "paths": {
13
- "/Account/*": {
13
+ "/Account/": {
14
14
  "description": "Account related operations",
15
15
  "get": {
16
16
  "description": "This is a sample HTTP Get method",
@@ -318,7 +318,7 @@
318
318
  }
319
319
  }
320
320
  },
321
- "/Contact/*": {
321
+ "/Contact/": {
322
322
  "description": "Contact related operations",
323
323
  "get": {
324
324
  "description": "This is a sample HTTP Get method",
@@ -336,7 +336,7 @@
336
336
  }
337
337
  }
338
338
  },
339
- "/Order/*": {
339
+ "/Order/": {
340
340
  "description": "Order related operations",
341
341
  "get": {
342
342
  "requestBody": {
@@ -1,16 +1,16 @@
1
- public class MemberGrouping {
2
- // @start-group Group old syntax
3
- public static final String inGroup1;
4
- public static final String anotherInGroup1;
5
- // @end-group
6
-
7
- /**
8
- * @start-group Group new syntax
9
- * @description Group's description
10
- */
11
-
12
- /** @description Description for constant in group 2 */
13
- public static final String inGroup2;
14
- public static final String anotherInGroup2;
15
- /** @end-group */
16
- }
1
+ public class MemberGrouping {
2
+ // @start-group Group old syntax
3
+ public static final String inGroup1;
4
+ public static final String anotherInGroup1;
5
+ // @end-group
6
+
7
+ /**
8
+ * @start-group Group new syntax
9
+ * @description Group's description
10
+ */
11
+
12
+ /** @description Description for constant in group 2 */
13
+ public static final String inGroup2;
14
+ public static final String anotherInGroup2;
15
+ /** @end-group */
16
+ }
@@ -57,7 +57,7 @@ class OpenApiDocsProcessor extends processor_type_transpiler_1.default {
57
57
  logger_1.Logger.error(`Type does not contain urlMapping annotation ${type.name}`);
58
58
  return null;
59
59
  }
60
- return urlMapping.value.replaceAll('"', '').replaceAll("'", '');
60
+ return urlMapping.value.replaceAll('"', '').replaceAll("'", '').replaceAll('/*', '/');
61
61
  }
62
62
  }
63
63
  exports.OpenApiDocsProcessor = OpenApiDocsProcessor;
@@ -1 +1 @@
1
- {"version":3,"file":"open-api-docs-processor.js","sourceRoot":"","sources":["../../../src/transpiler/openapi/open-api-docs-processor.ts"],"names":[],"mappings":";;;AAAA,4EAAmE;AACnE,sDAAkD;AAElD,6EAAwE;AACxE,8CAA2C;AAC3C,2DAAuD;AACvD,6CAA0C;AAC1C,yDAAsD;AAEtD,MAAa,oBAAqB,SAAQ,mCAAuB;IAI/D;QACE,KAAK,EAAE,CAAC;QA+CV,mBAAc,GAA0C,GAAG,EAAE;YAC3D,IAAI,CAAC,cAAc,CAAC,QAAQ,CAAC,IAAI,mCAAe,CAAC,IAAI,CAAC,YAAY,CAAC,CAAC,CAAC;QACvE,CAAC,CAAC;QAhDA,IAAI,CAAC,cAAc,GAAG,IAAI,8BAAa,EAAE,CAAC;QAC1C,MAAM,KAAK,GAAG,mBAAQ,CAAC,WAAW,EAAE,CAAC,eAAe,EAAE,CAAC;QACvD,IAAI,CAAC,KAAK,EAAE;YACV,MAAM,KAAK,CAAC,gCAAgC,CAAC,CAAC;SAC/C;QACD,IAAI,CAAC,YAAY,GAAG,IAAI,kBAAO,CAAC,KAAK,EAAE,OAAO,EAAE,mBAAQ,CAAC,WAAW,EAAE,CAAC,YAAY,EAAE,CAAC,CAAC;IACzF,CAAC;IAED,WAAW;QACT,OAAO,IAAI,CAAC,cAAc,CAAC;IAC7B,CAAC;IAED,SAAS,CAAC,IAAU;;QAClB,eAAM,CAAC,SAAS,CAAC,cAAc,IAAI,CAAC,IAAI,EAAE,EAAE,KAAK,EAAE,OAAO,EAAE,KAAK,CAAC,CAAC;QAEnE,MAAM,YAAY,GAAG,IAAI,CAAC,eAAe,CAAC,IAAI,CAAC,CAAC;QAChD,IAAI,CAAC,YAAY,EAAE;YACjB,OAAO;SACR;QAED,IAAI,CAAC,YAAY,CAAC,KAAK,CAAC,YAAY,CAAC,GAAG,EAAE,CAAC;QAC3C,IAAI,MAAA,IAAI,CAA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,CAAC,UAAU,CAAC,GAAG,EAAE,EAAE,CAAC,CAAC,UAAU,CAAC,GAAG,EAAE,EAAE,CAAC,CAAC;IAClE,CAAC;CACF;AApED,oDAoEC"}
1
+ {"version":3,"file":"open-api-docs-processor.js","sourceRoot":"","sources":["../../../src/transpiler/openapi/open-api-docs-processor.ts"],"names":[],"mappings":";;;AAAA,4EAAmE;AACnE,sDAAkD;AAElD,6EAAwE;AACxE,8CAA2C;AAC3C,2DAAuD;AACvD,6CAA0C;AAC1C,yDAAsD;AAEtD,MAAa,oBAAqB,SAAQ,mCAAuB;IAI/D;QACE,KAAK,EAAE,CAAC;QA+CV,mBAAc,GAA0C,GAAG,EAAE;YAC3D,IAAI,CAAC,cAAc,CAAC,QAAQ,CAAC,IAAI,mCAAe,CAAC,IAAI,CAAC,YAAY,CAAC,CAAC,CAAC;QACvE,CAAC,CAAC;QAhDA,IAAI,CAAC,cAAc,GAAG,IAAI,8BAAa,EAAE,CAAC;QAC1C,MAAM,KAAK,GAAG,mBAAQ,CAAC,WAAW,EAAE,CAAC,eAAe,EAAE,CAAC;QACvD,IAAI,CAAC,KAAK,EAAE;YACV,MAAM,KAAK,CAAC,gCAAgC,CAAC,CAAC;SAC/C;QACD,IAAI,CAAC,YAAY,GAAG,IAAI,kBAAO,CAAC,KAAK,EAAE,OAAO,EAAE,mBAAQ,CAAC,WAAW,EAAE,CAAC,YAAY,EAAE,CAAC,CAAC;IACzF,CAAC;IAED,WAAW;QACT,OAAO,IAAI,CAAC,cAAc,CAAC;IAC7B,CAAC;IAED,SAAS,CAAC,IAAU;;QAClB,eAAM,CAAC,SAAS,CAAC,cAAc,IAAI,CAAC,IAAI,EAAE,EAAE,KAAK,EAAE,OAAO,EAAE,KAAK,CAAC,CAAC;QAEnE,MAAM,YAAY,GAAG,IAAI,CAAC,eAAe,CAAC,IAAI,CAAC,CAAC;QAChD,IAAI,CAAC,YAAY,EAAE;YACjB,OAAO;SACR;QAED,IAAI,CAAC,YAAY,CAAC,K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,CAAC,CAAC;YACzE,OAAO,IAAI,CAAC;SACb;QAED,OAAO,UAAU,CAAC,KAAK,CAAC,UAAU,CAAC,GAAG,EAAE,EAAE,CAAC,CAAC,UAAU,CAAC,GAAG,EAAE,EAAE,CAAC,CAAC,UAAU,CAAC,IAAI,EAAE,GAAG,CAAC,CAAC;IACxF,CAAC;CACF;AApED,oDAoEC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cparra/apexdocs",
3
- "version": "2.11.0",
3
+ "version": "2.12.0",
4
4
  "description": "Library with CLI capabilities to generate documentation for Salesforce Apex classes.",
5
5
  "keywords": [
6
6
  "apex",
@@ -66,7 +66,7 @@
66
66
  ]
67
67
  },
68
68
  "dependencies": {
69
- "@cparra/apex-reflection": "2.1.1",
69
+ "@cparra/apex-reflection": "2.2.0",
70
70
  "chalk": "^4.1.2",
71
71
  "fast-xml-parser": "^4.0.1",
72
72
  "js-yaml": "^4.1.0",
@@ -21,7 +21,7 @@ it('should add a path based on the @UrlResource annotation on the class', functi
21
21
  const processor = new OpenApiDocsProcessor();
22
22
  processor.onProcess(classMirror);
23
23
 
24
- expect(processor.openApiModel.paths).toHaveProperty('/Account/*');
24
+ expect(processor.openApiModel.paths).toHaveProperty('/Account/');
25
25
  });
26
26
 
27
27
  it('should contain a path with a description when the class has an ApexDoc comment', function () {
@@ -37,5 +37,5 @@ it('should contain a path with a description when the class has an ApexDoc comme
37
37
  const processor = new OpenApiDocsProcessor();
38
38
  processor.onProcess(classMirror);
39
39
 
40
- expect(processor.openApiModel.paths['/Account/*'].description).toBe('My Description');
40
+ expect(processor.openApiModel.paths['/Account/'].description).toBe('My Description');
41
41
  });
@@ -73,6 +73,6 @@ export class OpenApiDocsProcessor extends ProcessorTypeTranspiler {
73
73
  return null;
74
74
  }
75
75
 
76
- return urlMapping.value.replaceAll('"', '').replaceAll("'", '');
76
+ return urlMapping.value.replaceAll('"', '').replaceAll("'", '').replaceAll('/*', '/');
77
77
  }
78
78
  }