@cparra/apexdocs 2.24.0 → 2.25.0-alpha.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/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/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/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/README.md +301 -0
- package/examples/plain-markdown/config/project-scratch-def.json +5 -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 +35 -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 +24 -0
- package/examples/plain-markdown/sfdx-project.json +12 -0
- package/examples/plain-markdown/template.md +3 -0
- package/jest.config.js +5 -5
- package/lib/adapters/apex-types.d.ts +5 -0
- package/lib/adapters/apex-types.js +34 -0
- package/lib/adapters/apex-types.js.map +1 -0
- package/lib/adapters/documentables.d.ts +6 -0
- package/lib/adapters/documentables.js +41 -0
- package/lib/adapters/documentables.js.map +1 -0
- package/lib/adapters/fields-and-properties.d.ts +3 -0
- package/lib/adapters/fields-and-properties.js +10 -0
- package/lib/adapters/fields-and-properties.js.map +1 -0
- package/lib/adapters/methods-and-constructors.d.ts +4 -0
- package/lib/adapters/methods-and-constructors.js +49 -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 +8 -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/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.d.ts +22 -22
- package/lib/model/manifest.js +46 -46
- package/lib/model/manifest.js.map +1 -1
- package/lib/model/markdown-file.d.ts +16 -16
- package/lib/model/markdown-file.js +109 -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 +46 -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 +54 -54
- 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 +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/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 +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 +16 -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/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/walkers/class-walker.d.ts +4 -4
- package/lib/service/walkers/class-walker.js +32 -32
- 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/walker-factory.d.ts +5 -5
- package/lib/service/walkers/walker-factory.js +20 -20
- package/lib/service/walkers/walker.d.ts +19 -19
- package/lib/service/walkers/walker.js +16 -16
- package/lib/settings.d.ts +70 -64
- package/lib/settings.js +99 -88
- package/lib/settings.js.map +1 -1
- package/lib/templating/compile.d.ts +7 -0
- package/lib/templating/compile.js +98 -0
- package/lib/templating/compile.js.map +1 -0
- package/lib/templating/helpers.d.ts +2 -0
- package/lib/templating/helpers.js +18 -0
- package/lib/templating/helpers.js.map +1 -0
- 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/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 +36 -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 +39 -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 +25 -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 +15 -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 +24 -0
- package/lib/transpiler/markdown/plain-markdown/fieldsPartialTemplate.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 +49 -0
- package/lib/transpiler/markdown/plain-markdown/methods-partial-template.js.map +1 -0
- package/lib/transpiler/markdown/plain-markdown/plain-docsProcessor.d.ts +13 -6
- package/lib/transpiler/markdown/plain-markdown/plain-docsProcessor.js +121 -13
- package/lib/transpiler/markdown/plain-markdown/plain-docsProcessor.js.map +1 -1
- package/lib/transpiler/markdown/plain-markdown/type-level-apex-doc-partial-template.d.ts +1 -0
- package/lib/transpiler/markdown/plain-markdown/type-level-apex-doc-partial-template.js +31 -0
- package/lib/transpiler/markdown/plain-markdown/type-level-apex-doc-partial-template.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 +248 -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/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/package.json +79 -78
- package/src/adapters/__tests__/interface-adapter.spec.ts +76 -0
- package/src/adapters/__tests__/references.spec.ts +115 -0
- package/src/adapters/apex-types.ts +67 -0
- package/src/adapters/documentables.ts +58 -0
- package/src/adapters/fields-and-properties.ts +14 -0
- package/src/adapters/methods-and-constructors.ts +78 -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 +3 -0
- package/src/model/__tests__/manifest.spec.ts +1 -0
- package/src/model/manifest.ts +3 -3
- package/src/model/markdown-file.ts +1 -1
- package/src/model/openapi/open-api-types.ts +2 -2
- package/src/service/__tests__/apex-file-reader.spec.ts +4 -4
- package/src/service/__tests__/manifest-factory.spec.ts +1 -2
- package/src/settings.ts +15 -0
- package/src/templating/__tests__/compile.spec.ts +741 -0
- package/src/templating/compile.ts +187 -0
- package/src/templating/helpers.ts +14 -0
- package/src/templating/types.d.ts +104 -0
- 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 +32 -0
- package/src/transpiler/markdown/plain-markdown/constructors-partial-template.ts +35 -0
- package/src/transpiler/markdown/plain-markdown/documentable-partial-template.ts +21 -0
- package/src/transpiler/markdown/plain-markdown/enum-template.ts +11 -0
- package/src/transpiler/markdown/plain-markdown/fieldsPartialTemplate.ts +20 -0
- package/src/transpiler/markdown/plain-markdown/interface-template.ts +16 -0
- package/src/transpiler/markdown/plain-markdown/methods-partial-template.ts +45 -0
- package/src/transpiler/markdown/plain-markdown/plain-docsProcessor.ts +122 -0
- package/src/transpiler/markdown/plain-markdown/type-level-apex-doc-partial-template.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 +1 -1
- 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/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,26 +1,26 @@
|
|
|
1
|
-
import { ClassMirror, ConstructorMirror, EnumMirror, InterfaceMirror, MethodMirror, Type } from '@cparra/apex-reflection';
|
|
2
|
-
import { WalkerListener } from '../service/walkers/walker';
|
|
3
|
-
import { MarkdownFile } from './markdown-file';
|
|
4
|
-
import { FieldMirrorWithInheritance, PropertyMirrorWithInheritance } from './inheritance';
|
|
5
|
-
export declare class MarkdownTypeFile extends MarkdownFile implements WalkerListener {
|
|
6
|
-
private type;
|
|
7
|
-
private headingLevel;
|
|
8
|
-
private isInner;
|
|
9
|
-
constructor(type: Type, headingLevel?: number, headerContent?: string, isInner?: boolean);
|
|
10
|
-
onTypeDeclaration(typeMirror: Type): void;
|
|
11
|
-
private isClass;
|
|
12
|
-
onConstructorDeclaration(className: string, constructors: ConstructorMirror[]): void;
|
|
13
|
-
onFieldsDeclaration(fields: FieldMirrorWithInheritance[]): void;
|
|
14
|
-
onPropertiesDeclaration(properties: PropertyMirrorWithInheritance[]): void;
|
|
15
|
-
onMethodsDeclaration(methods: MethodMirror[]): void;
|
|
16
|
-
onInnerEnumsDeclaration(enums: EnumMirror[]): void;
|
|
17
|
-
onInnerClassesDeclaration(classes: ClassMirror[]): void;
|
|
18
|
-
onInnerInterfacesDeclaration(interfaces: InterfaceMirror[]): void;
|
|
19
|
-
private addInnerTypes;
|
|
20
|
-
private hasGroupings;
|
|
21
|
-
private declareMethodWithGroupings;
|
|
22
|
-
private declareFieldOrProperty;
|
|
23
|
-
private startGroup;
|
|
24
|
-
private endGroup;
|
|
25
|
-
private group;
|
|
26
|
-
}
|
|
1
|
+
import { ClassMirror, ConstructorMirror, EnumMirror, InterfaceMirror, MethodMirror, Type } from '@cparra/apex-reflection';
|
|
2
|
+
import { WalkerListener } from '../service/walkers/walker';
|
|
3
|
+
import { MarkdownFile } from './markdown-file';
|
|
4
|
+
import { FieldMirrorWithInheritance, PropertyMirrorWithInheritance } from './inheritance';
|
|
5
|
+
export declare class MarkdownTypeFile extends MarkdownFile implements WalkerListener {
|
|
6
|
+
private type;
|
|
7
|
+
private headingLevel;
|
|
8
|
+
private isInner;
|
|
9
|
+
constructor(type: Type, headingLevel?: number, headerContent?: string, isInner?: boolean);
|
|
10
|
+
onTypeDeclaration(typeMirror: Type): void;
|
|
11
|
+
private isClass;
|
|
12
|
+
onConstructorDeclaration(className: string, constructors: ConstructorMirror[]): void;
|
|
13
|
+
onFieldsDeclaration(fields: FieldMirrorWithInheritance[]): void;
|
|
14
|
+
onPropertiesDeclaration(properties: PropertyMirrorWithInheritance[]): void;
|
|
15
|
+
onMethodsDeclaration(methods: MethodMirror[]): void;
|
|
16
|
+
onInnerEnumsDeclaration(enums: EnumMirror[]): void;
|
|
17
|
+
onInnerClassesDeclaration(classes: ClassMirror[]): void;
|
|
18
|
+
onInnerInterfacesDeclaration(interfaces: InterfaceMirror[]): void;
|
|
19
|
+
private addInnerTypes;
|
|
20
|
+
private hasGroupings;
|
|
21
|
+
private declareMethodWithGroupings;
|
|
22
|
+
private declareFieldOrProperty;
|
|
23
|
+
private startGroup;
|
|
24
|
+
private endGroup;
|
|
25
|
+
private group;
|
|
26
|
+
}
|
|
@@ -1,134 +1,137 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
const
|
|
8
|
-
const
|
|
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
|
-
fullTypeName = `${settings_1.Settings.getInstance().getNamespacePrefix()}${typeMirror.name}`;
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
this.
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
this.
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
this.
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
this.
|
|
60
|
-
}
|
|
61
|
-
|
|
62
|
-
this.addInnerTypes('
|
|
63
|
-
}
|
|
64
|
-
|
|
65
|
-
this.addInnerTypes('
|
|
66
|
-
}
|
|
67
|
-
|
|
68
|
-
this.
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
this.
|
|
75
|
-
}
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
}
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
this.
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
this.
|
|
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
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.MarkdownTypeFile = void 0;
|
|
7
|
+
const walker_factory_1 = require("../service/walkers/walker-factory");
|
|
8
|
+
const markdown_file_1 = require("./markdown-file");
|
|
9
|
+
const markdown_generation_util_1 = require("./markdown-generation-util");
|
|
10
|
+
const class_file_generatorHelper_1 = __importDefault(require("../transpiler/markdown/class-file-generatorHelper"));
|
|
11
|
+
const settings_1 = require("../settings");
|
|
12
|
+
class MarkdownTypeFile extends markdown_file_1.MarkdownFile {
|
|
13
|
+
constructor(type, headingLevel = 1, headerContent, isInner = false) {
|
|
14
|
+
super(`${settings_1.Settings.getInstance().getNamespacePrefix()}${type.name}`, class_file_generatorHelper_1.default.getSanitizedGroup(type));
|
|
15
|
+
this.type = type;
|
|
16
|
+
this.headingLevel = headingLevel;
|
|
17
|
+
this.isInner = isInner;
|
|
18
|
+
if (headerContent) {
|
|
19
|
+
this.addText(headerContent);
|
|
20
|
+
}
|
|
21
|
+
const walker = walker_factory_1.WalkerFactory.get(type);
|
|
22
|
+
walker.walk(this);
|
|
23
|
+
}
|
|
24
|
+
onTypeDeclaration(typeMirror) {
|
|
25
|
+
let fullTypeName;
|
|
26
|
+
if (this.isInner) {
|
|
27
|
+
fullTypeName = typeMirror.name;
|
|
28
|
+
}
|
|
29
|
+
else {
|
|
30
|
+
// If we are dealing with a class, we want to check if it has a class
|
|
31
|
+
// modifier and add it to the name.
|
|
32
|
+
if (this.isClass(typeMirror) && typeMirror.classModifier) {
|
|
33
|
+
fullTypeName = `${typeMirror.classModifier} ${settings_1.Settings.getInstance().getNamespacePrefix()}${typeMirror.name}`;
|
|
34
|
+
}
|
|
35
|
+
else {
|
|
36
|
+
fullTypeName = `${settings_1.Settings.getInstance().getNamespacePrefix()}${typeMirror.name}`;
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
this.addTitle(fullTypeName, this.headingLevel);
|
|
40
|
+
(0, markdown_generation_util_1.declareType)(this, typeMirror);
|
|
41
|
+
}
|
|
42
|
+
isClass(typeMirror) {
|
|
43
|
+
return typeMirror.type_name === 'class';
|
|
44
|
+
}
|
|
45
|
+
onConstructorDeclaration(className, constructors) {
|
|
46
|
+
this.addTitle('Constructors', this.headingLevel + 1);
|
|
47
|
+
this.declareMethodWithGroupings(constructors, className);
|
|
48
|
+
}
|
|
49
|
+
onFieldsDeclaration(fields) {
|
|
50
|
+
this.addTitle('Fields', this.headingLevel + 1);
|
|
51
|
+
this.declareFieldOrProperty(fields);
|
|
52
|
+
}
|
|
53
|
+
onPropertiesDeclaration(properties) {
|
|
54
|
+
this.addTitle('Properties', this.headingLevel + 1);
|
|
55
|
+
this.declareFieldOrProperty(properties);
|
|
56
|
+
}
|
|
57
|
+
onMethodsDeclaration(methods) {
|
|
58
|
+
this.addTitle('Methods', this.headingLevel + 1);
|
|
59
|
+
this.declareMethodWithGroupings(methods);
|
|
60
|
+
}
|
|
61
|
+
onInnerEnumsDeclaration(enums) {
|
|
62
|
+
this.addInnerTypes('Enums', enums);
|
|
63
|
+
}
|
|
64
|
+
onInnerClassesDeclaration(classes) {
|
|
65
|
+
this.addInnerTypes('Classes', classes);
|
|
66
|
+
}
|
|
67
|
+
onInnerInterfacesDeclaration(interfaces) {
|
|
68
|
+
this.addInnerTypes('Interfaces', interfaces, false);
|
|
69
|
+
}
|
|
70
|
+
addInnerTypes(title, types, addSeparator = true) {
|
|
71
|
+
this.addTitle(title, this.headingLevel + 1);
|
|
72
|
+
types.forEach((currentType) => {
|
|
73
|
+
const innerFile = new MarkdownTypeFile(currentType, this.headingLevel + 2, undefined, true);
|
|
74
|
+
this.addText(innerFile._contents);
|
|
75
|
+
});
|
|
76
|
+
if (addSeparator) {
|
|
77
|
+
this.addHorizontalRule();
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
hasGroupings(groupAware) {
|
|
81
|
+
return !!groupAware.find((current) => !!current.group);
|
|
82
|
+
}
|
|
83
|
+
declareMethodWithGroupings(methods, className = '') {
|
|
84
|
+
const hasGroupings = this.hasGroupings(methods);
|
|
85
|
+
if (!hasGroupings) {
|
|
86
|
+
(0, markdown_generation_util_1.declareMethod)(this, methods, this.headingLevel, className);
|
|
87
|
+
}
|
|
88
|
+
else {
|
|
89
|
+
const groupedConstructors = this.group(methods);
|
|
90
|
+
for (const key in groupedConstructors) {
|
|
91
|
+
// For the group description, we can take the first one, since they all have the same description.
|
|
92
|
+
this.startGroup(key, groupedConstructors[key][0].groupDescription);
|
|
93
|
+
const constructorsForGroup = groupedConstructors[key];
|
|
94
|
+
(0, markdown_generation_util_1.declareMethod)(this, constructorsForGroup, this.headingLevel, className);
|
|
95
|
+
this.endGroup();
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
declareFieldOrProperty(fieldsOrProperties) {
|
|
100
|
+
const hasGroupings = this.hasGroupings(fieldsOrProperties);
|
|
101
|
+
if (!hasGroupings) {
|
|
102
|
+
(0, markdown_generation_util_1.declareField)(this, fieldsOrProperties, this.headingLevel, false);
|
|
103
|
+
}
|
|
104
|
+
else {
|
|
105
|
+
const groupedFields = this.group(fieldsOrProperties);
|
|
106
|
+
for (const key in groupedFields) {
|
|
107
|
+
// For the group description, we can take the first one, since they all have the same description.
|
|
108
|
+
this.startGroup(key, groupedFields[key][0].groupDescription);
|
|
109
|
+
const fieldsForGroup = groupedFields[key];
|
|
110
|
+
(0, markdown_generation_util_1.declareField)(this, fieldsForGroup, this.headingLevel, true);
|
|
111
|
+
this.endGroup();
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
startGroup(groupName, groupDescription) {
|
|
116
|
+
this.headingLevel = this.headingLevel + 2;
|
|
117
|
+
this.addTitle(groupName, this.headingLevel);
|
|
118
|
+
if (groupDescription) {
|
|
119
|
+
this.addText(groupDescription);
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
endGroup() {
|
|
123
|
+
this.headingLevel = this.headingLevel - 2;
|
|
124
|
+
}
|
|
125
|
+
group(list) {
|
|
126
|
+
return list.reduce((groups, item) => {
|
|
127
|
+
var _a;
|
|
128
|
+
const groupName = (_a = item.group) !== null && _a !== void 0 ? _a : 'Other';
|
|
129
|
+
const group = groups[groupName] || [];
|
|
130
|
+
group.push(item);
|
|
131
|
+
groups[groupName] = group;
|
|
132
|
+
return groups;
|
|
133
|
+
}, {});
|
|
134
|
+
}
|
|
135
|
+
}
|
|
136
|
+
exports.MarkdownTypeFile = MarkdownTypeFile;
|
|
134
137
|
//# sourceMappingURL=markdown-type-file.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"markdown-type-file.js","sourceRoot":"","sources":["../../src/model/markdown-type-file.ts"],"names":[],"mappings":"
|
|
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,mHAAyF;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,C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E,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?:
|
|
45
|
-
examples?: {
|
|
46
|
-
[index: string]: ExampleObject;
|
|
47
|
-
};
|
|
48
|
-
};
|
|
49
|
-
export type ExampleObject = {
|
|
50
|
-
summary?: string;
|
|
51
|
-
description?: string;
|
|
52
|
-
value?:
|
|
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?: unknown;
|
|
45
|
+
examples?: {
|
|
46
|
+
[index: string]: ExampleObject;
|
|
47
|
+
};
|
|
48
|
+
};
|
|
49
|
+
export type ExampleObject = {
|
|
50
|
+
summary?: string;
|
|
51
|
+
description?: string;
|
|
52
|
+
value?: unknown;
|
|
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
|
+
}
|