@cparra/apexdocs 2.24.0 → 2.25.0-alpha.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/.github/workflows/ci.yaml +22 -0
- package/.github/workflows/close_stale.yml +22 -22
- package/.prettierrc.js +7 -7
- package/LICENSE +21 -21
- package/README.md +742 -718
- package/__mocks__/chalk.js +12 -0
- package/__mocks__/log-update.js +6 -0
- package/apexdocs.config.ts +13 -13
- package/docs/{README.md → __old/README.md} +1 -1
- package/docs/{restapi.json → __old/restapi.json} +589 -589
- package/docs/{types → __old/types}/Classes/nspc.ChildClass.md +97 -97
- package/docs/{types → __old/types}/Main/nspc.SampleClass.md +189 -189
- package/eslint.config.mjs +10 -0
- package/examples/force-app/main/default/classes/AnotherInterface.cls +16 -16
- package/examples/force-app/main/default/classes/ChildClass.cls +42 -42
- 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/examples/plain-markdown/.forceignore +12 -0
- package/examples/plain-markdown/config/project-scratch-def.json +5 -0
- package/examples/plain-markdown/docs/Miscellaneous/ns.BaseClass.md +16 -0
- package/examples/plain-markdown/docs/Miscellaneous/ns.ParentInterface.md +15 -0
- package/examples/plain-markdown/docs/Miscellaneous/ns.ReferencedEnum.md +8 -0
- package/examples/plain-markdown/docs/Miscellaneous/ns.SampleException.md +7 -0
- package/examples/plain-markdown/docs/Miscellaneous/ns.SampleInterface.md +115 -0
- package/examples/plain-markdown/docs/Sample-Enums/ns.SampleEnum.md +36 -0
- package/examples/plain-markdown/docs/SampleGroup/ns.SampleClass.md +173 -0
- package/examples/plain-markdown/docs/index.md +36 -0
- package/examples/plain-markdown/force-app/classes/BaseClass.cls +3 -0
- package/examples/plain-markdown/force-app/classes/ParentInterface.cls +3 -0
- package/examples/plain-markdown/force-app/classes/ReferencedEnum.cls +3 -0
- package/examples/plain-markdown/force-app/classes/SampleClass.cls +72 -0
- package/examples/plain-markdown/force-app/classes/SampleEnum.cls +30 -0
- package/examples/plain-markdown/force-app/classes/SampleException.cls +1 -0
- package/examples/plain-markdown/force-app/classes/SampleInterface.cls +46 -0
- package/examples/plain-markdown/package-lock.json +665 -0
- package/examples/plain-markdown/package.json +20 -0
- package/examples/plain-markdown/sfdx-project.json +12 -0
- package/examples/plain-markdown/template.md +3 -0
- package/jest.config.js +9 -5
- package/jest.d.ts +7 -0
- package/lib/__spec__/core/expect-extensions.d.ts +3 -0
- package/lib/__spec__/core/expect-extensions.js +54 -0
- package/lib/__spec__/core/expect-extensions.js.map +1 -0
- package/lib/__spec__/core/generating-class-docs.spec.d.ts +1 -0
- package/lib/__spec__/core/generating-class-docs.spec.js +427 -0
- package/lib/__spec__/core/generating-class-docs.spec.js.map +1 -0
- package/lib/__spec__/core/generating-enum-docs.spec.d.ts +1 -0
- package/lib/__spec__/core/generating-enum-docs.spec.js +303 -0
- package/lib/__spec__/core/generating-enum-docs.spec.js.map +1 -0
- package/lib/__spec__/core/generating-interface-docs.spec.d.ts +1 -0
- package/lib/__spec__/core/generating-interface-docs.spec.js +361 -0
- package/lib/__spec__/core/generating-interface-docs.spec.js.map +1 -0
- package/lib/__spec__/core/generating-reference-guide.spec.d.ts +1 -0
- package/lib/__spec__/core/generating-reference-guide.spec.js +161 -0
- package/lib/__spec__/core/generating-reference-guide.spec.js.map +1 -0
- package/lib/adapters/apex-types.d.ts +7 -0
- package/lib/adapters/apex-types.js +112 -0
- package/lib/adapters/apex-types.js.map +1 -0
- package/lib/adapters/documentables.d.ts +7 -0
- package/lib/adapters/documentables.js +56 -0
- package/lib/adapters/documentables.js.map +1 -0
- package/lib/adapters/fields-and-properties.d.ts +4 -0
- package/lib/adapters/fields-and-properties.js +32 -0
- package/lib/adapters/fields-and-properties.js.map +1 -0
- package/lib/adapters/methods-and-constructors.d.ts +5 -0
- package/lib/adapters/methods-and-constructors.js +92 -0
- package/lib/adapters/methods-and-constructors.js.map +1 -0
- package/lib/adapters/references.d.ts +5 -0
- package/lib/adapters/references.js +82 -0
- package/lib/adapters/references.js.map +1 -0
- package/lib/adapters/type-utils.d.ts +2 -0
- package/lib/adapters/type-utils.js +7 -0
- package/lib/adapters/type-utils.js.map +1 -0
- package/lib/application/Apexdocs.d.ts +13 -13
- package/lib/application/Apexdocs.js +79 -76
- package/lib/application/Apexdocs.js.map +1 -1
- package/lib/cli/generate.d.ts +2 -2
- package/lib/cli/generate.js +156 -130
- package/lib/cli/generate.js.map +1 -1
- package/lib/core/generate-docs.d.ts +23 -0
- package/lib/core/generate-docs.js +241 -0
- package/lib/core/generate-docs.js.map +1 -0
- package/lib/core/template.d.ts +10 -0
- package/lib/core/template.js +92 -0
- package/lib/core/template.js.map +1 -0
- package/lib/core/templates/reference-guide.d.ts +1 -0
- package/lib/core/templates/reference-guide.js +18 -0
- package/lib/core/templates/reference-guide.js.map +1 -0
- package/lib/index.d.ts +2 -1
- package/lib/index.js +28 -17
- package/lib/index.js.map +1 -1
- 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.d.ts +22 -22
- package/lib/model/manifest.js +52 -46
- package/lib/model/manifest.js.map +1 -1
- package/lib/model/markdown-file.d.ts +16 -16
- package/lib/model/markdown-file.js +110 -106
- package/lib/model/markdown-file.js.map +1 -1
- 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 +45 -43
- package/lib/model/markdown-generation-util/doc-comment-annotation-util.js.map +1 -1
- package/lib/model/markdown-generation-util/field-declaration-util.d.ts +3 -3
- package/lib/model/markdown-generation-util/field-declaration-util.js +53 -54
- 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 +113 -114
- package/lib/model/markdown-generation-util/method-declaration-util.js.map +1 -1
- package/lib/model/markdown-generation-util/type-declaration-util.d.ts +3 -3
- package/lib/model/markdown-generation-util/type-declaration-util.js +80 -81
- package/lib/model/markdown-generation-util/type-declaration-util.js.map +1 -1
- package/lib/model/markdown-home-file.d.ts +11 -11
- package/lib/model/markdown-home-file.js +56 -53
- package/lib/model/markdown-home-file.js.map +1 -1
- package/lib/model/markdown-type-file.d.ts +26 -26
- package/lib/model/markdown-type-file.js +136 -133
- 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/open-api.js.map +1 -1
- 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 +21 -28
- package/lib/model/outputFile.js.map +1 -1
- package/lib/model/types-repository.d.ts +16 -16
- package/lib/model/types-repository.js +53 -53
- package/lib/model/types-repository.js.map +1 -1
- package/lib/service/apex-file-reader.d.ts +14 -14
- package/lib/service/apex-file-reader.js +48 -45
- package/lib/service/apex-file-reader.js.map +1 -1
- package/lib/service/file-system.d.ts +14 -14
- package/lib/service/file-system.js +47 -24
- package/lib/service/file-system.js.map +1 -1
- package/lib/service/file-writer.d.ts +6 -6
- package/lib/service/file-writer.js +56 -33
- package/lib/service/file-writer.js.map +1 -1
- package/lib/service/manifest-factory.d.ts +10 -10
- package/lib/service/manifest-factory.js +15 -13
- package/lib/service/manifest-factory.js.map +1 -1
- package/lib/service/metadata-processor.d.ts +3 -3
- package/lib/service/metadata-processor.js +16 -16
- package/lib/service/metadata-processor.js.map +1 -1
- package/lib/service/parser.d.ts +21 -21
- package/lib/service/parser.js +137 -134
- package/lib/service/parser.js.map +1 -1
- package/lib/service/state.d.ts +9 -9
- package/lib/service/state.js +19 -19
- package/lib/service/state.js.map +1 -1
- 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/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-factory.js.map +1 -1
- package/lib/service/walkers/walker.d.ts +19 -19
- package/lib/service/walkers/walker.js +16 -16
- package/lib/service/walkers/walker.js.map +1 -1
- package/lib/settings.d.ts +64 -64
- package/lib/settings.js +88 -88
- 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/InterfaceMirrorBuilder.d.ts +16 -0
- package/lib/test-helpers/InterfaceMirrorBuilder.js +43 -0
- package/lib/test-helpers/InterfaceMirrorBuilder.js.map +1 -0
- package/lib/test-helpers/MethodMirrorBuilder.d.ts +29 -10
- package/lib/test-helpers/MethodMirrorBuilder.js +71 -36
- package/lib/test-helpers/MethodMirrorBuilder.js.map +1 -1
- 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 +34 -31
- package/lib/transpiler/factory.js.map +1 -1
- 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 +11 -8
- package/lib/transpiler/markdown/class-file-generatorHelper.js +74 -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 -11
- package/lib/transpiler/markdown/jekyll/jekyll-docsProcessor.js +50 -50
- 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 +26 -23
- package/lib/transpiler/markdown/markdown-transpiler-base.js.map +1 -1
- package/lib/transpiler/markdown/plain-markdown/class-template.d.ts +1 -0
- package/lib/transpiler/markdown/plain-markdown/class-template.js +77 -0
- package/lib/transpiler/markdown/plain-markdown/class-template.js.map +1 -0
- package/lib/transpiler/markdown/plain-markdown/constructors-partial-template.d.ts +1 -0
- package/lib/transpiler/markdown/plain-markdown/constructors-partial-template.js +36 -0
- package/lib/transpiler/markdown/plain-markdown/constructors-partial-template.js.map +1 -0
- package/lib/transpiler/markdown/plain-markdown/documentable-partial-template.d.ts +1 -0
- package/lib/transpiler/markdown/plain-markdown/documentable-partial-template.js +28 -0
- package/lib/transpiler/markdown/plain-markdown/documentable-partial-template.js.map +1 -0
- package/lib/transpiler/markdown/plain-markdown/enum-template.d.ts +1 -0
- package/lib/transpiler/markdown/plain-markdown/enum-template.js +16 -0
- package/lib/transpiler/markdown/plain-markdown/enum-template.js.map +1 -0
- package/lib/transpiler/markdown/plain-markdown/fieldsPartialTemplate.d.ts +1 -0
- package/lib/transpiler/markdown/plain-markdown/fieldsPartialTemplate.js +27 -0
- package/lib/transpiler/markdown/plain-markdown/fieldsPartialTemplate.js.map +1 -0
- package/lib/transpiler/markdown/plain-markdown/grouped-members-partial-template.d.ts +1 -0
- package/lib/transpiler/markdown/plain-markdown/grouped-members-partial-template.js +10 -0
- package/lib/transpiler/markdown/plain-markdown/grouped-members-partial-template.js.map +1 -0
- package/lib/transpiler/markdown/plain-markdown/interface-template.d.ts +1 -0
- package/lib/transpiler/markdown/plain-markdown/interface-template.js +20 -0
- package/lib/transpiler/markdown/plain-markdown/interface-template.js.map +1 -0
- package/lib/transpiler/markdown/plain-markdown/methods-partial-template.d.ts +1 -0
- package/lib/transpiler/markdown/plain-markdown/methods-partial-template.js +47 -0
- package/lib/transpiler/markdown/plain-markdown/methods-partial-template.js.map +1 -0
- package/lib/transpiler/markdown/plain-markdown/plain-docsProcessor.d.ts +9 -6
- package/lib/transpiler/markdown/plain-markdown/plain-docsProcessor.js +41 -13
- package/lib/transpiler/markdown/plain-markdown/plain-docsProcessor.js.map +1 -1
- package/lib/transpiler/markdown/plain-markdown/type-doc-partial.d.ts +1 -0
- package/lib/transpiler/markdown/plain-markdown/type-doc-partial.js +31 -0
- package/lib/transpiler/markdown/plain-markdown/type-doc-partial.js.map +1 -0
- package/lib/transpiler/openapi/open-api-docs-processor.d.ts +13 -13
- package/lib/transpiler/openapi/open-api-docs-processor.js +77 -74
- package/lib/transpiler/openapi/open-api-docs-processor.js.map +1 -1
- package/lib/transpiler/openapi/parsers/Builder.d.ts +16 -16
- package/lib/transpiler/openapi/parsers/Builder.js +29 -29
- package/lib/transpiler/openapi/parsers/Builder.js.map +1 -1
- package/lib/transpiler/openapi/parsers/MethodParser.d.ts +20 -20
- package/lib/transpiler/openapi/parsers/MethodParser.js +189 -166
- package/lib/transpiler/openapi/parsers/MethodParser.js.map +1 -1
- 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 +249 -225
- package/lib/transpiler/openapi/parsers/ReferenceBuilder.js.map +1 -1
- 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/openapi/parsers/ResponsesBuilder.js.map +1 -1
- 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 +29 -26
- package/lib/transpiler/transpiler.js.map +1 -1
- package/lib/util/error-logger.d.ts +8 -8
- package/lib/util/error-logger.js +89 -89
- package/lib/util/error-logger.js.map +1 -1
- package/lib/util/logger.d.ts +21 -21
- package/lib/util/logger.js +60 -57
- package/lib/util/logger.js.map +1 -1
- package/lib/util/string-utils.d.ts +2 -2
- package/lib/util/string-utils.js +14 -14
- package/lib/util/string-utils.js.map +1 -1
- package/package.json +79 -78
- package/src/__spec__/core/expect-extensions.ts +32 -0
- package/src/__spec__/core/generating-class-docs.spec.ts +511 -0
- package/src/__spec__/core/generating-enum-docs.spec.ts +355 -0
- package/src/__spec__/core/generating-interface-docs.spec.ts +431 -0
- package/src/__spec__/core/generating-reference-guide.spec.ts +163 -0
- package/src/adapters/__tests__/interface-adapter.spec.ts +80 -0
- package/src/adapters/__tests__/references.spec.ts +115 -0
- package/src/adapters/apex-types.ts +224 -0
- package/src/adapters/documentables.ts +93 -0
- package/src/adapters/fields-and-properties.ts +38 -0
- package/src/adapters/methods-and-constructors.ts +117 -0
- package/src/adapters/references.ts +113 -0
- package/src/adapters/type-utils.ts +5 -0
- package/src/adapters/types.d.ts +8 -0
- package/src/cli/generate.ts +96 -93
- package/src/core/generate-docs.ts +357 -0
- package/src/core/renderable/types.d.ts +131 -0
- package/src/core/template.ts +108 -0
- package/src/core/templates/reference-guide.ts +14 -0
- package/src/index.ts +3 -1
- package/src/model/__tests__/manifest.spec.ts +1 -0
- package/src/model/manifest.ts +15 -5
- package/src/model/markdown-file.ts +6 -5
- package/src/model/markdown-generation-util/doc-comment-annotation-util.ts +1 -1
- package/src/model/markdown-generation-util/method-declaration-util.ts +1 -1
- package/src/model/openapi/open-api-types.ts +2 -2
- package/src/model/outputFile.ts +2 -11
- package/src/service/__tests__/apex-file-reader.spec.ts +4 -4
- package/src/service/__tests__/manifest-factory.spec.ts +1 -2
- package/src/service/parser.ts +1 -1
- package/src/test-helpers/FieldMirrorBuilder.ts +1 -1
- package/src/test-helpers/InterfaceMirrorBuilder.ts +44 -0
- package/src/test-helpers/MethodMirrorBuilder.ts +46 -6
- package/src/transpiler/markdown/class-file-generatorHelper.ts +22 -2
- package/src/transpiler/markdown/plain-markdown/class-template.ts +73 -0
- package/src/transpiler/markdown/plain-markdown/constructors-partial-template.ts +32 -0
- package/src/transpiler/markdown/plain-markdown/documentable-partial-template.ts +24 -0
- package/src/transpiler/markdown/plain-markdown/enum-template.ts +12 -0
- package/src/transpiler/markdown/plain-markdown/fieldsPartialTemplate.ts +23 -0
- package/src/transpiler/markdown/plain-markdown/grouped-members-partial-template.ts +6 -0
- package/src/transpiler/markdown/plain-markdown/interface-template.ts +16 -0
- package/src/transpiler/markdown/plain-markdown/methods-partial-template.ts +43 -0
- package/src/transpiler/markdown/plain-markdown/plain-docsProcessor.ts +30 -0
- package/src/transpiler/markdown/plain-markdown/type-doc-partial.ts +27 -0
- package/src/transpiler/openapi/parsers/Builder.ts +1 -1
- package/src/transpiler/openapi/parsers/MethodParser.ts +1 -1
- package/src/transpiler/openapi/parsers/ReferenceBuilder.ts +4 -3
- package/src/util/error-logger.ts +4 -4
- package/src/util/logger.ts +3 -3
- package/tsconfig.json +21 -20
- package/tslint.json +5 -5
- package/.eslintrc.js +0 -12
- package/lib/model/manifest-diff.d.ts +0 -27
- package/lib/model/manifest-diff.js +0 -69
- package/lib/model/manifest-diff.js.map +0 -1
- package/src/model/__tests__/manifest-diff.spec.ts +0 -139
- package/src/model/manifest-diff.ts +0 -94
- /package/docs/{index.html → __old/index.html} +0 -0
- /package/docs/{types → __old/types}/Classes/nspc.AnotherInterface.md +0 -0
- /package/docs/{types → __old/types}/Main/nspc.GroupedClass.md +0 -0
- /package/docs/{types → __old/types}/Misc-Group/nspc.EscapedAnnotations.md +0 -0
- /package/docs/{types → __old/types}/Misc-Group/nspc.GrandparentClass.md +0 -0
- /package/docs/{types → __old/types}/Misc-Group/nspc.InterfaceWithInheritance.md +0 -0
- /package/docs/{types → __old/types}/Misc-Group/nspc.MemberGrouping.md +0 -0
- /package/docs/{types → __old/types}/Misc-Group/nspc.ParentClass.md +0 -0
- /package/docs/{types → __old/types}/Misc-Group/nspc.Reference1.md +0 -0
- /package/docs/{types → __old/types}/Misc-Group/nspc.Reference2.md +0 -0
- /package/docs/{types → __old/types}/Misc-Group/nspc.Reference3.md +0 -0
- /package/docs/{types → __old/types}/Misc-Group/nspc.Reference4.md +0 -0
- /package/docs/{types → __old/types}/Misc-Group/nspc.Reference5.md +0 -0
- /package/docs/{types → __old/types}/Misc-Group/nspc.Reference6.md +0 -0
- /package/docs/{types → __old/types}/Misc-Group/nspc.Reference7.md +0 -0
- /package/docs/{types → __old/types}/Misc-Group/nspc.SampleClassWithoutModifier.md +0 -0
- /package/docs/{types → __old/types}/Misc-Group/nspc.SampleRestResource.md +0 -0
- /package/docs/{types → __old/types}/Misc-Group/nspc.SampleRestResourceWithInnerClass.md +0 -0
- /package/docs/{types → __old/types}/Misc-Group/nspc.SampleRestResourceWithoutApexDocs.md +0 -0
- /package/docs/{types → __old/types}/README.md +0 -0
- /package/docs/{types → __old/types}/Sample-Interfaces/nspc.SampleInterface.md +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"open-api-docs-processor.js","sourceRoot":"","sources":["../../../src/transpiler/openapi/open-api-docs-processor.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"open-api-docs-processor.js","sourceRoot":"","sources":["../../../src/transpiler/openapi/open-api-docs-processor.ts"],"names":[],"mappings":";;;;;;AAAA,6FAAmE;AACnE,sDAAkD;AAElD,6EAAwE;AACxE,8CAA2C;AAC3C,2DAAuD;AACvD,6CAA0C;AAC1C,yDAAsD;AACtD,0DAAsD;AAEtD,MAAa,oBAAqB,SAAQ,mCAAuB;IAI/D;QACE,KAAK,EAAE,CAAC;QAsDV,mBAAc,GAA0C,GAAG,EAAE;YAC3D,IAAI,CAAC,cAAc,CAAC,QAAQ,CAAC,IAAI,mCAAe,CAAC,IAAI,CAAC,YAAY,CAAC,CAAC,CAAC;QACvE,CAAC,CAAC;QAvDA,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,CAAC;YACX,MAAM,KAAK,CAAC,gCAAgC,CAAC,CAAC;QAChD,CAAC;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,CAAC;YAClB,OAAO;QACT,CAAC;QAED,IAAI,CAAC,YAAY,CAAC,KAAK,CAAC,YAAY,CAAC,GAAG,EAAE,CAAC;QAC3C,IAAI,MAAA,IAAI,CAA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AsB,uBAAtB,sBAAsB,CAAE,aAAa,0CAAE,IAAI,CAC5D,CAAC,OAAO,EAAE,EAAE,CAAC,OAAO,CAAC,GAAG,CAAC,WAAW,EAAE,KAAK,YAAY,CACxD,CAAC;QACF,IAAI,CAAC,UAAU,EAAE,CAAC;YAChB,eAAM,CAAC,KAAK,CAAC,+CAA+C,IAAI,CAAC,IAAI,EAAE,CAAC,CAAC;YACzE,OAAO,IAAI,CAAC;QACd,CAAC;QAED,IAAI,YAAY,GAAG,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;QAClG,IAAI,YAAY,CAAC,UAAU,CAAC,GAAG,CAAC,EAAE,CAAC;YACjC,YAAY,GAAG,YAAY,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC;QAC3C,CAAC;QACD,OAAO,YAAY,CAAC;IACtB,CAAC;CACF;AA/ED,oDA+EC"}
|
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
import { Reference } from './ReferenceBuilder';
|
|
2
|
-
import { ApexDocSchemaObject } from '../../../model/openapi/apex-doc-types';
|
|
3
|
-
import { SchemaObject } from '../../../model/openapi/open-api-types';
|
|
4
|
-
export type ApexDocSchemaAware = {
|
|
5
|
-
schema: ApexDocSchemaObject;
|
|
6
|
-
};
|
|
7
|
-
export declare abstract class Builder<T, K> {
|
|
8
|
-
build(schemaAware: ApexDocSchemaAware): Response<T>;
|
|
9
|
-
abstract buildBody(apexDocObject: K, reference?: Reference): T;
|
|
10
|
-
protected getOpenApiSchemaFromApexDocSchema(schemaAware: ApexDocSchemaAware, reference?: Reference): SchemaObject;
|
|
11
|
-
private isReferenceString;
|
|
12
|
-
}
|
|
13
|
-
export interface Response<T> {
|
|
14
|
-
reference?: Reference;
|
|
15
|
-
body: T;
|
|
16
|
-
}
|
|
1
|
+
import { Reference } from './ReferenceBuilder';
|
|
2
|
+
import { ApexDocSchemaObject } from '../../../model/openapi/apex-doc-types';
|
|
3
|
+
import { SchemaObject } from '../../../model/openapi/open-api-types';
|
|
4
|
+
export type ApexDocSchemaAware = {
|
|
5
|
+
schema: ApexDocSchemaObject;
|
|
6
|
+
};
|
|
7
|
+
export declare abstract class Builder<T, K> {
|
|
8
|
+
build(schemaAware: ApexDocSchemaAware): Response<T>;
|
|
9
|
+
abstract buildBody(apexDocObject: K, reference?: Reference): T;
|
|
10
|
+
protected getOpenApiSchemaFromApexDocSchema(schemaAware: ApexDocSchemaAware, reference?: Reference): SchemaObject;
|
|
11
|
+
private isReferenceString;
|
|
12
|
+
}
|
|
13
|
+
export interface Response<T> {
|
|
14
|
+
reference?: Reference;
|
|
15
|
+
body: T;
|
|
16
|
+
}
|
|
@@ -1,30 +1,30 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.Builder = void 0;
|
|
4
|
-
const ReferenceBuilder_1 = require("./ReferenceBuilder");
|
|
5
|
-
class Builder {
|
|
6
|
-
constructor() {
|
|
7
|
-
this.isReferenceString = (targetObject) => {
|
|
8
|
-
return typeof targetObject === 'string' || targetObject instanceof String;
|
|
9
|
-
};
|
|
10
|
-
}
|
|
11
|
-
build(schemaAware) {
|
|
12
|
-
let reference;
|
|
13
|
-
if (this.isReferenceString(schemaAware.schema)) {
|
|
14
|
-
reference = new ReferenceBuilder_1.ReferenceBuilder().build(schemaAware.schema);
|
|
15
|
-
}
|
|
16
|
-
return {
|
|
17
|
-
reference: reference,
|
|
18
|
-
body: this.buildBody(schemaAware, reference),
|
|
19
|
-
};
|
|
20
|
-
}
|
|
21
|
-
getOpenApiSchemaFromApexDocSchema(schemaAware, reference) {
|
|
22
|
-
if (this.isReferenceString(schemaAware.schema)) {
|
|
23
|
-
// We are dealing with a reference
|
|
24
|
-
return reference.entrypointReferenceObject;
|
|
25
|
-
}
|
|
26
|
-
return schemaAware.schema;
|
|
27
|
-
}
|
|
28
|
-
}
|
|
29
|
-
exports.Builder = Builder;
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.Builder = void 0;
|
|
4
|
+
const ReferenceBuilder_1 = require("./ReferenceBuilder");
|
|
5
|
+
class Builder {
|
|
6
|
+
constructor() {
|
|
7
|
+
this.isReferenceString = (targetObject) => {
|
|
8
|
+
return typeof targetObject === 'string' || targetObject instanceof String;
|
|
9
|
+
};
|
|
10
|
+
}
|
|
11
|
+
build(schemaAware) {
|
|
12
|
+
let reference;
|
|
13
|
+
if (this.isReferenceString(schemaAware.schema)) {
|
|
14
|
+
reference = new ReferenceBuilder_1.ReferenceBuilder().build(schemaAware.schema);
|
|
15
|
+
}
|
|
16
|
+
return {
|
|
17
|
+
reference: reference,
|
|
18
|
+
body: this.buildBody(schemaAware, reference),
|
|
19
|
+
};
|
|
20
|
+
}
|
|
21
|
+
getOpenApiSchemaFromApexDocSchema(schemaAware, reference) {
|
|
22
|
+
if (this.isReferenceString(schemaAware.schema)) {
|
|
23
|
+
// We are dealing with a reference
|
|
24
|
+
return reference.entrypointReferenceObject;
|
|
25
|
+
}
|
|
26
|
+
return schemaAware.schema;
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
exports.Builder = Builder;
|
|
30
30
|
//# sourceMappingURL=Builder.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Builder.js","sourceRoot":"","sources":["../../../../src/transpiler/openapi/parsers/Builder.ts"],"names":[],"mappings":";;;AAAA,yDAAiE;AAQjE,MAAsB,OAAO;IAA7B;QAuBU,sBAAiB,GAAG,CAAC,
|
|
1
|
+
{"version":3,"file":"Builder.js","sourceRoot":"","sources":["../../../../src/transpiler/openapi/parsers/Builder.ts"],"names":[],"mappings":";;;AAAA,yDAAiE;AAQjE,MAAsB,OAAO;IAA7B;QAuBU,sBAAiB,GAAG,CAAC,YAAqB,EAA0B,EAAE;YAC5E,OAAO,OAAO,YAAY,KAAK,QAAQ,IAAI,YAAY,YAAY,MAAM,CAAC;QAC5E,CAAC,CAAC;IACJ,CAAC;IAzBC,KAAK,CAAC,WAA+B;QACnC,IAAI,SAAgC,CAAC;QACrC,IAAI,IAAI,CAAC,iBAAiB,CAAC,WAAW,CAAC,MAAM,CAAC,EAAE,CAAC;YAC/C,SAAS,GAAG,IAAI,mCAAgB,EAAE,CAAC,KAAK,CAAC,WAAW,CAAC,MAAM,CAAC,CAAC;QAC/D,CAAC;QAED,OAAO;YACL,SAAS,EAAE,SAAS;YACpB,IAAI,EAAE,IAAI,CAAC,SAAS,CAAC,WAAgB,EAAE,SAAS,CAAC;SAClD,CAAC;IACJ,CAAC;IAIS,iCAAiC,CAAC,WAA+B,EAAE,SAAqB;QAChG,IAAI,IAAI,CAAC,iBAAiB,CAAC,WAAW,CAAC,MAAM,CAAC,EAAE,CAAC;YAC/C,kCAAkC;YAClC,OAAO,SAAU,CAAC,yBAAyB,CAAC;QAC9C,CAAC;QACD,OAAO,WAAW,CAAC,MAAM,CAAC;IAC5B,CAAC;CAKF;AA1BD,0BA0BC"}
|
|
@@ -1,20 +1,20 @@
|
|
|
1
|
-
import { ClassMirror } from '@cparra/apex-reflection';
|
|
2
|
-
import { OpenApi } from '../../../model/openapi/open-api';
|
|
3
|
-
type HttpOperations = 'get' | 'put' | 'post' | 'delete' | 'patch';
|
|
4
|
-
/**
|
|
5
|
-
* Parses ApexDocs with HTTP REST annotations and turns them into an OpenApi specification.
|
|
6
|
-
*/
|
|
7
|
-
export declare class MethodParser {
|
|
8
|
-
openApiModel: OpenApi;
|
|
9
|
-
constructor(openApiModel: OpenApi);
|
|
10
|
-
parseMethod(classMirror: ClassMirror, httpUrlEndpoint: string, httpMethodKey: HttpOperations, tag: string): void;
|
|
11
|
-
private parseHttpAnnotation;
|
|
12
|
-
private addToOpenApiStrategy;
|
|
13
|
-
private addRequestBodyToOpenApi;
|
|
14
|
-
private addParametersToOpenApi;
|
|
15
|
-
private addHttpResponsesToOpenApi;
|
|
16
|
-
private fallbackHttpRequestBodyParser;
|
|
17
|
-
private getFallbackHttpResponseParser;
|
|
18
|
-
private addReference;
|
|
19
|
-
}
|
|
20
|
-
export {};
|
|
1
|
+
import { ClassMirror } from '@cparra/apex-reflection';
|
|
2
|
+
import { OpenApi } from '../../../model/openapi/open-api';
|
|
3
|
+
type HttpOperations = 'get' | 'put' | 'post' | 'delete' | 'patch';
|
|
4
|
+
/**
|
|
5
|
+
* Parses ApexDocs with HTTP REST annotations and turns them into an OpenApi specification.
|
|
6
|
+
*/
|
|
7
|
+
export declare class MethodParser {
|
|
8
|
+
openApiModel: OpenApi;
|
|
9
|
+
constructor(openApiModel: OpenApi);
|
|
10
|
+
parseMethod(classMirror: ClassMirror, httpUrlEndpoint: string, httpMethodKey: HttpOperations, tag: string): void;
|
|
11
|
+
private parseHttpAnnotation;
|
|
12
|
+
private addToOpenApiStrategy;
|
|
13
|
+
private addRequestBodyToOpenApi;
|
|
14
|
+
private addParametersToOpenApi;
|
|
15
|
+
private addHttpResponsesToOpenApi;
|
|
16
|
+
private fallbackHttpRequestBodyParser;
|
|
17
|
+
private getFallbackHttpResponseParser;
|
|
18
|
+
private addReference;
|
|
19
|
+
}
|
|
20
|
+
export {};
|
|
@@ -1,167 +1,190 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
this.
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
this
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
}
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
}
|
|
166
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
19
|
+
if (mod && mod.__esModule) return mod;
|
|
20
|
+
var result = {};
|
|
21
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
+
__setModuleDefault(result, mod);
|
|
23
|
+
return result;
|
|
24
|
+
};
|
|
25
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
|
+
exports.MethodParser = void 0;
|
|
27
|
+
const yaml = __importStar(require("js-yaml"));
|
|
28
|
+
const ClassMirrorWrapper_1 = require("../../../model/apex-type-wrappers/ClassMirrorWrapper");
|
|
29
|
+
const ReferenceBuilder_1 = require("./ReferenceBuilder");
|
|
30
|
+
const ParameterObjectBuilder_1 = require("./ParameterObjectBuilder");
|
|
31
|
+
const ResponsesBuilder_1 = require("./ResponsesBuilder");
|
|
32
|
+
const RequestBodyBuilder_1 = require("./RequestBodyBuilder");
|
|
33
|
+
const MethodMirrorWrapper_1 = require("../../../model/apex-type-wrappers/MethodMirrorWrapper");
|
|
34
|
+
/**
|
|
35
|
+
* Parses ApexDocs with HTTP REST annotations and turns them into an OpenApi specification.
|
|
36
|
+
*/
|
|
37
|
+
class MethodParser {
|
|
38
|
+
constructor(openApiModel) {
|
|
39
|
+
this.openApiModel = openApiModel;
|
|
40
|
+
}
|
|
41
|
+
parseMethod(classMirror, httpUrlEndpoint, httpMethodKey, tag) {
|
|
42
|
+
var _a, _b;
|
|
43
|
+
const classMirrorWrapper = new ClassMirrorWrapper_1.ClassMirrorWrapper(classMirror);
|
|
44
|
+
// Apex supports HttpGet, HttpPut, HttpPost, HttpDelete, and HttpPatch, so we search for a method
|
|
45
|
+
// that has one of those annotations.
|
|
46
|
+
const httpMethods = classMirrorWrapper.getMethodsByAnnotation(`http${httpMethodKey}`);
|
|
47
|
+
if (!httpMethods.length) {
|
|
48
|
+
return;
|
|
49
|
+
}
|
|
50
|
+
// We can assume there is at most one method per annotation, as this is an Apex rule.
|
|
51
|
+
const httpMethod = httpMethods[0];
|
|
52
|
+
this.openApiModel.paths[httpUrlEndpoint][httpMethodKey] = {};
|
|
53
|
+
this.openApiModel.paths[httpUrlEndpoint][httpMethodKey].tags = [tag];
|
|
54
|
+
if ((_a = httpMethod.docComment) === null || _a === void 0 ? void 0 : _a.description) {
|
|
55
|
+
this.openApiModel.paths[httpUrlEndpoint][httpMethodKey].description = httpMethod.docComment.description;
|
|
56
|
+
}
|
|
57
|
+
const methodMirrorWrapper = new MethodMirrorWrapper_1.MethodMirrorWrapper(httpMethod);
|
|
58
|
+
if (methodMirrorWrapper.hasDocCommentAnnotation('summary')) {
|
|
59
|
+
this.openApiModel.paths[httpUrlEndpoint][httpMethodKey].summary =
|
|
60
|
+
(_b = methodMirrorWrapper.getDocCommentAnnotation('summary')) === null || _b === void 0 ? void 0 : _b.body;
|
|
61
|
+
}
|
|
62
|
+
this.parseHttpAnnotation(httpMethod, httpUrlEndpoint, httpMethodKey, 'http-request-body', this.addRequestBodyToOpenApi.bind(this), this.fallbackHttpRequestBodyParser(httpUrlEndpoint, httpMethodKey));
|
|
63
|
+
this.parseHttpAnnotation(httpMethod, httpUrlEndpoint, httpMethodKey, 'http-parameter', this.addParametersToOpenApi.bind(this));
|
|
64
|
+
this.parseHttpAnnotation(httpMethod, httpUrlEndpoint, httpMethodKey, 'http-response', this.addHttpResponsesToOpenApi.bind(this), this.getFallbackHttpResponseParser(httpUrlEndpoint, httpMethodKey));
|
|
65
|
+
}
|
|
66
|
+
parseHttpAnnotation(httpMethod, urlValue, httpMethodKey, annotationName, addToOpenApi, fallbackParser) {
|
|
67
|
+
var _a;
|
|
68
|
+
const annotations = (_a = httpMethod.docComment) === null || _a === void 0 ? void 0 : _a.annotations.filter((annotation) => annotation.name === annotationName);
|
|
69
|
+
if (!(annotations === null || annotations === void 0 ? void 0 : annotations.length)) {
|
|
70
|
+
if (fallbackParser) {
|
|
71
|
+
fallbackParser(httpMethod);
|
|
72
|
+
}
|
|
73
|
+
return;
|
|
74
|
+
}
|
|
75
|
+
for (const annotation of annotations) {
|
|
76
|
+
// We expect the ApexDoc data representing this to be in YAML format.
|
|
77
|
+
const inYaml = annotation === null || annotation === void 0 ? void 0 : annotation.bodyLines.reduce((prev, current) => prev + '\n' + current);
|
|
78
|
+
if (!inYaml) {
|
|
79
|
+
return;
|
|
80
|
+
}
|
|
81
|
+
this.addToOpenApiStrategy(inYaml, urlValue, httpMethodKey, addToOpenApi);
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
addToOpenApiStrategy(inYaml, urlValue, httpMethodKey, addToOpenApi) {
|
|
85
|
+
// Convert the YAML into a JSON object.
|
|
86
|
+
const inJson = yaml.load(inYaml);
|
|
87
|
+
const requestBodyResponse = new RequestBodyBuilder_1.RequestBodyBuilder().build(inJson);
|
|
88
|
+
addToOpenApi(inJson, urlValue, httpMethodKey);
|
|
89
|
+
this.addReference(requestBodyResponse);
|
|
90
|
+
}
|
|
91
|
+
addRequestBodyToOpenApi(input, urlValue, httpMethodKey) {
|
|
92
|
+
const requestBodyResponse = new RequestBodyBuilder_1.RequestBodyBuilder().build(input);
|
|
93
|
+
this.openApiModel.paths[urlValue][httpMethodKey].requestBody = requestBodyResponse.body;
|
|
94
|
+
}
|
|
95
|
+
addParametersToOpenApi(input, urlValue, httpMethodKey) {
|
|
96
|
+
const parameterObjectResponse = new ParameterObjectBuilder_1.ParameterObjectBuilder().build(input);
|
|
97
|
+
if (this.openApiModel.paths[urlValue][httpMethodKey].parameters === undefined) {
|
|
98
|
+
// If no parameters have been defined yet, initialize the list.
|
|
99
|
+
this.openApiModel.paths[urlValue][httpMethodKey].parameters = [];
|
|
100
|
+
}
|
|
101
|
+
this.openApiModel.paths[urlValue][httpMethodKey].parameters.push(parameterObjectResponse.body);
|
|
102
|
+
}
|
|
103
|
+
addHttpResponsesToOpenApi(input, urlValue, httpMethodKey) {
|
|
104
|
+
const responseObjectResponse = new ResponsesBuilder_1.ResponsesBuilder().build(input);
|
|
105
|
+
if (this.openApiModel.paths[urlValue][httpMethodKey].responses === undefined) {
|
|
106
|
+
this.openApiModel.paths[urlValue][httpMethodKey].responses = {};
|
|
107
|
+
}
|
|
108
|
+
this.openApiModel.paths[urlValue][httpMethodKey].responses[input.statusCode] = responseObjectResponse.body;
|
|
109
|
+
}
|
|
110
|
+
fallbackHttpRequestBodyParser(httpUrlEndpoint, httpMethodKey) {
|
|
111
|
+
return (methodMirror) => {
|
|
112
|
+
// If the Apex method receives parameters, they will be interpreted by Salesforce as a JSON
|
|
113
|
+
// object, with each key of the object being the parameter name.
|
|
114
|
+
const parameters = methodMirror.parameters;
|
|
115
|
+
if (!parameters.length) {
|
|
116
|
+
return;
|
|
117
|
+
}
|
|
118
|
+
const propertiesObject = {};
|
|
119
|
+
parameters.forEach((currentParameter) => {
|
|
120
|
+
const propertyKey = currentParameter.name;
|
|
121
|
+
const propertyReference = new ReferenceBuilder_1.ReferenceBuilder().getReferenceType(currentParameter.typeReference);
|
|
122
|
+
propertiesObject[propertyKey] = propertyReference.schema;
|
|
123
|
+
this.addReference({
|
|
124
|
+
reference: {
|
|
125
|
+
entrypointReferenceObject: propertyReference.schema,
|
|
126
|
+
referenceComponents: propertyReference.referenceComponents,
|
|
127
|
+
},
|
|
128
|
+
});
|
|
129
|
+
});
|
|
130
|
+
this.openApiModel.paths[httpUrlEndpoint][httpMethodKey].requestBody = {
|
|
131
|
+
content: {
|
|
132
|
+
'application/json': {
|
|
133
|
+
schema: {
|
|
134
|
+
type: 'object',
|
|
135
|
+
properties: propertiesObject,
|
|
136
|
+
},
|
|
137
|
+
},
|
|
138
|
+
},
|
|
139
|
+
};
|
|
140
|
+
};
|
|
141
|
+
}
|
|
142
|
+
getFallbackHttpResponseParser(httpUrlEndpoint, httpMethodKey) {
|
|
143
|
+
return (methodMirror) => {
|
|
144
|
+
var _a, _b;
|
|
145
|
+
// Parses methods that return an object (as opposed to void).
|
|
146
|
+
const returnType = methodMirror.typeReference;
|
|
147
|
+
if (returnType.type.toLowerCase() === 'void') {
|
|
148
|
+
return;
|
|
149
|
+
}
|
|
150
|
+
const reference = new ReferenceBuilder_1.ReferenceBuilder().getReferenceType(returnType);
|
|
151
|
+
this.addReference({
|
|
152
|
+
reference: {
|
|
153
|
+
entrypointReferenceObject: reference.schema,
|
|
154
|
+
referenceComponents: reference.referenceComponents,
|
|
155
|
+
},
|
|
156
|
+
});
|
|
157
|
+
if (this.openApiModel.paths[httpUrlEndpoint][httpMethodKey].responses === undefined) {
|
|
158
|
+
this.openApiModel.paths[httpUrlEndpoint][httpMethodKey].responses = {};
|
|
159
|
+
}
|
|
160
|
+
// Successful responses with a non-void return type always return a status code of 2000
|
|
161
|
+
this.openApiModel.paths[httpUrlEndpoint][httpMethodKey].responses['200'] = {
|
|
162
|
+
description: (_b = (_a = methodMirror.docComment) === null || _a === void 0 ? void 0 : _a.description) !== null && _b !== void 0 ? _b : 'Status code 200',
|
|
163
|
+
content: {
|
|
164
|
+
'application/json': { schema: reference.schema },
|
|
165
|
+
},
|
|
166
|
+
};
|
|
167
|
+
};
|
|
168
|
+
}
|
|
169
|
+
addReference(referenceHolder) {
|
|
170
|
+
if (referenceHolder.reference) {
|
|
171
|
+
// If a reference is returned, we want to make sure to add it to the OpenApi object as well
|
|
172
|
+
// Add to "component" section if it hasn't been already
|
|
173
|
+
if (this.openApiModel.components === undefined) {
|
|
174
|
+
this.openApiModel.components = {
|
|
175
|
+
schemas: {},
|
|
176
|
+
};
|
|
177
|
+
}
|
|
178
|
+
if (!referenceHolder.reference.referenceComponents.length) {
|
|
179
|
+
return;
|
|
180
|
+
}
|
|
181
|
+
// Add all received references to the OpenApi components section.
|
|
182
|
+
referenceHolder.reference.referenceComponents.forEach((current) => {
|
|
183
|
+
// Check if the referenced object is already part of the OpenApi object
|
|
184
|
+
this.openApiModel.components.schemas[current.referencedClass] = current.schema;
|
|
185
|
+
});
|
|
186
|
+
}
|
|
187
|
+
}
|
|
188
|
+
}
|
|
189
|
+
exports.MethodParser = MethodParser;
|
|
167
190
|
//# sourceMappingURL=MethodParser.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MethodParser.js","sourceRoot":"","sources":["../../../../src/transpiler/openapi/parsers/MethodParser.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"MethodParser.js","sourceRoot":"","sources":["../../../../src/transpiler/openapi/parsers/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AAI,CAAC,YAAY,CAAC,KAAK,CAAC,eAAe,CAAC,CAAC,aAAa,CAAE,CAAC,SAAU,CAAC,KAAK,CAAC,GAAG;gBAC3E,WAAW,EAAE,MAAA,MAAA,YAAY,CAAC,UAAU,0CAAE,WAAW,mCAAI,iBAAiB;gBACtE,OAAO,EAAE;oBACP,kBAAkB,EAAE,EAAE,MAAM,EAAE,SAAS,CAAC,MAAM,EAAE;iBACjD;aACF,CAAC;QACJ,CAAC,CAAC;IACJ,CAAC;IAEO,YAAY,CAAC,eAA0C;QAC7D,IAAI,eAAe,CAAC,SAAS,EAAE,CAAC;YAC9B,2FAA2F;YAC3F,uDAAuD;YACvD,IAAI,IAAI,CAAC,YAAY,CAAC,UAAU,KAAK,SAAS,EAAE,CAAC;gBAC/C,IAAI,CAAC,YAAY,CAAC,UAAU,GAAG;oBAC7B,OAAO,EAAE,EAAE;iBACZ,CAAC;YACJ,CAAC;YAED,IAAI,CAAC,eAAe,CAAC,SAAS,CAAC,mBAAmB,CAAC,MAAM,EAAE,CAAC;gBAC1D,OAAO;YACT,CAAC;YAED,iEAAiE;YACjE,eAAe,CAAC,SAAS,CAAC,mBAAmB,CAAC,OAAO,CAAC,CAAC,OAAO,EAAE,EAAE;gBAChE,uEAAuE;gBACvE,IAAI,CAAC,YAAY,CAAC,UAAW,CAAC,OAAQ,CAAC,OAAO,CAAC,eAAe,CAAC,GAAG,OAAO,CAAC,MAAM,CAAC;YACnF,CAAC,CAAC,CAAC;QACL,CAAC;IACH,CAAC;CACF;AA/ND,oCA+NC"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { ParameterObject } from '../../../model/openapi/open-api-types';
|
|
2
|
-
import { Reference } from './ReferenceBuilder';
|
|
3
|
-
import { ApexDocParameterObject } from '../../../model/openapi/apex-doc-types';
|
|
4
|
-
import { Builder } from './Builder';
|
|
5
|
-
export declare class ParameterObjectBuilder extends Builder<ParameterObject, ApexDocParameterObject> {
|
|
6
|
-
buildBody(apexDocObject: ApexDocParameterObject, reference?: Reference): ParameterObject;
|
|
7
|
-
}
|
|
1
|
+
import { ParameterObject } from '../../../model/openapi/open-api-types';
|
|
2
|
+
import { Reference } from './ReferenceBuilder';
|
|
3
|
+
import { ApexDocParameterObject } from '../../../model/openapi/apex-doc-types';
|
|
4
|
+
import { Builder } from './Builder';
|
|
5
|
+
export declare class ParameterObjectBuilder extends Builder<ParameterObject, ApexDocParameterObject> {
|
|
6
|
+
buildBody(apexDocObject: ApexDocParameterObject, reference?: Reference): ParameterObject;
|
|
7
|
+
}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.ParameterObjectBuilder = void 0;
|
|
4
|
-
const Builder_1 = require("./Builder");
|
|
5
|
-
class ParameterObjectBuilder extends Builder_1.Builder {
|
|
6
|
-
buildBody(apexDocObject, reference) {
|
|
7
|
-
return Object.assign(Object.assign({}, apexDocObject), { schema: this.getOpenApiSchemaFromApexDocSchema(apexDocObject, reference) });
|
|
8
|
-
}
|
|
9
|
-
}
|
|
10
|
-
exports.ParameterObjectBuilder = ParameterObjectBuilder;
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ParameterObjectBuilder = void 0;
|
|
4
|
+
const Builder_1 = require("./Builder");
|
|
5
|
+
class ParameterObjectBuilder extends Builder_1.Builder {
|
|
6
|
+
buildBody(apexDocObject, reference) {
|
|
7
|
+
return Object.assign(Object.assign({}, apexDocObject), { schema: this.getOpenApiSchemaFromApexDocSchema(apexDocObject, reference) });
|
|
8
|
+
}
|
|
9
|
+
}
|
|
10
|
+
exports.ParameterObjectBuilder = ParameterObjectBuilder;
|
|
11
11
|
//# sourceMappingURL=ParameterObjectBuilder.js.map
|