@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.
Files changed (317) hide show
  1. package/.eslintrc.js +12 -12
  2. package/.github/workflows/ci.yaml +22 -0
  3. package/.github/workflows/close_stale.yml +22 -22
  4. package/.prettierrc.js +7 -7
  5. package/LICENSE +21 -21
  6. package/README.md +742 -718
  7. package/apexdocs.config.ts +13 -13
  8. package/docs/{README.md → __old/README.md} +1 -1
  9. package/docs/{restapi.json → __old/restapi.json} +589 -589
  10. package/docs/{types → __old/types}/Classes/nspc.ChildClass.md +97 -97
  11. package/docs/{types → __old/types}/Main/nspc.SampleClass.md +189 -189
  12. package/examples/force-app/main/default/classes/AnotherInterface.cls +16 -16
  13. package/examples/force-app/main/default/classes/ChildClass.cls +42 -42
  14. package/examples/force-app/main/default/classes/EscapedAnnotations.cls +5 -5
  15. package/examples/force-app/main/default/classes/GrandparentClass.cls +4 -4
  16. package/examples/force-app/main/default/classes/GroupedClass.cls +8 -8
  17. package/examples/force-app/main/default/classes/MemberGrouping.cls +17 -17
  18. package/examples/force-app/main/default/classes/ParentClass.cls +16 -16
  19. package/examples/force-app/main/default/classes/SampleClass.cls +166 -166
  20. package/examples/force-app/main/default/classes/SampleClass.cls-meta.xml +5 -5
  21. package/examples/force-app/main/default/classes/SampleClassWithoutModifier.cls +9 -9
  22. package/examples/force-app/main/default/classes/SampleInterface.cls +16 -16
  23. package/examples/force-app/main/default/restapi/SampleRestResource.cls +195 -195
  24. package/examples/force-app/main/default/restapi/SampleRestResourceToSkip.cls +35 -35
  25. package/examples/force-app/main/default/restapi/SampleRestResourceWithInnerClass.cls +24 -24
  26. package/examples/force-app/main/default/restapi/SampleRestResourceWithoutApexDocs.cls +15 -15
  27. package/examples/force-app/main/default/restapi/references/Reference1.cls +9 -9
  28. package/examples/force-app/main/default/restapi/references/Reference2.cls +9 -9
  29. package/examples/force-app/main/default/restapi/references/Reference3.cls +3 -3
  30. package/examples/force-app/main/default/restapi/references/Reference4.cls +3 -3
  31. package/examples/force-app/main/default/restapi/references/Reference5.cls +3 -3
  32. package/examples/force-app/main/default/restapi/references/Reference6.cls +6 -6
  33. package/examples/force-app/main/default/restapi/references/Reference7.cls +3 -3
  34. package/examples/includes/header.md +3 -3
  35. package/examples/plain-markdown/.forceignore +12 -0
  36. package/examples/plain-markdown/README.md +301 -0
  37. package/examples/plain-markdown/config/project-scratch-def.json +5 -0
  38. package/examples/plain-markdown/force-app/classes/BaseClass.cls +3 -0
  39. package/examples/plain-markdown/force-app/classes/ParentInterface.cls +3 -0
  40. package/examples/plain-markdown/force-app/classes/ReferencedEnum.cls +3 -0
  41. package/examples/plain-markdown/force-app/classes/SampleClass.cls +35 -0
  42. package/examples/plain-markdown/force-app/classes/SampleEnum.cls +30 -0
  43. package/examples/plain-markdown/force-app/classes/SampleException.cls +1 -0
  44. package/examples/plain-markdown/force-app/classes/SampleInterface.cls +46 -0
  45. package/examples/plain-markdown/package-lock.json +665 -0
  46. package/examples/plain-markdown/package.json +24 -0
  47. package/examples/plain-markdown/sfdx-project.json +12 -0
  48. package/examples/plain-markdown/template.md +3 -0
  49. package/jest.config.js +5 -5
  50. package/lib/adapters/apex-types.d.ts +5 -0
  51. package/lib/adapters/apex-types.js +34 -0
  52. package/lib/adapters/apex-types.js.map +1 -0
  53. package/lib/adapters/documentables.d.ts +6 -0
  54. package/lib/adapters/documentables.js +41 -0
  55. package/lib/adapters/documentables.js.map +1 -0
  56. package/lib/adapters/fields-and-properties.d.ts +3 -0
  57. package/lib/adapters/fields-and-properties.js +10 -0
  58. package/lib/adapters/fields-and-properties.js.map +1 -0
  59. package/lib/adapters/methods-and-constructors.d.ts +4 -0
  60. package/lib/adapters/methods-and-constructors.js +49 -0
  61. package/lib/adapters/methods-and-constructors.js.map +1 -0
  62. package/lib/adapters/references.d.ts +5 -0
  63. package/lib/adapters/references.js +82 -0
  64. package/lib/adapters/references.js.map +1 -0
  65. package/lib/adapters/type-utils.d.ts +2 -0
  66. package/lib/adapters/type-utils.js +8 -0
  67. package/lib/adapters/type-utils.js.map +1 -0
  68. package/lib/application/Apexdocs.d.ts +13 -13
  69. package/lib/application/Apexdocs.js +79 -76
  70. package/lib/application/Apexdocs.js.map +1 -1
  71. package/lib/cli/generate.d.ts +2 -2
  72. package/lib/cli/generate.js +156 -130
  73. package/lib/cli/generate.js.map +1 -1
  74. package/lib/index.d.ts +1 -1
  75. package/lib/index.js +17 -17
  76. package/lib/model/apex-bundle.d.ts +6 -6
  77. package/lib/model/apex-bundle.js +10 -10
  78. package/lib/model/apex-type-wrappers/ClassMirrorWrapper.d.ts +7 -7
  79. package/lib/model/apex-type-wrappers/ClassMirrorWrapper.js +13 -13
  80. package/lib/model/apex-type-wrappers/MethodMirrorWrapper.d.ts +7 -7
  81. package/lib/model/apex-type-wrappers/MethodMirrorWrapper.js +11 -11
  82. package/lib/model/inheritance.d.ts +8 -8
  83. package/lib/model/inheritance.js +2 -2
  84. package/lib/model/manifest.d.ts +22 -22
  85. package/lib/model/manifest.js +46 -46
  86. package/lib/model/manifest.js.map +1 -1
  87. package/lib/model/markdown-file.d.ts +16 -16
  88. package/lib/model/markdown-file.js +109 -106
  89. package/lib/model/markdown-file.js.map +1 -1
  90. package/lib/model/markdown-generation-util/doc-comment-annotation-util.d.ts +8 -8
  91. package/lib/model/markdown-generation-util/doc-comment-annotation-util.js +46 -43
  92. package/lib/model/markdown-generation-util/doc-comment-annotation-util.js.map +1 -1
  93. package/lib/model/markdown-generation-util/field-declaration-util.d.ts +3 -3
  94. package/lib/model/markdown-generation-util/field-declaration-util.js +54 -54
  95. package/lib/model/markdown-generation-util/index.d.ts +3 -3
  96. package/lib/model/markdown-generation-util/index.js +19 -19
  97. package/lib/model/markdown-generation-util/method-declaration-util.d.ts +4 -4
  98. package/lib/model/markdown-generation-util/method-declaration-util.js +114 -114
  99. package/lib/model/markdown-generation-util/type-declaration-util.d.ts +3 -3
  100. package/lib/model/markdown-generation-util/type-declaration-util.js +81 -81
  101. package/lib/model/markdown-home-file.d.ts +11 -11
  102. package/lib/model/markdown-home-file.js +56 -53
  103. package/lib/model/markdown-home-file.js.map +1 -1
  104. package/lib/model/markdown-type-file.d.ts +26 -26
  105. package/lib/model/markdown-type-file.js +136 -133
  106. package/lib/model/markdown-type-file.js.map +1 -1
  107. package/lib/model/openapi/apex-doc-types.d.ts +19 -19
  108. package/lib/model/openapi/apex-doc-types.js +4 -4
  109. package/lib/model/openapi/open-api-types.d.ts +93 -93
  110. package/lib/model/openapi/open-api-types.js +2 -2
  111. package/lib/model/openapi/open-api.d.ts +16 -16
  112. package/lib/model/openapi/open-api.js +33 -33
  113. package/lib/model/openapi/openapi-type-file.d.ts +7 -7
  114. package/lib/model/openapi/openapi-type-file.js +16 -16
  115. package/lib/model/outputFile.d.ts +10 -10
  116. package/lib/model/outputFile.js +28 -28
  117. package/lib/model/types-repository.d.ts +16 -16
  118. package/lib/model/types-repository.js +53 -53
  119. package/lib/service/apex-file-reader.d.ts +14 -14
  120. package/lib/service/apex-file-reader.js +48 -45
  121. package/lib/service/apex-file-reader.js.map +1 -1
  122. package/lib/service/file-system.d.ts +14 -14
  123. package/lib/service/file-system.js +47 -24
  124. package/lib/service/file-system.js.map +1 -1
  125. package/lib/service/file-writer.d.ts +6 -6
  126. package/lib/service/file-writer.js +56 -33
  127. package/lib/service/file-writer.js.map +1 -1
  128. package/lib/service/manifest-factory.d.ts +10 -10
  129. package/lib/service/manifest-factory.js +16 -13
  130. package/lib/service/manifest-factory.js.map +1 -1
  131. package/lib/service/metadata-processor.d.ts +3 -3
  132. package/lib/service/metadata-processor.js +16 -16
  133. package/lib/service/parser.d.ts +21 -21
  134. package/lib/service/parser.js +137 -134
  135. package/lib/service/parser.js.map +1 -1
  136. package/lib/service/state.d.ts +9 -9
  137. package/lib/service/state.js +19 -19
  138. package/lib/service/walkers/class-walker.d.ts +4 -4
  139. package/lib/service/walkers/class-walker.js +32 -32
  140. package/lib/service/walkers/enum-walker.d.ts +4 -4
  141. package/lib/service/walkers/enum-walker.js +10 -10
  142. package/lib/service/walkers/interface-walker.d.ts +4 -4
  143. package/lib/service/walkers/interface-walker.js +14 -14
  144. package/lib/service/walkers/walker-factory.d.ts +5 -5
  145. package/lib/service/walkers/walker-factory.js +20 -20
  146. package/lib/service/walkers/walker.d.ts +19 -19
  147. package/lib/service/walkers/walker.js +16 -16
  148. package/lib/settings.d.ts +70 -64
  149. package/lib/settings.js +99 -88
  150. package/lib/settings.js.map +1 -1
  151. package/lib/templating/compile.d.ts +7 -0
  152. package/lib/templating/compile.js +98 -0
  153. package/lib/templating/compile.js.map +1 -0
  154. package/lib/templating/helpers.d.ts +2 -0
  155. package/lib/templating/helpers.js +18 -0
  156. package/lib/templating/helpers.js.map +1 -0
  157. package/lib/test-helpers/AnnotationBuilder.d.ts +12 -12
  158. package/lib/test-helpers/AnnotationBuilder.js +30 -30
  159. package/lib/test-helpers/ClassMirrorBuilder.d.ts +18 -18
  160. package/lib/test-helpers/ClassMirrorBuilder.js +53 -53
  161. package/lib/test-helpers/DocCommentAnnotationBuilder.d.ts +8 -8
  162. package/lib/test-helpers/DocCommentAnnotationBuilder.js +25 -25
  163. package/lib/test-helpers/DocCommentBuilder.d.ts +12 -12
  164. package/lib/test-helpers/DocCommentBuilder.js +37 -37
  165. package/lib/test-helpers/FieldMirrorBuilder.d.ts +18 -18
  166. package/lib/test-helpers/FieldMirrorBuilder.js +53 -53
  167. package/lib/test-helpers/InterfaceMirrorBuilder.d.ts +16 -0
  168. package/lib/test-helpers/InterfaceMirrorBuilder.js +43 -0
  169. package/lib/test-helpers/InterfaceMirrorBuilder.js.map +1 -0
  170. package/lib/test-helpers/MethodMirrorBuilder.d.ts +29 -10
  171. package/lib/test-helpers/MethodMirrorBuilder.js +71 -36
  172. package/lib/test-helpers/MethodMirrorBuilder.js.map +1 -1
  173. package/lib/test-helpers/SettingsBuilder.d.ts +8 -8
  174. package/lib/test-helpers/SettingsBuilder.js +26 -26
  175. package/lib/transpiler/factory.d.ts +6 -6
  176. package/lib/transpiler/factory.js +34 -31
  177. package/lib/transpiler/factory.js.map +1 -1
  178. package/lib/transpiler/file-container.d.ts +6 -6
  179. package/lib/transpiler/file-container.js +15 -15
  180. package/lib/transpiler/generator-choices.d.ts +1 -1
  181. package/lib/transpiler/generator-choices.js +2 -2
  182. package/lib/transpiler/markdown/class-file-generatorHelper.d.ts +11 -8
  183. package/lib/transpiler/markdown/class-file-generatorHelper.js +74 -55
  184. package/lib/transpiler/markdown/class-file-generatorHelper.js.map +1 -1
  185. package/lib/transpiler/markdown/docsify/docsify-docs-processor.d.ts +6 -6
  186. package/lib/transpiler/markdown/docsify/docsify-docs-processor.js +12 -12
  187. package/lib/transpiler/markdown/jekyll/jekyll-docsProcessor.d.ts +11 -11
  188. package/lib/transpiler/markdown/jekyll/jekyll-docsProcessor.js +50 -50
  189. package/lib/transpiler/markdown/markdown-transpiler-base.d.ts +11 -11
  190. package/lib/transpiler/markdown/markdown-transpiler-base.js +26 -23
  191. package/lib/transpiler/markdown/markdown-transpiler-base.js.map +1 -1
  192. package/lib/transpiler/markdown/plain-markdown/class-template.d.ts +1 -0
  193. package/lib/transpiler/markdown/plain-markdown/class-template.js +36 -0
  194. package/lib/transpiler/markdown/plain-markdown/class-template.js.map +1 -0
  195. package/lib/transpiler/markdown/plain-markdown/constructors-partial-template.d.ts +1 -0
  196. package/lib/transpiler/markdown/plain-markdown/constructors-partial-template.js +39 -0
  197. package/lib/transpiler/markdown/plain-markdown/constructors-partial-template.js.map +1 -0
  198. package/lib/transpiler/markdown/plain-markdown/documentable-partial-template.d.ts +1 -0
  199. package/lib/transpiler/markdown/plain-markdown/documentable-partial-template.js +25 -0
  200. package/lib/transpiler/markdown/plain-markdown/documentable-partial-template.js.map +1 -0
  201. package/lib/transpiler/markdown/plain-markdown/enum-template.d.ts +1 -0
  202. package/lib/transpiler/markdown/plain-markdown/enum-template.js +15 -0
  203. package/lib/transpiler/markdown/plain-markdown/enum-template.js.map +1 -0
  204. package/lib/transpiler/markdown/plain-markdown/fieldsPartialTemplate.d.ts +1 -0
  205. package/lib/transpiler/markdown/plain-markdown/fieldsPartialTemplate.js +24 -0
  206. package/lib/transpiler/markdown/plain-markdown/fieldsPartialTemplate.js.map +1 -0
  207. package/lib/transpiler/markdown/plain-markdown/interface-template.d.ts +1 -0
  208. package/lib/transpiler/markdown/plain-markdown/interface-template.js +20 -0
  209. package/lib/transpiler/markdown/plain-markdown/interface-template.js.map +1 -0
  210. package/lib/transpiler/markdown/plain-markdown/methods-partial-template.d.ts +1 -0
  211. package/lib/transpiler/markdown/plain-markdown/methods-partial-template.js +49 -0
  212. package/lib/transpiler/markdown/plain-markdown/methods-partial-template.js.map +1 -0
  213. package/lib/transpiler/markdown/plain-markdown/plain-docsProcessor.d.ts +13 -6
  214. package/lib/transpiler/markdown/plain-markdown/plain-docsProcessor.js +121 -13
  215. package/lib/transpiler/markdown/plain-markdown/plain-docsProcessor.js.map +1 -1
  216. package/lib/transpiler/markdown/plain-markdown/type-level-apex-doc-partial-template.d.ts +1 -0
  217. package/lib/transpiler/markdown/plain-markdown/type-level-apex-doc-partial-template.js +31 -0
  218. package/lib/transpiler/markdown/plain-markdown/type-level-apex-doc-partial-template.js.map +1 -0
  219. package/lib/transpiler/openapi/open-api-docs-processor.d.ts +13 -13
  220. package/lib/transpiler/openapi/open-api-docs-processor.js +77 -74
  221. package/lib/transpiler/openapi/open-api-docs-processor.js.map +1 -1
  222. package/lib/transpiler/openapi/parsers/Builder.d.ts +16 -16
  223. package/lib/transpiler/openapi/parsers/Builder.js +29 -29
  224. package/lib/transpiler/openapi/parsers/Builder.js.map +1 -1
  225. package/lib/transpiler/openapi/parsers/MethodParser.d.ts +20 -20
  226. package/lib/transpiler/openapi/parsers/MethodParser.js +189 -166
  227. package/lib/transpiler/openapi/parsers/MethodParser.js.map +1 -1
  228. package/lib/transpiler/openapi/parsers/ParameterObjectBuilder.d.ts +7 -7
  229. package/lib/transpiler/openapi/parsers/ParameterObjectBuilder.js +10 -10
  230. package/lib/transpiler/openapi/parsers/ReferenceBuilder.d.ts +39 -39
  231. package/lib/transpiler/openapi/parsers/ReferenceBuilder.js +248 -225
  232. package/lib/transpiler/openapi/parsers/ReferenceBuilder.js.map +1 -1
  233. package/lib/transpiler/openapi/parsers/RequestBodyBuilder.d.ts +10 -10
  234. package/lib/transpiler/openapi/parsers/RequestBodyBuilder.js +19 -19
  235. package/lib/transpiler/openapi/parsers/ResponsesBuilder.d.ts +7 -7
  236. package/lib/transpiler/openapi/parsers/ResponsesBuilder.js +21 -21
  237. package/lib/transpiler/processor-type-transpiler.d.ts +10 -10
  238. package/lib/transpiler/processor-type-transpiler.js +8 -8
  239. package/lib/transpiler/transpiler.d.ts +5 -5
  240. package/lib/transpiler/transpiler.js +29 -26
  241. package/lib/transpiler/transpiler.js.map +1 -1
  242. package/lib/util/error-logger.d.ts +8 -8
  243. package/lib/util/error-logger.js +89 -89
  244. package/lib/util/error-logger.js.map +1 -1
  245. package/lib/util/logger.d.ts +21 -21
  246. package/lib/util/logger.js +60 -57
  247. package/lib/util/logger.js.map +1 -1
  248. package/lib/util/string-utils.d.ts +2 -2
  249. package/lib/util/string-utils.js +14 -14
  250. package/package.json +79 -78
  251. package/src/adapters/__tests__/interface-adapter.spec.ts +76 -0
  252. package/src/adapters/__tests__/references.spec.ts +115 -0
  253. package/src/adapters/apex-types.ts +67 -0
  254. package/src/adapters/documentables.ts +58 -0
  255. package/src/adapters/fields-and-properties.ts +14 -0
  256. package/src/adapters/methods-and-constructors.ts +78 -0
  257. package/src/adapters/references.ts +113 -0
  258. package/src/adapters/type-utils.ts +5 -0
  259. package/src/adapters/types.d.ts +8 -0
  260. package/src/cli/generate.ts +3 -0
  261. package/src/model/__tests__/manifest.spec.ts +1 -0
  262. package/src/model/manifest.ts +3 -3
  263. package/src/model/markdown-file.ts +1 -1
  264. package/src/model/openapi/open-api-types.ts +2 -2
  265. package/src/service/__tests__/apex-file-reader.spec.ts +4 -4
  266. package/src/service/__tests__/manifest-factory.spec.ts +1 -2
  267. package/src/settings.ts +15 -0
  268. package/src/templating/__tests__/compile.spec.ts +741 -0
  269. package/src/templating/compile.ts +187 -0
  270. package/src/templating/helpers.ts +14 -0
  271. package/src/templating/types.d.ts +104 -0
  272. package/src/test-helpers/FieldMirrorBuilder.ts +1 -1
  273. package/src/test-helpers/InterfaceMirrorBuilder.ts +44 -0
  274. package/src/test-helpers/MethodMirrorBuilder.ts +46 -6
  275. package/src/transpiler/markdown/class-file-generatorHelper.ts +22 -2
  276. package/src/transpiler/markdown/plain-markdown/class-template.ts +32 -0
  277. package/src/transpiler/markdown/plain-markdown/constructors-partial-template.ts +35 -0
  278. package/src/transpiler/markdown/plain-markdown/documentable-partial-template.ts +21 -0
  279. package/src/transpiler/markdown/plain-markdown/enum-template.ts +11 -0
  280. package/src/transpiler/markdown/plain-markdown/fieldsPartialTemplate.ts +20 -0
  281. package/src/transpiler/markdown/plain-markdown/interface-template.ts +16 -0
  282. package/src/transpiler/markdown/plain-markdown/methods-partial-template.ts +45 -0
  283. package/src/transpiler/markdown/plain-markdown/plain-docsProcessor.ts +122 -0
  284. package/src/transpiler/markdown/plain-markdown/type-level-apex-doc-partial-template.ts +27 -0
  285. package/src/transpiler/openapi/parsers/Builder.ts +1 -1
  286. package/src/transpiler/openapi/parsers/MethodParser.ts +1 -1
  287. package/src/transpiler/openapi/parsers/ReferenceBuilder.ts +1 -1
  288. package/src/util/error-logger.ts +4 -4
  289. package/src/util/logger.ts +3 -3
  290. package/tsconfig.json +21 -20
  291. package/tslint.json +5 -5
  292. package/lib/model/manifest-diff.d.ts +0 -27
  293. package/lib/model/manifest-diff.js +0 -69
  294. package/lib/model/manifest-diff.js.map +0 -1
  295. package/src/model/__tests__/manifest-diff.spec.ts +0 -139
  296. package/src/model/manifest-diff.ts +0 -94
  297. /package/docs/{index.html → __old/index.html} +0 -0
  298. /package/docs/{types → __old/types}/Classes/nspc.AnotherInterface.md +0 -0
  299. /package/docs/{types → __old/types}/Main/nspc.GroupedClass.md +0 -0
  300. /package/docs/{types → __old/types}/Misc-Group/nspc.EscapedAnnotations.md +0 -0
  301. /package/docs/{types → __old/types}/Misc-Group/nspc.GrandparentClass.md +0 -0
  302. /package/docs/{types → __old/types}/Misc-Group/nspc.InterfaceWithInheritance.md +0 -0
  303. /package/docs/{types → __old/types}/Misc-Group/nspc.MemberGrouping.md +0 -0
  304. /package/docs/{types → __old/types}/Misc-Group/nspc.ParentClass.md +0 -0
  305. /package/docs/{types → __old/types}/Misc-Group/nspc.Reference1.md +0 -0
  306. /package/docs/{types → __old/types}/Misc-Group/nspc.Reference2.md +0 -0
  307. /package/docs/{types → __old/types}/Misc-Group/nspc.Reference3.md +0 -0
  308. /package/docs/{types → __old/types}/Misc-Group/nspc.Reference4.md +0 -0
  309. /package/docs/{types → __old/types}/Misc-Group/nspc.Reference5.md +0 -0
  310. /package/docs/{types → __old/types}/Misc-Group/nspc.Reference6.md +0 -0
  311. /package/docs/{types → __old/types}/Misc-Group/nspc.Reference7.md +0 -0
  312. /package/docs/{types → __old/types}/Misc-Group/nspc.SampleClassWithoutModifier.md +0 -0
  313. /package/docs/{types → __old/types}/Misc-Group/nspc.SampleRestResource.md +0 -0
  314. /package/docs/{types → __old/types}/Misc-Group/nspc.SampleRestResourceWithInnerClass.md +0 -0
  315. /package/docs/{types → __old/types}/Misc-Group/nspc.SampleRestResourceWithoutApexDocs.md +0 -0
  316. /package/docs/{types → __old/types}/README.md +0 -0
  317. /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
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.MarkdownTypeFile = void 0;
4
- const walker_factory_1 = require("../service/walkers/walker-factory");
5
- const markdown_file_1 = require("./markdown-file");
6
- const markdown_generation_util_1 = require("./markdown-generation-util");
7
- const class_file_generatorHelper_1 = require("../transpiler/markdown/class-file-generatorHelper");
8
- const settings_1 = require("../settings");
9
- class MarkdownTypeFile extends markdown_file_1.MarkdownFile {
10
- constructor(type, headingLevel = 1, headerContent, isInner = false) {
11
- super(`${settings_1.Settings.getInstance().getNamespacePrefix()}${type.name}`, class_file_generatorHelper_1.default.getSanitizedGroup(type));
12
- this.type = type;
13
- this.headingLevel = headingLevel;
14
- this.isInner = isInner;
15
- if (headerContent) {
16
- this.addText(headerContent);
17
- }
18
- const walker = walker_factory_1.WalkerFactory.get(type);
19
- walker.walk(this);
20
- }
21
- onTypeDeclaration(typeMirror) {
22
- let fullTypeName;
23
- if (this.isInner) {
24
- fullTypeName = typeMirror.name;
25
- }
26
- else {
27
- // If we are dealing with a class, we want to check if it has a class
28
- // modifier and add it to the name.
29
- if (this.isClass(typeMirror) && typeMirror.classModifier) {
30
- fullTypeName = `${typeMirror.classModifier} ${settings_1.Settings.getInstance().getNamespacePrefix()}${typeMirror.name}`;
31
- }
32
- else {
33
- fullTypeName = `${settings_1.Settings.getInstance().getNamespacePrefix()}${typeMirror.name}`;
34
- }
35
- }
36
- this.addTitle(fullTypeName, this.headingLevel);
37
- (0, markdown_generation_util_1.declareType)(this, typeMirror);
38
- }
39
- isClass(typeMirror) {
40
- return typeMirror.type_name === 'class';
41
- }
42
- onConstructorDeclaration(className, constructors) {
43
- this.addTitle('Constructors', this.headingLevel + 1);
44
- this.declareMethodWithGroupings(constructors, className);
45
- }
46
- onFieldsDeclaration(fields) {
47
- this.addTitle('Fields', this.headingLevel + 1);
48
- this.declareFieldOrProperty(fields);
49
- }
50
- onPropertiesDeclaration(properties) {
51
- this.addTitle('Properties', this.headingLevel + 1);
52
- this.declareFieldOrProperty(properties);
53
- }
54
- onMethodsDeclaration(methods) {
55
- this.addTitle('Methods', this.headingLevel + 1);
56
- this.declareMethodWithGroupings(methods);
57
- }
58
- onInnerEnumsDeclaration(enums) {
59
- this.addInnerTypes('Enums', enums);
60
- }
61
- onInnerClassesDeclaration(classes) {
62
- this.addInnerTypes('Classes', classes);
63
- }
64
- onInnerInterfacesDeclaration(interfaces) {
65
- this.addInnerTypes('Interfaces', interfaces, false);
66
- }
67
- addInnerTypes(title, types, addSeparator = true) {
68
- this.addTitle(title, this.headingLevel + 1);
69
- types.forEach((currentType) => {
70
- const innerFile = new MarkdownTypeFile(currentType, this.headingLevel + 2, undefined, true);
71
- this.addText(innerFile._contents);
72
- });
73
- if (addSeparator) {
74
- this.addHorizontalRule();
75
- }
76
- }
77
- hasGroupings(groupAware) {
78
- return !!groupAware.find((current) => !!current.group);
79
- }
80
- declareMethodWithGroupings(methods, className = '') {
81
- const hasGroupings = this.hasGroupings(methods);
82
- if (!hasGroupings) {
83
- (0, markdown_generation_util_1.declareMethod)(this, methods, this.headingLevel, className);
84
- }
85
- else {
86
- const groupedConstructors = this.group(methods);
87
- for (const key in groupedConstructors) {
88
- // For the group description, we can take the first one, since they all have the same description.
89
- this.startGroup(key, groupedConstructors[key][0].groupDescription);
90
- const constructorsForGroup = groupedConstructors[key];
91
- (0, markdown_generation_util_1.declareMethod)(this, constructorsForGroup, this.headingLevel, className);
92
- this.endGroup();
93
- }
94
- }
95
- }
96
- declareFieldOrProperty(fieldsOrProperties) {
97
- const hasGroupings = this.hasGroupings(fieldsOrProperties);
98
- if (!hasGroupings) {
99
- (0, markdown_generation_util_1.declareField)(this, fieldsOrProperties, this.headingLevel, false);
100
- }
101
- else {
102
- const groupedFields = this.group(fieldsOrProperties);
103
- for (const key in groupedFields) {
104
- // For the group description, we can take the first one, since they all have the same description.
105
- this.startGroup(key, groupedFields[key][0].groupDescription);
106
- const fieldsForGroup = groupedFields[key];
107
- (0, markdown_generation_util_1.declareField)(this, fieldsForGroup, this.headingLevel, true);
108
- this.endGroup();
109
- }
110
- }
111
- }
112
- startGroup(groupName, groupDescription) {
113
- this.headingLevel = this.headingLevel + 2;
114
- this.addTitle(groupName, this.headingLevel);
115
- if (groupDescription) {
116
- this.addText(groupDescription);
117
- }
118
- }
119
- endGroup() {
120
- this.headingLevel = this.headingLevel - 2;
121
- }
122
- group(list) {
123
- return list.reduce((groups, item) => {
124
- var _a;
125
- const groupName = (_a = item.group) !== null && _a !== void 0 ? _a : 'Other';
126
- const group = groups[groupName] || [];
127
- group.push(item);
128
- groups[groupName] = group;
129
- return groups;
130
- }, {});
131
- }
132
- }
133
- exports.MarkdownTypeFile = MarkdownTypeFile;
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":";;;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;iBAAM;gBACL,YAAY,GAAG,GAAG,mBAAQ,CAAC,WAAW,EAAE,CAAC,kBAAkB,EA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E,cAAc,EAAE,IAAI,CAAC,YAAY,EAAE,IAAI,CAAC,CAAC;gBAC5D,IAAI,CAAC,QAAQ,EAAE,CAAC;aACjB;SACF;IACH,CAAC;IAEO,UAAU,CAAC,SAAiB,EAAE,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?: 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
+ }