@cparra/apexdocs 2.22.0 → 2.23.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 -682
- package/apexdocs.config.ts +13 -11
- package/docs/README.md +1 -1
- package/docs/restapi.json +589 -589
- package/docs/types/Classes/nspc.ChildClass.md +21 -18
- package/docs/types/Main/nspc.SampleClass.md +13 -13
- package/examples/force-app/main/default/classes/AnotherInterface.cls +16 -16
- package/examples/force-app/main/default/classes/ChildClass.cls +42 -41
- 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 -122
- package/lib/cli/generate.js.map +1 -1
- 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 -62
- package/lib/model/markdown-generation-util/field-declaration-util.js.map +1 -1
- 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 -141
- package/lib/model/markdown-type-file.js.map +1 -1
- 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/class-walker.js.map +1 -1
- package/lib/service/walkers/enum-walker.d.ts +4 -4
- package/lib/service/walkers/enum-walker.js +10 -10
- package/lib/service/walkers/enum-walker.js.map +1 -1
- package/lib/service/walkers/interface-walker.d.ts +4 -4
- package/lib/service/walkers/interface-walker.js +14 -14
- package/lib/service/walkers/interface-walker.js.map +1 -1
- 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 -16
- package/lib/service/walkers/walker.js +16 -9
- package/lib/service/walkers/walker.js.map +1 -1
- package/lib/settings.d.ts +64 -53
- package/lib/settings.js +88 -78
- package/lib/settings.js.map +1 -1
- 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/class-file-generatorHelper.js.map +1 -1
- 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 -10
- package/lib/transpiler/markdown/jekyll/jekyll-docsProcessor.js +50 -27
- package/lib/transpiler/markdown/jekyll/jekyll-docsProcessor.js.map +1 -1
- 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/src/cli/generate.ts +8 -0
- package/src/model/markdown-generation-util/field-declaration-util.ts +3 -9
- package/src/model/markdown-type-file.ts +4 -10
- package/src/service/walkers/class-walker.ts +6 -7
- package/src/service/walkers/enum-walker.ts +0 -1
- package/src/service/walkers/interface-walker.ts +1 -1
- package/src/service/walkers/walker.ts +8 -1
- package/src/settings.ts +21 -0
- package/src/transpiler/markdown/class-file-generatorHelper.ts +2 -2
- package/src/transpiler/markdown/jekyll/jekyll-docsProcessor.ts +26 -3
- package/tsconfig.json +20 -20
- package/tslint.json +5 -5
- package/ROADMAP.md +0 -16
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"markdown-type-file.js","sourceRoot":"","sources":["../../src/model/markdown-type-file.ts"],"names":[],"mappings":";;;AAQA,sEAAkE;AAElE,mDAA+C;AAC/C,yEAAsF;AACtF,kGAAyF;AAEzF,0CAAuC;AAWvC,MAAa,gBAAiB,SAAQ,4BAAY;IAChD,YAAoB,IAAU,EAAU,eAAuB,CAAC,EAAE,aAAsB,EAAU,UAAU,KAAK;QAC/G,KAAK,CACH,GAAG,mBAAQ,CAAC,WAAW,EAAE,CAAC,kBAAkB,EAAE,GAAG,IAAI,CAAC,IAAI,EAAE,EAC5D,oCAAwB,CAAC,iBAAiB,CAAC,IAAI,CAAC,CACjD,CAAC;QAJgB,SAAI,GAAJ,IAAI,CAAM;QAAU,iBAAY,GAAZ,YAAY,CAAY;QAAkC,YAAO,GAAP,OAAO,CAAQ;QAK/G,IAAI,aAAa,EAAE;YACjB,IAAI,CAAC,OAAO,CAAC,aAAa,CAAC,CAAC;SAC7B;QACD,MAAM,MAAM,GAAG,8BAAa,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;QACvC,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IACpB,CAAC;IAEM,iBAAiB,CAAC,UAAgB;QACvC,IAAI,YAAY,CAAC;QACjB,IAAI,IAAI,CAAC,OAAO,EAAE;YAChB,YAAY,GAAG,UAAU,CAAC,IAAI,CAAC;SAChC;aAAM;YACL,qEAAqE;YACrE,mCAAmC;YACnC,IAAI,IAAI,CAAC,OAAO,CAAC,UAAU,CAAC,IAAI,UAAU,CAAC,aAAa,EAAE;gBACxD,YAAY,GAAG,GAAG,UAAU,CAAC,aAAa,IAAI,mBAAQ,CAAC,WAAW,EAAE,CAAC,kBAAkB,EAAE,GAAG,UAAU,CAAC,IAAI,EAAE,CAAC;aAC/G;i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AE,gBAAyB;QAC7D,IAAI,CAAC,YAAY,GAAG,IAAI,CAAC,YAAY,GAAG,CAAC,CAAC;QAC1C,IAAI,CAAC,QAAQ,CAAC,SAAS,EAAE,IAAI,CAAC,YAAY,CAAC,CAAC;QAC5C,IAAI,gBAAgB,EAAE;YACpB,IAAI,CAAC,OAAO,CAAC,gBAAgB,CAAC,CAAC;SAChC;IACH,CAAC;IAEO,QAAQ;QACd,IAAI,CAAC,YAAY,GAAG,IAAI,CAAC,YAAY,GAAG,CAAC,CAAC;IAC5C,CAAC;IAEO,KAAK,CAAC,IAAkB;QAC9B,OAAO,IAAI,CAAC,MAAM,CAAC,CAAC,MAAgB,EAAE,IAAI,EAAE,EAAE;;YAC5C,MAAM,SAAS,GAAW,MAAA,IAAI,CAAC,KAAK,mCAAI,OAAO,CAAC;YAChD,MAAM,KAAK,GAAiB,MAAM,CAAC,SAAS,CAAC,IAAI,EAAE,CAAC;YACpD,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;YACjB,MAAM,CAAC,SAAS,CAAC,GAAG,KAAK,CAAC;YAC1B,OAAO,MAAM,CAAC;QAChB,CAAC,EAAE,EAAE,CAAC,CAAC;IACT,CAAC;CACF;AA3ID,4CA2IC"}
|
|
@@ -1,19 +1,19 @@
|
|
|
1
|
-
import { SchemaObjectArray, SchemaObjectObject } from './open-api-types';
|
|
2
|
-
export type ApexDocHttpResponse = {
|
|
3
|
-
statusCode: number;
|
|
4
|
-
description?: string;
|
|
5
|
-
schema: ApexDocSchemaObject;
|
|
6
|
-
};
|
|
7
|
-
export type ApexDocHttpRequestBody = {
|
|
8
|
-
description?: string;
|
|
9
|
-
schema: ApexDocSchemaObject;
|
|
10
|
-
required?: boolean;
|
|
11
|
-
};
|
|
12
|
-
export type ApexDocParameterObject = {
|
|
13
|
-
name: string;
|
|
14
|
-
in: 'query' | 'header' | 'path' | 'cookie';
|
|
15
|
-
description?: string;
|
|
16
|
-
required?: boolean;
|
|
17
|
-
schema: ApexDocSchemaObject;
|
|
18
|
-
};
|
|
19
|
-
export type ApexDocSchemaObject = SchemaObjectObject | SchemaObjectArray | string;
|
|
1
|
+
import { SchemaObjectArray, SchemaObjectObject } from './open-api-types';
|
|
2
|
+
export type ApexDocHttpResponse = {
|
|
3
|
+
statusCode: number;
|
|
4
|
+
description?: string;
|
|
5
|
+
schema: ApexDocSchemaObject;
|
|
6
|
+
};
|
|
7
|
+
export type ApexDocHttpRequestBody = {
|
|
8
|
+
description?: string;
|
|
9
|
+
schema: ApexDocSchemaObject;
|
|
10
|
+
required?: boolean;
|
|
11
|
+
};
|
|
12
|
+
export type ApexDocParameterObject = {
|
|
13
|
+
name: string;
|
|
14
|
+
in: 'query' | 'header' | 'path' | 'cookie';
|
|
15
|
+
description?: string;
|
|
16
|
+
required?: boolean;
|
|
17
|
+
schema: ApexDocSchemaObject;
|
|
18
|
+
};
|
|
19
|
+
export type ApexDocSchemaObject = SchemaObjectObject | SchemaObjectArray | string;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
// These are types that represent how the data is expected to be created in the ApexDoc (as YAML), which
|
|
3
|
-
// in some cases might be different from the official OpenApi spec for simplicity when writing the ApexDoc.
|
|
4
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
1
|
+
"use strict";
|
|
2
|
+
// These are types that represent how the data is expected to be created in the ApexDoc (as YAML), which
|
|
3
|
+
// in some cases might be different from the official OpenApi spec for simplicity when writing the ApexDoc.
|
|
4
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
5
5
|
//# sourceMappingURL=apex-doc-types.js.map
|
|
@@ -1,93 +1,93 @@
|
|
|
1
|
-
export type InfoObject = {
|
|
2
|
-
title: string;
|
|
3
|
-
version: string;
|
|
4
|
-
};
|
|
5
|
-
export type ServerObject = {
|
|
6
|
-
url: string;
|
|
7
|
-
};
|
|
8
|
-
export type PathsObject = {
|
|
9
|
-
[index: string]: PathItemObject;
|
|
10
|
-
};
|
|
11
|
-
export type PathItemObject = {
|
|
12
|
-
description?: string;
|
|
13
|
-
get?: OperationObject;
|
|
14
|
-
put?: OperationObject;
|
|
15
|
-
post?: OperationObject;
|
|
16
|
-
delete?: OperationObject;
|
|
17
|
-
patch?: OperationObject;
|
|
18
|
-
};
|
|
19
|
-
export type OperationObject = {
|
|
20
|
-
tags?: string[];
|
|
21
|
-
description?: string;
|
|
22
|
-
summary?: string;
|
|
23
|
-
requestBody?: RequestBody;
|
|
24
|
-
parameters?: ParameterObject[];
|
|
25
|
-
responses?: ResponsesObject;
|
|
26
|
-
};
|
|
27
|
-
export type ParameterObject = {
|
|
28
|
-
name: string;
|
|
29
|
-
in: 'query' | 'header' | 'path' | 'cookie';
|
|
30
|
-
description?: string;
|
|
31
|
-
required?: boolean;
|
|
32
|
-
schema?: SchemaObject;
|
|
33
|
-
};
|
|
34
|
-
export type RequestBody = {
|
|
35
|
-
description?: string;
|
|
36
|
-
content: RequestBodyContent;
|
|
37
|
-
required?: boolean;
|
|
38
|
-
};
|
|
39
|
-
export type RequestBodyContent = {
|
|
40
|
-
[index: string]: MediaTypeObject;
|
|
41
|
-
};
|
|
42
|
-
export type MediaTypeObject = {
|
|
43
|
-
schema?: SchemaObject;
|
|
44
|
-
example?: any;
|
|
45
|
-
examples?: {
|
|
46
|
-
[index: string]: ExampleObject;
|
|
47
|
-
};
|
|
48
|
-
};
|
|
49
|
-
export type ExampleObject = {
|
|
50
|
-
summary?: string;
|
|
51
|
-
description?: string;
|
|
52
|
-
value?: any;
|
|
53
|
-
};
|
|
54
|
-
export type ResponsesObject = {
|
|
55
|
-
[index: string]: ResponseObject;
|
|
56
|
-
};
|
|
57
|
-
export type ResponseObject = {
|
|
58
|
-
description: string;
|
|
59
|
-
content?: ContentObject;
|
|
60
|
-
};
|
|
61
|
-
export type ContentObject = {
|
|
62
|
-
[index: string]: {
|
|
63
|
-
schema: SchemaObject;
|
|
64
|
-
};
|
|
65
|
-
};
|
|
66
|
-
export type SchemaObject = SchemaObjectObject | SchemaObjectArray | ReferenceObject;
|
|
67
|
-
export type SchemaObjectObject = {
|
|
68
|
-
type: string;
|
|
69
|
-
properties?: PropertiesObject;
|
|
70
|
-
format?: string;
|
|
71
|
-
description?: string;
|
|
72
|
-
};
|
|
73
|
-
export type PropertiesObject = {
|
|
74
|
-
[index: string]: SchemaObject;
|
|
75
|
-
};
|
|
76
|
-
export type SchemaObjectArray = {
|
|
77
|
-
type: 'array';
|
|
78
|
-
items: SchemaObject;
|
|
79
|
-
description?: string;
|
|
80
|
-
};
|
|
81
|
-
export type ReferenceObject = {
|
|
82
|
-
$ref: string;
|
|
83
|
-
description?: string;
|
|
84
|
-
};
|
|
85
|
-
export type ComponentsObject = {
|
|
86
|
-
schemas: {
|
|
87
|
-
[index: string]: SchemaObject;
|
|
88
|
-
};
|
|
89
|
-
};
|
|
90
|
-
export type TagObject = {
|
|
91
|
-
name: string;
|
|
92
|
-
description?: string;
|
|
93
|
-
};
|
|
1
|
+
export type InfoObject = {
|
|
2
|
+
title: string;
|
|
3
|
+
version: string;
|
|
4
|
+
};
|
|
5
|
+
export type ServerObject = {
|
|
6
|
+
url: string;
|
|
7
|
+
};
|
|
8
|
+
export type PathsObject = {
|
|
9
|
+
[index: string]: PathItemObject;
|
|
10
|
+
};
|
|
11
|
+
export type PathItemObject = {
|
|
12
|
+
description?: string;
|
|
13
|
+
get?: OperationObject;
|
|
14
|
+
put?: OperationObject;
|
|
15
|
+
post?: OperationObject;
|
|
16
|
+
delete?: OperationObject;
|
|
17
|
+
patch?: OperationObject;
|
|
18
|
+
};
|
|
19
|
+
export type OperationObject = {
|
|
20
|
+
tags?: string[];
|
|
21
|
+
description?: string;
|
|
22
|
+
summary?: string;
|
|
23
|
+
requestBody?: RequestBody;
|
|
24
|
+
parameters?: ParameterObject[];
|
|
25
|
+
responses?: ResponsesObject;
|
|
26
|
+
};
|
|
27
|
+
export type ParameterObject = {
|
|
28
|
+
name: string;
|
|
29
|
+
in: 'query' | 'header' | 'path' | 'cookie';
|
|
30
|
+
description?: string;
|
|
31
|
+
required?: boolean;
|
|
32
|
+
schema?: SchemaObject;
|
|
33
|
+
};
|
|
34
|
+
export type RequestBody = {
|
|
35
|
+
description?: string;
|
|
36
|
+
content: RequestBodyContent;
|
|
37
|
+
required?: boolean;
|
|
38
|
+
};
|
|
39
|
+
export type RequestBodyContent = {
|
|
40
|
+
[index: string]: MediaTypeObject;
|
|
41
|
+
};
|
|
42
|
+
export type MediaTypeObject = {
|
|
43
|
+
schema?: SchemaObject;
|
|
44
|
+
example?: any;
|
|
45
|
+
examples?: {
|
|
46
|
+
[index: string]: ExampleObject;
|
|
47
|
+
};
|
|
48
|
+
};
|
|
49
|
+
export type ExampleObject = {
|
|
50
|
+
summary?: string;
|
|
51
|
+
description?: string;
|
|
52
|
+
value?: any;
|
|
53
|
+
};
|
|
54
|
+
export type ResponsesObject = {
|
|
55
|
+
[index: string]: ResponseObject;
|
|
56
|
+
};
|
|
57
|
+
export type ResponseObject = {
|
|
58
|
+
description: string;
|
|
59
|
+
content?: ContentObject;
|
|
60
|
+
};
|
|
61
|
+
export type ContentObject = {
|
|
62
|
+
[index: string]: {
|
|
63
|
+
schema: SchemaObject;
|
|
64
|
+
};
|
|
65
|
+
};
|
|
66
|
+
export type SchemaObject = SchemaObjectObject | SchemaObjectArray | ReferenceObject;
|
|
67
|
+
export type SchemaObjectObject = {
|
|
68
|
+
type: string;
|
|
69
|
+
properties?: PropertiesObject;
|
|
70
|
+
format?: string;
|
|
71
|
+
description?: string;
|
|
72
|
+
};
|
|
73
|
+
export type PropertiesObject = {
|
|
74
|
+
[index: string]: SchemaObject;
|
|
75
|
+
};
|
|
76
|
+
export type SchemaObjectArray = {
|
|
77
|
+
type: 'array';
|
|
78
|
+
items: SchemaObject;
|
|
79
|
+
description?: string;
|
|
80
|
+
};
|
|
81
|
+
export type ReferenceObject = {
|
|
82
|
+
$ref: string;
|
|
83
|
+
description?: string;
|
|
84
|
+
};
|
|
85
|
+
export type ComponentsObject = {
|
|
86
|
+
schemas: {
|
|
87
|
+
[index: string]: SchemaObject;
|
|
88
|
+
};
|
|
89
|
+
};
|
|
90
|
+
export type TagObject = {
|
|
91
|
+
name: string;
|
|
92
|
+
description?: string;
|
|
93
|
+
};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
//# sourceMappingURL=open-api-types.js.map
|
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
import { ComponentsObject, InfoObject, PathsObject, ServerObject, TagObject } from './open-api-types';
|
|
2
|
-
/**
|
|
3
|
-
* Represents the OpenApi 3.1.0 spec
|
|
4
|
-
* https://spec.openapis.org/oas/v3.1.0
|
|
5
|
-
*/
|
|
6
|
-
export declare class OpenApi {
|
|
7
|
-
private namespace?;
|
|
8
|
-
openapi: string;
|
|
9
|
-
info: InfoObject;
|
|
10
|
-
tags: TagObject[];
|
|
11
|
-
paths: PathsObject;
|
|
12
|
-
servers: ServerObject[];
|
|
13
|
-
components?: ComponentsObject;
|
|
14
|
-
constructor(title: string, version: string, namespace?: string | undefined);
|
|
15
|
-
private getServerUrl;
|
|
16
|
-
}
|
|
1
|
+
import { ComponentsObject, InfoObject, PathsObject, ServerObject, TagObject } from './open-api-types';
|
|
2
|
+
/**
|
|
3
|
+
* Represents the OpenApi 3.1.0 spec
|
|
4
|
+
* https://spec.openapis.org/oas/v3.1.0
|
|
5
|
+
*/
|
|
6
|
+
export declare class OpenApi {
|
|
7
|
+
private namespace?;
|
|
8
|
+
openapi: string;
|
|
9
|
+
info: InfoObject;
|
|
10
|
+
tags: TagObject[];
|
|
11
|
+
paths: PathsObject;
|
|
12
|
+
servers: ServerObject[];
|
|
13
|
+
components?: ComponentsObject;
|
|
14
|
+
constructor(title: string, version: string, namespace?: string | undefined);
|
|
15
|
+
private getServerUrl;
|
|
16
|
+
}
|
|
@@ -1,34 +1,34 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.OpenApi = void 0;
|
|
4
|
-
const OPEN_API_VERSION = '3.1.0';
|
|
5
|
-
const SERVER_URL = '/services/apexrest/';
|
|
6
|
-
/**
|
|
7
|
-
* Represents the OpenApi 3.1.0 spec
|
|
8
|
-
* https://spec.openapis.org/oas/v3.1.0
|
|
9
|
-
*/
|
|
10
|
-
class OpenApi {
|
|
11
|
-
constructor(title, version, namespace) {
|
|
12
|
-
this.namespace = namespace;
|
|
13
|
-
this.openapi = OPEN_API_VERSION;
|
|
14
|
-
this.info = {
|
|
15
|
-
title: title,
|
|
16
|
-
version: version,
|
|
17
|
-
};
|
|
18
|
-
this.servers = [
|
|
19
|
-
{
|
|
20
|
-
url: this.getServerUrl(),
|
|
21
|
-
},
|
|
22
|
-
];
|
|
23
|
-
this.paths = {};
|
|
24
|
-
this.tags = [];
|
|
25
|
-
}
|
|
26
|
-
getServerUrl() {
|
|
27
|
-
if (!this.namespace) {
|
|
28
|
-
return SERVER_URL;
|
|
29
|
-
}
|
|
30
|
-
return `${SERVER_URL}${this.namespace}/`;
|
|
31
|
-
}
|
|
32
|
-
}
|
|
33
|
-
exports.OpenApi = OpenApi;
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.OpenApi = void 0;
|
|
4
|
+
const OPEN_API_VERSION = '3.1.0';
|
|
5
|
+
const SERVER_URL = '/services/apexrest/';
|
|
6
|
+
/**
|
|
7
|
+
* Represents the OpenApi 3.1.0 spec
|
|
8
|
+
* https://spec.openapis.org/oas/v3.1.0
|
|
9
|
+
*/
|
|
10
|
+
class OpenApi {
|
|
11
|
+
constructor(title, version, namespace) {
|
|
12
|
+
this.namespace = namespace;
|
|
13
|
+
this.openapi = OPEN_API_VERSION;
|
|
14
|
+
this.info = {
|
|
15
|
+
title: title,
|
|
16
|
+
version: version,
|
|
17
|
+
};
|
|
18
|
+
this.servers = [
|
|
19
|
+
{
|
|
20
|
+
url: this.getServerUrl(),
|
|
21
|
+
},
|
|
22
|
+
];
|
|
23
|
+
this.paths = {};
|
|
24
|
+
this.tags = [];
|
|
25
|
+
}
|
|
26
|
+
getServerUrl() {
|
|
27
|
+
if (!this.namespace) {
|
|
28
|
+
return SERVER_URL;
|
|
29
|
+
}
|
|
30
|
+
return `${SERVER_URL}${this.namespace}/`;
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
exports.OpenApi = OpenApi;
|
|
34
34
|
//# sourceMappingURL=open-api.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { OutputFile } from '../outputFile';
|
|
2
|
-
import { OpenApi } from './open-api';
|
|
3
|
-
export declare class OpenapiTypeFile extends OutputFile {
|
|
4
|
-
openApiModel: OpenApi;
|
|
5
|
-
constructor(openApiModel: OpenApi);
|
|
6
|
-
fileExtension(): string;
|
|
7
|
-
}
|
|
1
|
+
import { OutputFile } from '../outputFile';
|
|
2
|
+
import { OpenApi } from './open-api';
|
|
3
|
+
export declare class OpenapiTypeFile extends OutputFile {
|
|
4
|
+
openApiModel: OpenApi;
|
|
5
|
+
constructor(openApiModel: OpenApi);
|
|
6
|
+
fileExtension(): string;
|
|
7
|
+
}
|
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.OpenapiTypeFile = void 0;
|
|
4
|
-
const outputFile_1 = require("../outputFile");
|
|
5
|
-
const settings_1 = require("../../settings");
|
|
6
|
-
class OpenapiTypeFile extends outputFile_1.OutputFile {
|
|
7
|
-
constructor(openApiModel) {
|
|
8
|
-
super(settings_1.Settings.getInstance().openApiFileName(), '');
|
|
9
|
-
this.openApiModel = openApiModel;
|
|
10
|
-
this.addText(JSON.stringify(Object.assign(Object.assign({}, openApiModel), { namespace: undefined }), null, 2));
|
|
11
|
-
}
|
|
12
|
-
fileExtension() {
|
|
13
|
-
return '.json';
|
|
14
|
-
}
|
|
15
|
-
}
|
|
16
|
-
exports.OpenapiTypeFile = OpenapiTypeFile;
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.OpenapiTypeFile = void 0;
|
|
4
|
+
const outputFile_1 = require("../outputFile");
|
|
5
|
+
const settings_1 = require("../../settings");
|
|
6
|
+
class OpenapiTypeFile extends outputFile_1.OutputFile {
|
|
7
|
+
constructor(openApiModel) {
|
|
8
|
+
super(settings_1.Settings.getInstance().openApiFileName(), '');
|
|
9
|
+
this.openApiModel = openApiModel;
|
|
10
|
+
this.addText(JSON.stringify(Object.assign(Object.assign({}, openApiModel), { namespace: undefined }), null, 2));
|
|
11
|
+
}
|
|
12
|
+
fileExtension() {
|
|
13
|
+
return '.json';
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
exports.OpenapiTypeFile = OpenapiTypeFile;
|
|
17
17
|
//# sourceMappingURL=openapi-type-file.js.map
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
export declare abstract class OutputFile {
|
|
2
|
-
fileName: string;
|
|
3
|
-
dir: string;
|
|
4
|
-
_contents: string;
|
|
5
|
-
constructor(fileName: string, dir: string);
|
|
6
|
-
abstract fileExtension(): string;
|
|
7
|
-
get body(): string;
|
|
8
|
-
addText(text: string, encodeHtml?: boolean): void;
|
|
9
|
-
addBlankLine(): void;
|
|
10
|
-
}
|
|
1
|
+
export declare abstract class OutputFile {
|
|
2
|
+
fileName: string;
|
|
3
|
+
dir: string;
|
|
4
|
+
_contents: string;
|
|
5
|
+
constructor(fileName: string, dir: string);
|
|
6
|
+
abstract fileExtension(): string;
|
|
7
|
+
get body(): string;
|
|
8
|
+
addText(text: string, encodeHtml?: boolean): void;
|
|
9
|
+
addBlankLine(): void;
|
|
10
|
+
}
|
package/lib/model/outputFile.js
CHANGED
|
@@ -1,29 +1,29 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.OutputFile = void 0;
|
|
4
|
-
const xss = require("xss");
|
|
5
|
-
const settings_1 = require("../settings");
|
|
6
|
-
const xssFilter = new xss.FilterXSS({
|
|
7
|
-
whiteList: { br: [], p: [], ul: [], li: [], code: [], pre: [] },
|
|
8
|
-
});
|
|
9
|
-
class OutputFile {
|
|
10
|
-
constructor(fileName, dir) {
|
|
11
|
-
this.fileName = fileName;
|
|
12
|
-
this.dir = dir;
|
|
13
|
-
this._contents = '';
|
|
14
|
-
}
|
|
15
|
-
get body() {
|
|
16
|
-
return this._contents;
|
|
17
|
-
}
|
|
18
|
-
addText(text, encodeHtml = true) {
|
|
19
|
-
const shouldEncode = encodeHtml && settings_1.Settings.getInstance().sanitizeHtml;
|
|
20
|
-
const textToAdd = shouldEncode ? xssFilter.process(text) : text;
|
|
21
|
-
this._contents += textToAdd;
|
|
22
|
-
this.addBlankLine();
|
|
23
|
-
}
|
|
24
|
-
addBlankLine() {
|
|
25
|
-
this._contents += '\n';
|
|
26
|
-
}
|
|
27
|
-
}
|
|
28
|
-
exports.OutputFile = OutputFile;
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.OutputFile = void 0;
|
|
4
|
+
const xss = require("xss");
|
|
5
|
+
const settings_1 = require("../settings");
|
|
6
|
+
const xssFilter = new xss.FilterXSS({
|
|
7
|
+
whiteList: { br: [], p: [], ul: [], li: [], code: [], pre: [] },
|
|
8
|
+
});
|
|
9
|
+
class OutputFile {
|
|
10
|
+
constructor(fileName, dir) {
|
|
11
|
+
this.fileName = fileName;
|
|
12
|
+
this.dir = dir;
|
|
13
|
+
this._contents = '';
|
|
14
|
+
}
|
|
15
|
+
get body() {
|
|
16
|
+
return this._contents;
|
|
17
|
+
}
|
|
18
|
+
addText(text, encodeHtml = true) {
|
|
19
|
+
const shouldEncode = encodeHtml && settings_1.Settings.getInstance().sanitizeHtml;
|
|
20
|
+
const textToAdd = shouldEncode ? xssFilter.process(text) : text;
|
|
21
|
+
this._contents += textToAdd;
|
|
22
|
+
this.addBlankLine();
|
|
23
|
+
}
|
|
24
|
+
addBlankLine() {
|
|
25
|
+
this._contents += '\n';
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
exports.OutputFile = OutputFile;
|
|
29
29
|
//# sourceMappingURL=outputFile.js.map
|
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
import { Type } from '@cparra/apex-reflection';
|
|
2
|
-
export type TypeBundle = {
|
|
3
|
-
type: Type;
|
|
4
|
-
isChild: boolean;
|
|
5
|
-
parentType?: Type;
|
|
6
|
-
};
|
|
7
|
-
export declare class TypesRepository {
|
|
8
|
-
private static instance;
|
|
9
|
-
private scopedTypes;
|
|
10
|
-
private allTypes;
|
|
11
|
-
static getInstance(): TypesRepository;
|
|
12
|
-
populateAll(types: Type[]): void;
|
|
13
|
-
getFromAllByName(typeName: string): TypeBundle | undefined;
|
|
14
|
-
populateScoped(types: Type[]): void;
|
|
15
|
-
getFromScopedByName(typeName: string): Type | undefined;
|
|
16
|
-
}
|
|
1
|
+
import { Type } from '@cparra/apex-reflection';
|
|
2
|
+
export type TypeBundle = {
|
|
3
|
+
type: Type;
|
|
4
|
+
isChild: boolean;
|
|
5
|
+
parentType?: Type;
|
|
6
|
+
};
|
|
7
|
+
export declare class TypesRepository {
|
|
8
|
+
private static instance;
|
|
9
|
+
private scopedTypes;
|
|
10
|
+
private allTypes;
|
|
11
|
+
static getInstance(): TypesRepository;
|
|
12
|
+
populateAll(types: Type[]): void;
|
|
13
|
+
getFromAllByName(typeName: string): TypeBundle | undefined;
|
|
14
|
+
populateScoped(types: Type[]): void;
|
|
15
|
+
getFromScopedByName(typeName: string): Type | undefined;
|
|
16
|
+
}
|
|
@@ -1,54 +1,54 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.TypesRepository = void 0;
|
|
4
|
-
class TypesRepository {
|
|
5
|
-
constructor() {
|
|
6
|
-
this.scopedTypes = [];
|
|
7
|
-
this.allTypes = [];
|
|
8
|
-
}
|
|
9
|
-
static getInstance() {
|
|
10
|
-
if (!TypesRepository.instance) {
|
|
11
|
-
TypesRepository.instance = new TypesRepository();
|
|
12
|
-
}
|
|
13
|
-
return TypesRepository.instance;
|
|
14
|
-
}
|
|
15
|
-
populateAll(types) {
|
|
16
|
-
this.allTypes = types;
|
|
17
|
-
}
|
|
18
|
-
getFromAllByName(typeName) {
|
|
19
|
-
if (typeName.includes('.')) {
|
|
20
|
-
// If it includes a dot we are assuming we are dealing with an inner class.
|
|
21
|
-
const [parentTypeName, childTypeName] = typeName.split('.');
|
|
22
|
-
const parentReference = this.allTypes.find((currentType) => currentType.name.toLowerCase() === parentTypeName.toLowerCase());
|
|
23
|
-
if (!parentReference || parentReference.type_name !== 'class') {
|
|
24
|
-
// If the parent is not found, no reason to keep searching, instead we return undefined.
|
|
25
|
-
// Similarly, if the parent is not a class, it means it cannot have children, so we return early.
|
|
26
|
-
return undefined;
|
|
27
|
-
}
|
|
28
|
-
const parentReferenceAsClass = parentReference;
|
|
29
|
-
const childTypes = [
|
|
30
|
-
...parentReferenceAsClass.classes,
|
|
31
|
-
...parentReferenceAsClass.interfaces,
|
|
32
|
-
...parentReferenceAsClass.enums,
|
|
33
|
-
];
|
|
34
|
-
const foundType = childTypes.find((currentType) => currentType.name.toLowerCase() === childTypeName);
|
|
35
|
-
if (!foundType) {
|
|
36
|
-
return undefined;
|
|
37
|
-
}
|
|
38
|
-
return { type: foundType, isChild: true, parentType: parentReference };
|
|
39
|
-
}
|
|
40
|
-
const foundType = this.allTypes.find((currentType) => currentType.name.toLowerCase() === typeName.toLowerCase());
|
|
41
|
-
if (!foundType) {
|
|
42
|
-
return undefined;
|
|
43
|
-
}
|
|
44
|
-
return { type: foundType, isChild: false };
|
|
45
|
-
}
|
|
46
|
-
populateScoped(types) {
|
|
47
|
-
this.scopedTypes = types;
|
|
48
|
-
}
|
|
49
|
-
getFromScopedByName(typeName) {
|
|
50
|
-
return this.scopedTypes.find((currentType) => currentType.name === typeName);
|
|
51
|
-
}
|
|
52
|
-
}
|
|
53
|
-
exports.TypesRepository = TypesRepository;
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.TypesRepository = void 0;
|
|
4
|
+
class TypesRepository {
|
|
5
|
+
constructor() {
|
|
6
|
+
this.scopedTypes = [];
|
|
7
|
+
this.allTypes = [];
|
|
8
|
+
}
|
|
9
|
+
static getInstance() {
|
|
10
|
+
if (!TypesRepository.instance) {
|
|
11
|
+
TypesRepository.instance = new TypesRepository();
|
|
12
|
+
}
|
|
13
|
+
return TypesRepository.instance;
|
|
14
|
+
}
|
|
15
|
+
populateAll(types) {
|
|
16
|
+
this.allTypes = types;
|
|
17
|
+
}
|
|
18
|
+
getFromAllByName(typeName) {
|
|
19
|
+
if (typeName.includes('.')) {
|
|
20
|
+
// If it includes a dot we are assuming we are dealing with an inner class.
|
|
21
|
+
const [parentTypeName, childTypeName] = typeName.split('.');
|
|
22
|
+
const parentReference = this.allTypes.find((currentType) => currentType.name.toLowerCase() === parentTypeName.toLowerCase());
|
|
23
|
+
if (!parentReference || parentReference.type_name !== 'class') {
|
|
24
|
+
// If the parent is not found, no reason to keep searching, instead we return undefined.
|
|
25
|
+
// Similarly, if the parent is not a class, it means it cannot have children, so we return early.
|
|
26
|
+
return undefined;
|
|
27
|
+
}
|
|
28
|
+
const parentReferenceAsClass = parentReference;
|
|
29
|
+
const childTypes = [
|
|
30
|
+
...parentReferenceAsClass.classes,
|
|
31
|
+
...parentReferenceAsClass.interfaces,
|
|
32
|
+
...parentReferenceAsClass.enums,
|
|
33
|
+
];
|
|
34
|
+
const foundType = childTypes.find((currentType) => currentType.name.toLowerCase() === childTypeName);
|
|
35
|
+
if (!foundType) {
|
|
36
|
+
return undefined;
|
|
37
|
+
}
|
|
38
|
+
return { type: foundType, isChild: true, parentType: parentReference };
|
|
39
|
+
}
|
|
40
|
+
const foundType = this.allTypes.find((currentType) => currentType.name.toLowerCase() === typeName.toLowerCase());
|
|
41
|
+
if (!foundType) {
|
|
42
|
+
return undefined;
|
|
43
|
+
}
|
|
44
|
+
return { type: foundType, isChild: false };
|
|
45
|
+
}
|
|
46
|
+
populateScoped(types) {
|
|
47
|
+
this.scopedTypes = types;
|
|
48
|
+
}
|
|
49
|
+
getFromScopedByName(typeName) {
|
|
50
|
+
return this.scopedTypes.find((currentType) => currentType.name === typeName);
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
exports.TypesRepository = TypesRepository;
|
|
54
54
|
//# sourceMappingURL=types-repository.js.map
|