@digi-frontend/dgate-api-documentation 1.0.39 → 1.0.50
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/.editorconfig +12 -12
- package/.prettierignore +7 -7
- package/.prettierrc +15 -15
- package/dist/{a7568b270e175038.svg → 070dc6ecd197bc80.svg} +8 -8
- package/dist/16702d92fd6d1730.svg +6 -0
- package/dist/2b546d6e9fdf604a.svg +3 -0
- package/dist/2c3c6c2c3b835504.svg +5 -0
- package/dist/{43595976d1fdccbf.svg → 2e10bbdb265df50e.svg} +4 -4
- package/dist/55b5994c5781482b.svg +5 -0
- package/dist/60bef8083c55f46b.svg +6 -0
- package/dist/68c710e0583e19e6.svg +5 -0
- package/dist/731221b3f242672d.svg +4 -0
- package/dist/{b82c7612e73342f3.svg → 7f54eeb0bb2d1150.svg} +3 -3
- package/dist/8520b6792278d9df.svg +6 -0
- package/dist/{56dc416b683db280.svg → 8789eb84283ea95b.svg} +5 -5
- package/dist/9506ef7a26a74147.svg +12 -0
- package/dist/9b7aee27757b5036.svg +3 -0
- package/dist/{af16a554be8c4d69.svg → 9bdff13f8d8fa48a.svg} +3 -3
- package/dist/_virtual/core.js +2 -0
- package/dist/_virtual/core.js.map +1 -0
- package/dist/_virtual/core2.js +2 -0
- package/dist/_virtual/core2.js.map +1 -0
- package/dist/_virtual/format.js +2 -0
- package/dist/_virtual/format.js.map +1 -0
- package/dist/_virtual/index3.js +1 -1
- package/dist/_virtual/index6.js +1 -1
- package/dist/{64efc2716808c4a4.svg → bb8b87cace25e052.svg} +3 -3
- package/dist/cceb1e5dc06b0b85.svg +4 -0
- package/dist/d140a601c85bac25.svg +3 -0
- package/dist/{72db3b05a96dd600.svg → d32ce84bbd78babd.svg} +3 -3
- package/dist/{844eba3f2e42a9eb.svg → d501922060662842.svg} +3 -3
- package/dist/d6d0a98ec38e6b77.svg +3 -0
- package/dist/e04479ad425e7d58.svg +4 -0
- package/dist/f4452c3ebcf0d5da.svg +4 -0
- package/dist/f4a32992f02af522.svg +5 -0
- package/dist/node_modules/@babel/runtime/helpers/esm/arrayLikeToArray.js +2 -0
- package/dist/node_modules/@babel/runtime/helpers/esm/arrayLikeToArray.js.map +1 -0
- package/dist/node_modules/@babel/runtime/helpers/esm/arrayWithoutHoles.js +2 -0
- package/dist/node_modules/@babel/runtime/helpers/esm/arrayWithoutHoles.js.map +1 -0
- package/dist/node_modules/@babel/runtime/helpers/esm/defineProperty.js +2 -0
- package/dist/node_modules/@babel/runtime/helpers/esm/defineProperty.js.map +1 -0
- package/dist/node_modules/@babel/runtime/helpers/esm/extends.js +2 -0
- package/dist/node_modules/@babel/runtime/helpers/esm/extends.js.map +1 -0
- package/dist/node_modules/@babel/runtime/helpers/esm/iterableToArray.js +2 -0
- package/dist/node_modules/@babel/runtime/helpers/esm/iterableToArray.js.map +1 -0
- package/dist/node_modules/@babel/runtime/helpers/esm/nonIterableSpread.js +2 -0
- package/dist/node_modules/@babel/runtime/helpers/esm/nonIterableSpread.js.map +1 -0
- package/dist/node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js +2 -0
- package/dist/node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js.map +1 -0
- package/dist/node_modules/@babel/runtime/helpers/esm/objectWithoutPropertiesLoose.js +2 -0
- package/dist/node_modules/@babel/runtime/helpers/esm/objectWithoutPropertiesLoose.js.map +1 -0
- package/dist/node_modules/@babel/runtime/helpers/esm/toConsumableArray.js +2 -0
- package/dist/node_modules/@babel/runtime/helpers/esm/toConsumableArray.js.map +1 -0
- package/dist/node_modules/@babel/runtime/helpers/esm/toPrimitive.js +2 -0
- package/dist/node_modules/@babel/runtime/helpers/esm/toPrimitive.js.map +1 -0
- package/dist/node_modules/@babel/runtime/helpers/esm/toPropertyKey.js +2 -0
- package/dist/node_modules/@babel/runtime/helpers/esm/toPropertyKey.js.map +1 -0
- package/dist/node_modules/@babel/runtime/helpers/esm/typeof.js +2 -0
- package/dist/node_modules/@babel/runtime/helpers/esm/typeof.js.map +1 -0
- package/dist/node_modules/@babel/runtime/helpers/esm/unsupportedIterableToArray.js +2 -0
- package/dist/node_modules/@babel/runtime/helpers/esm/unsupportedIterableToArray.js.map +1 -0
- package/dist/node_modules/dom-serializer/lib/foreignNames.js +2 -0
- package/dist/node_modules/dom-serializer/lib/foreignNames.js.map +1 -0
- package/dist/node_modules/dom-serializer/lib/index.js +2 -0
- package/dist/node_modules/dom-serializer/lib/index.js.map +1 -0
- package/dist/node_modules/dom-serializer/node_modules/entities/lib/decode.js +2 -0
- package/dist/node_modules/dom-serializer/node_modules/entities/lib/decode.js.map +1 -0
- package/dist/node_modules/dom-serializer/node_modules/entities/lib/decode_codepoint.js +2 -0
- package/dist/node_modules/dom-serializer/node_modules/entities/lib/decode_codepoint.js.map +1 -0
- package/dist/node_modules/dom-serializer/node_modules/entities/lib/encode.js +2 -0
- package/dist/node_modules/dom-serializer/node_modules/entities/lib/encode.js.map +1 -0
- package/dist/node_modules/dom-serializer/node_modules/entities/lib/escape.js +2 -0
- package/dist/node_modules/dom-serializer/node_modules/entities/lib/escape.js.map +1 -0
- package/dist/node_modules/dom-serializer/node_modules/entities/lib/generated/decode-data-html.js +2 -0
- package/dist/node_modules/dom-serializer/node_modules/entities/lib/generated/decode-data-html.js.map +1 -0
- package/dist/node_modules/dom-serializer/node_modules/entities/lib/generated/decode-data-xml.js +2 -0
- package/dist/node_modules/dom-serializer/node_modules/entities/lib/generated/decode-data-xml.js.map +1 -0
- package/dist/node_modules/dom-serializer/node_modules/entities/lib/generated/encode-html.js +2 -0
- package/dist/node_modules/dom-serializer/node_modules/entities/lib/generated/encode-html.js.map +1 -0
- package/dist/node_modules/dom-serializer/node_modules/entities/lib/index.js +2 -0
- package/dist/node_modules/dom-serializer/node_modules/entities/lib/index.js.map +1 -0
- package/dist/node_modules/domhandler/lib/index.js +2 -0
- package/dist/node_modules/domhandler/lib/index.js.map +1 -0
- package/dist/node_modules/domhandler/lib/node.js +2 -0
- package/dist/node_modules/domhandler/lib/node.js.map +1 -0
- package/dist/node_modules/domutils/lib/feeds.js +2 -0
- package/dist/node_modules/domutils/lib/feeds.js.map +1 -0
- package/dist/node_modules/domutils/lib/helpers.js +2 -0
- package/dist/node_modules/domutils/lib/helpers.js.map +1 -0
- package/dist/node_modules/domutils/lib/index.js +2 -0
- package/dist/node_modules/domutils/lib/index.js.map +1 -0
- package/dist/node_modules/domutils/lib/legacy.js +2 -0
- package/dist/node_modules/domutils/lib/legacy.js.map +1 -0
- package/dist/node_modules/domutils/lib/manipulation.js +2 -0
- package/dist/node_modules/domutils/lib/manipulation.js.map +1 -0
- package/dist/node_modules/domutils/lib/querying.js +2 -0
- package/dist/node_modules/domutils/lib/querying.js.map +1 -0
- package/dist/node_modules/domutils/lib/stringify.js +2 -0
- package/dist/node_modules/domutils/lib/stringify.js.map +1 -0
- package/dist/node_modules/domutils/lib/traversal.js +2 -0
- package/dist/node_modules/domutils/lib/traversal.js.map +1 -0
- package/dist/node_modules/entities/dist/commonjs/decode-codepoint.js +2 -0
- package/dist/node_modules/entities/dist/commonjs/decode-codepoint.js.map +1 -0
- package/dist/node_modules/entities/dist/commonjs/decode.js +2 -0
- package/dist/node_modules/entities/dist/commonjs/decode.js.map +1 -0
- package/dist/node_modules/entities/dist/commonjs/generated/decode-data-html.js +2 -0
- package/dist/node_modules/entities/dist/commonjs/generated/decode-data-html.js.map +1 -0
- package/dist/node_modules/entities/dist/commonjs/generated/decode-data-xml.js +2 -0
- package/dist/node_modules/entities/dist/commonjs/generated/decode-data-xml.js.map +1 -0
- package/dist/node_modules/fault/index.js +2 -0
- package/dist/node_modules/fault/index.js.map +1 -0
- package/dist/node_modules/format/format.js +2 -0
- package/dist/node_modules/format/format.js.map +1 -0
- package/dist/node_modules/highlight.js/lib/core.js +2 -0
- package/dist/node_modules/highlight.js/lib/core.js.map +1 -0
- package/dist/node_modules/html-dom-parser/lib/server/html-to-dom.js +1 -1
- package/dist/node_modules/html-dom-parser/lib/server/html-to-dom.js.map +1 -1
- package/dist/node_modules/html-react-parser/lib/index.js +1 -1
- package/dist/node_modules/html-react-parser/lib/index.js.map +1 -1
- package/dist/node_modules/htmlparser2/dist/commonjs/Parser.js +1 -1
- package/dist/node_modules/htmlparser2/dist/commonjs/Parser.js.map +1 -1
- package/dist/node_modules/htmlparser2/dist/commonjs/Tokenizer.js +1 -1
- package/dist/node_modules/htmlparser2/dist/commonjs/Tokenizer.js.map +1 -1
- package/dist/node_modules/htmlparser2/dist/commonjs/index.js +1 -1
- package/dist/node_modules/htmlparser2/dist/commonjs/index.js.map +1 -1
- package/dist/node_modules/lowlight/lib/core.js +2 -0
- package/dist/node_modules/lowlight/lib/core.js.map +1 -0
- package/dist/node_modules/nanoid/index.js +2 -0
- package/dist/node_modules/nanoid/index.js.map +1 -0
- package/dist/node_modules/nanoid/url-alphabet/index.js +2 -0
- package/dist/node_modules/nanoid/url-alphabet/index.js.map +1 -0
- package/dist/node_modules/react-syntax-highlighter/dist/esm/checkForListedLanguage.js +2 -0
- package/dist/node_modules/react-syntax-highlighter/dist/esm/checkForListedLanguage.js.map +1 -0
- package/dist/node_modules/react-syntax-highlighter/dist/esm/create-element.js +2 -0
- package/dist/node_modules/react-syntax-highlighter/dist/esm/create-element.js.map +1 -0
- package/dist/node_modules/react-syntax-highlighter/dist/esm/highlight.js +2 -0
- package/dist/node_modules/react-syntax-highlighter/dist/esm/highlight.js.map +1 -0
- package/dist/node_modules/react-syntax-highlighter/dist/esm/light.js +2 -0
- package/dist/node_modules/react-syntax-highlighter/dist/esm/light.js.map +1 -0
- package/dist/node_modules/react-syntax-highlighter/dist/esm/styles/hljs/stackoverflow-dark.js +2 -0
- package/dist/node_modules/react-syntax-highlighter/dist/esm/styles/hljs/stackoverflow-dark.js.map +1 -0
- package/dist/node_modules/react-syntax-highlighter/dist/esm/styles/hljs/stackoverflow-light.js +2 -0
- package/dist/node_modules/react-syntax-highlighter/dist/esm/styles/hljs/stackoverflow-light.js.map +1 -0
- package/dist/node_modules/style-to-object/cjs/index.js +1 -1
- package/dist/node_modules/yup/index.esm.js +1 -1
- package/dist/src/assets/icons/AddRow.svg.js +1 -1
- package/dist/src/assets/icons/AddRow.svg.js.map +1 -1
- package/dist/src/assets/icons/ApiIcon.svg.js +2 -0
- package/dist/src/assets/icons/ApiIcon.svg.js.map +1 -0
- package/dist/src/assets/icons/ArrowBack.svg.js +2 -0
- package/dist/src/assets/icons/ArrowBack.svg.js.map +1 -0
- package/dist/src/assets/icons/BookIcon.svg.js +2 -0
- package/dist/src/assets/icons/BookIcon.svg.js.map +1 -0
- package/dist/src/assets/icons/CopySticker.svg.js +2 -0
- package/dist/src/assets/icons/CopySticker.svg.js.map +1 -0
- package/dist/src/assets/icons/DeleteIcon.svg.js +1 -1
- package/dist/src/assets/icons/DeleteIcon.svg.js.map +1 -1
- package/dist/src/assets/icons/DeleteOutlinedIcon.svg.js +2 -0
- package/dist/src/assets/icons/DeleteOutlinedIcon.svg.js.map +1 -0
- package/dist/src/assets/icons/DownArrow.svg.js +1 -1
- package/dist/src/assets/icons/DownArrow.svg.js.map +1 -1
- package/dist/src/assets/icons/EditIcon.svg.js +1 -1
- package/dist/src/assets/icons/EditIcon.svg.js.map +1 -1
- package/dist/src/assets/icons/FilterIcon.svg.js +2 -0
- package/dist/src/assets/icons/FilterIcon.svg.js.map +1 -0
- package/dist/src/assets/icons/Plus.svg.js +2 -0
- package/dist/src/assets/icons/Plus.svg.js.map +1 -0
- package/dist/src/assets/icons/PlusSquare.svg.js +2 -0
- package/dist/src/assets/icons/PlusSquare.svg.js.map +1 -0
- package/dist/src/assets/icons/RequestOption.svg.js +2 -0
- package/dist/src/assets/icons/RequestOption.svg.js.map +1 -0
- package/dist/src/assets/icons/UpArrow.svg.js +1 -1
- package/dist/src/assets/icons/UpArrow.svg.js.map +1 -1
- package/dist/src/assets/icons/arrowDownGray.svg.js +2 -0
- package/dist/src/assets/icons/arrowDownGray.svg.js.map +1 -0
- package/dist/src/assets/icons/arrowRightGray.svg.js +2 -0
- package/dist/src/assets/icons/arrowRightGray.svg.js.map +1 -0
- package/dist/src/assets/icons/close-circle.svg.js +2 -0
- package/dist/src/assets/icons/close-circle.svg.js.map +1 -0
- package/dist/src/assets/icons/copy.svg.js +2 -0
- package/dist/src/assets/icons/copy.svg.js.map +1 -0
- package/dist/src/assets/icons/document.svg.js +2 -0
- package/dist/src/assets/icons/document.svg.js.map +1 -0
- package/dist/src/assets/icons/eye.svg.js +2 -0
- package/dist/src/assets/icons/eye.svg.js.map +1 -0
- package/dist/src/assets/icons/infoIcon.svg.js +2 -0
- package/dist/src/assets/icons/infoIcon.svg.js.map +1 -0
- package/dist/src/assets/icons/searchIcon.svg.js +2 -0
- package/dist/src/assets/icons/searchIcon.svg.js.map +1 -0
- package/dist/src/components/InfoForm/InfoForm.js +1 -1
- package/dist/src/components/InfoForm/InfoForm.js.map +1 -1
- package/dist/src/components/JsonInput/JsonInput.js.map +1 -1
- package/dist/src/components/LivePreview/LivePreview.js +1 -1
- package/dist/src/components/LivePreview/LivePreview.js.map +1 -1
- package/dist/src/components/MethodAccordion/MethodAccordion.js +1 -1
- package/dist/src/components/MethodAccordion/MethodAccordion.js.map +1 -1
- package/dist/src/components/SVGLoader/SVGLoader.js.map +1 -1
- package/dist/src/components/SectionHead/SectionHead.js.map +1 -1
- package/dist/src/components/SimpleLabelValue/SimpleLabelValue.js.map +1 -1
- package/dist/src/components/Tooltip/Tooltip.js.map +1 -1
- package/dist/src/components/dialog/index.js +1 -1
- package/dist/src/components/dialog/index.js.map +1 -1
- package/dist/src/components/table/table.js +1 -1
- package/dist/src/components/table/table.js.map +1 -1
- package/dist/src/components/table/tags-table.js.map +1 -1
- package/dist/src/constants/index.js +1 -1
- package/dist/src/constants/index.js.map +1 -1
- package/dist/src/constants/methods.constant.js +2 -0
- package/dist/src/constants/methods.constant.js.map +1 -0
- package/dist/src/constants/regex.js.map +1 -1
- package/dist/src/helpers/docs.helper.js +2 -0
- package/dist/src/helpers/docs.helper.js.map +1 -0
- package/dist/src/helpers/layout.helper.js +1 -1
- package/dist/src/helpers/layout.helper.js.map +1 -1
- package/dist/src/helpers/methodAccordion.helper.js.map +1 -1
- package/dist/src/index.js +1 -1
- package/dist/src/layout/docsComponents/Codebox/Codebox.js +2 -0
- package/dist/src/layout/docsComponents/Codebox/Codebox.js.map +1 -0
- package/dist/src/layout/docsComponents/Codebox/style.module.scss.js +2 -0
- package/dist/src/layout/docsComponents/Codebox/style.module.scss.js.map +1 -0
- package/dist/src/layout/docsComponents/DocsAside/DocsAside.js +2 -0
- package/dist/src/layout/docsComponents/DocsAside/DocsAside.js.map +1 -0
- package/dist/src/layout/docsComponents/DocsAside/style.module.scss.js +2 -0
- package/dist/src/layout/docsComponents/DocsAside/style.module.scss.js.map +1 -0
- package/dist/src/layout/docsComponents/DocsContent/DocsContent.js +2 -0
- package/dist/src/layout/docsComponents/DocsContent/DocsContent.js.map +1 -0
- package/dist/src/layout/docsComponents/DocsContent/EndpointPage/index.js +2 -0
- package/dist/src/layout/docsComponents/DocsContent/EndpointPage/index.js.map +1 -0
- package/dist/src/layout/docsComponents/DocsContent/TagPage/index.js +2 -0
- package/dist/src/layout/docsComponents/DocsContent/TagPage/index.js.map +1 -0
- package/dist/src/layout/docsComponents/DocsHeader/DocsHeader.js +2 -0
- package/dist/src/layout/docsComponents/DocsHeader/DocsHeader.js.map +1 -0
- package/dist/src/layout/docsComponents/DocsHeader/DocsHeader.module.scss.js +2 -0
- package/dist/src/layout/docsComponents/DocsHeader/DocsHeader.module.scss.js.map +1 -0
- package/dist/src/layout/docsComponents/DocsSideMenuTree/DocsSideMenuTree.js +2 -0
- package/dist/src/layout/docsComponents/DocsSideMenuTree/DocsSideMenuTree.js.map +1 -0
- package/dist/src/layout/docsComponents/index.js +2 -0
- package/dist/src/layout/docsComponents/index.js.map +1 -0
- package/dist/src/layout/docsLayout.js +2 -0
- package/dist/src/layout/docsLayout.js.map +1 -0
- package/dist/src/layout/layout.js +1 -1
- package/dist/src/layout/layout.js.map +1 -1
- package/dist/src/layout/layout.module.css.js +1 -1
- package/dist/src/utils/index.js +2 -0
- package/dist/src/utils/index.js.map +1 -0
- package/dist/src/validator/form.scheme.js +1 -1
- package/dist/src/validator/form.scheme.js.map +1 -1
- package/dist/styles.css +1646 -348
- package/dist/types/assets/icons/index.d.ts +17 -1
- package/dist/types/components/LivePreview/LivePreview.d.ts +1 -0
- package/dist/types/components/MethodAccordion/MethodAccordion.d.ts +2 -1
- package/dist/types/components/dialog/dialog.d.ts +4 -0
- package/dist/types/components/dialog/index.d.ts +1 -1
- package/dist/types/components/table/table.d.ts +2 -1
- package/dist/types/constants/methods.constant.d.ts +16 -0
- package/dist/types/helpers/docs.helper.d.ts +3 -0
- package/dist/types/index.d.ts +1 -0
- package/dist/types/layout/docsComponents/Codebox/Codebox.d.ts +4 -0
- package/dist/types/layout/docsComponents/DocsAside/DocsAside.d.ts +5 -0
- package/dist/types/layout/docsComponents/DocsContent/DocsContent.d.ts +6 -0
- package/dist/types/layout/docsComponents/DocsContent/EndpointPage/index.d.ts +4 -0
- package/dist/types/layout/docsComponents/DocsContent/TagPage/index.d.ts +4 -0
- package/dist/types/layout/docsComponents/DocsHeader/DocsHeader.d.ts +3 -0
- package/dist/types/layout/docsComponents/DocsSideMenuTree/DocsSideMenuTree.d.ts +9 -0
- package/dist/types/layout/docsComponents/index.d.ts +17 -0
- package/dist/types/layout/docsLayout.d.ts +33 -0
- package/dist/types/layout/layout.d.ts +2 -1
- package/dist/types/types/layout.type.d.ts +1 -0
- package/dist/types/types/openApi.d.ts +4 -4
- package/dist/types/utils/index.d.ts +1 -0
- package/dist/types/validator/form.scheme.d.ts +10 -2
- package/package.json +46 -43
- package/rollup.config.js +37 -35
- package/src/assets/icons/AddRow.svg +3 -3
- package/src/assets/icons/ApiIcon.svg +12 -0
- package/src/assets/icons/ArrowBack.svg +3 -0
- package/src/assets/icons/BookIcon.svg +6 -0
- package/src/assets/icons/CheckMarkSquare.svg +5 -5
- package/src/assets/icons/CloseIcon.svg +4 -4
- package/src/assets/icons/CopySticker.svg +6 -0
- package/src/assets/icons/DeleteIcon.svg +3 -3
- package/src/assets/icons/DeleteOutlinedIcon.svg +8 -0
- package/src/assets/icons/DownArrow.svg +3 -3
- package/src/assets/icons/EditIcon.svg +3 -3
- package/src/assets/icons/FilterIcon.svg +4 -0
- package/src/assets/icons/Plus.svg +5 -0
- package/src/assets/icons/PlusSquare.svg +3 -0
- package/src/assets/icons/RequestOption.svg +5 -0
- package/src/assets/icons/UpArrow.svg +3 -3
- package/src/assets/icons/arrowDownGray.svg +3 -0
- package/src/assets/icons/arrowRightGray.svg +3 -0
- package/src/assets/icons/close-circle.svg +5 -0
- package/src/assets/icons/copy.svg +4 -0
- package/src/assets/icons/deleteOutlinedIcon.svg +8 -8
- package/src/assets/icons/document.svg +6 -0
- package/src/assets/icons/eye.svg +4 -0
- package/src/assets/icons/index.ts +24 -8
- package/src/assets/icons/infoIcon.svg +5 -0
- package/src/assets/icons/searchIcon.svg +4 -0
- package/src/components/Chips/Chips.tsx +87 -87
- package/src/components/Chips/style.scss +147 -147
- package/src/components/InfoForm/InfoForm.module.scss +165 -165
- package/src/components/InfoForm/InfoForm.tsx +423 -428
- package/src/components/JsonInput/JsonInput.tsx +149 -149
- package/src/components/JsonInput/style.module.scss +133 -133
- package/src/components/LivePreview/LivePreview.module.scss +180 -24
- package/src/components/LivePreview/LivePreview.tsx +226 -191
- package/src/components/MethodAccordion/MethodAccordion.module.scss +395 -338
- package/src/components/MethodAccordion/MethodAccordion.tsx +678 -514
- package/src/components/SVGLoader/SVGLoader.tsx +96 -94
- package/src/components/SectionHead/SectionHead.scss +29 -29
- package/src/components/SectionHead/SectionHead.tsx +22 -22
- package/src/components/SimpleLabelValue/SimpleLabelValue.tsx +31 -31
- package/src/components/SimpleLabelValue/index.ts +1 -1
- package/src/components/SimpleLabelValue/style.scss +30 -30
- package/src/components/Tooltip/Tooltip.scss +133 -133
- package/src/components/Tooltip/Tooltip.tsx +85 -85
- package/src/components/_global.scss +337 -337
- package/src/components/dialog/dialog.ts +58 -54
- package/src/components/dialog/index.tsx +89 -85
- package/src/components/dialog/style.scss +188 -104
- package/src/components/table/style.scss +217 -190
- package/src/components/table/table.tsx +493 -327
- package/src/components/table/tags-table.tsx +348 -348
- package/src/constants/index.ts +95 -93
- package/src/constants/methods.constant.ts +26 -0
- package/src/constants/regex.ts +7 -7
- package/src/global.d.ts +13 -13
- package/src/helpers/docs.helper.ts +28 -0
- package/src/helpers/layout.helper.ts +176 -174
- package/src/helpers/methodAccordion.helper.ts +19 -19
- package/src/index.ts +2 -1
- package/src/layout/docsComponents/Codebox/Codebox.tsx +61 -0
- package/src/layout/docsComponents/Codebox/style.module.scss +43 -0
- package/src/layout/docsComponents/DocsAside/DocsAside.tsx +94 -0
- package/src/layout/docsComponents/DocsAside/style.module.scss +113 -0
- package/src/layout/docsComponents/DocsContent/DocsContent.tsx +14 -0
- package/src/layout/docsComponents/DocsContent/EndpointPage/index.tsx +184 -0
- package/src/layout/docsComponents/DocsContent/EndpointPage/style.scss +230 -0
- package/src/layout/docsComponents/DocsContent/TagPage/index.tsx +82 -0
- package/src/layout/docsComponents/DocsContent/TagPage/style.scss +283 -0
- package/src/layout/docsComponents/DocsContent/style.scss +0 -0
- package/src/layout/docsComponents/DocsHeader/DocsHeader.module.scss +271 -0
- package/src/layout/docsComponents/DocsHeader/DocsHeader.tsx +156 -0
- package/src/layout/docsComponents/DocsSideMenuTree/DocsSideMenuTree.tsx +188 -0
- package/src/layout/docsComponents/DocsSideMenuTree/style.scss +195 -0
- package/src/layout/docsComponents/index.scss +49 -0
- package/src/layout/docsComponents/index.tsx +28 -0
- package/src/layout/docsLayout.tsx +72 -0
- package/src/layout/layout.module.css +65 -62
- package/src/layout/layout.tsx +162 -150
- package/src/types/layout.type.ts +31 -30
- package/src/types/openApi.ts +108 -108
- package/src/types/transformedOpenApi.ts +52 -52
- package/src/utils/index.ts +7 -0
- package/src/validator/form.scheme.ts +88 -70
- package/tsconfig.json +33 -33
- package/dist/_virtual/index20.js +0 -2
- package/dist/_virtual/index20.js.map +0 -1
- package/dist/_virtual/index21.js +0 -2
- package/dist/_virtual/index21.js.map +0 -1
- package/dist/_virtual/node2.js +0 -2
- package/dist/_virtual/node2.js.map +0 -1
- package/dist/_virtual/node3.js +0 -2
- package/dist/_virtual/node3.js.map +0 -1
- package/dist/node_modules/html-dom-parser/node_modules/domhandler/lib/index.js +0 -2
- package/dist/node_modules/html-dom-parser/node_modules/domhandler/lib/index.js.map +0 -1
- package/dist/node_modules/html-dom-parser/node_modules/domhandler/lib/node.js +0 -2
- package/dist/node_modules/html-dom-parser/node_modules/domhandler/lib/node.js.map +0 -1
- package/dist/node_modules/html-react-parser/node_modules/domhandler/lib/index.js +0 -2
- package/dist/node_modules/html-react-parser/node_modules/domhandler/lib/index.js.map +0 -1
- package/dist/node_modules/html-react-parser/node_modules/domhandler/lib/node.js +0 -2
- package/dist/node_modules/html-react-parser/node_modules/domhandler/lib/node.js.map +0 -1
- package/dist/node_modules/htmlparser2/node_modules/dom-serializer/lib/foreignNames.js +0 -2
- package/dist/node_modules/htmlparser2/node_modules/dom-serializer/lib/foreignNames.js.map +0 -1
- package/dist/node_modules/htmlparser2/node_modules/dom-serializer/lib/index.js +0 -2
- package/dist/node_modules/htmlparser2/node_modules/dom-serializer/lib/index.js.map +0 -1
- package/dist/node_modules/htmlparser2/node_modules/dom-serializer/node_modules/entities/lib/decode.js +0 -2
- package/dist/node_modules/htmlparser2/node_modules/dom-serializer/node_modules/entities/lib/decode.js.map +0 -1
- package/dist/node_modules/htmlparser2/node_modules/dom-serializer/node_modules/entities/lib/decode_codepoint.js +0 -2
- package/dist/node_modules/htmlparser2/node_modules/dom-serializer/node_modules/entities/lib/decode_codepoint.js.map +0 -1
- package/dist/node_modules/htmlparser2/node_modules/dom-serializer/node_modules/entities/lib/encode.js +0 -2
- package/dist/node_modules/htmlparser2/node_modules/dom-serializer/node_modules/entities/lib/encode.js.map +0 -1
- package/dist/node_modules/htmlparser2/node_modules/dom-serializer/node_modules/entities/lib/escape.js +0 -2
- package/dist/node_modules/htmlparser2/node_modules/dom-serializer/node_modules/entities/lib/escape.js.map +0 -1
- package/dist/node_modules/htmlparser2/node_modules/dom-serializer/node_modules/entities/lib/generated/decode-data-html.js +0 -2
- package/dist/node_modules/htmlparser2/node_modules/dom-serializer/node_modules/entities/lib/generated/decode-data-html.js.map +0 -1
- package/dist/node_modules/htmlparser2/node_modules/dom-serializer/node_modules/entities/lib/generated/decode-data-xml.js +0 -2
- package/dist/node_modules/htmlparser2/node_modules/dom-serializer/node_modules/entities/lib/generated/decode-data-xml.js.map +0 -1
- package/dist/node_modules/htmlparser2/node_modules/dom-serializer/node_modules/entities/lib/generated/encode-html.js +0 -2
- package/dist/node_modules/htmlparser2/node_modules/dom-serializer/node_modules/entities/lib/generated/encode-html.js.map +0 -1
- package/dist/node_modules/htmlparser2/node_modules/dom-serializer/node_modules/entities/lib/index.js +0 -2
- package/dist/node_modules/htmlparser2/node_modules/dom-serializer/node_modules/entities/lib/index.js.map +0 -1
- package/dist/node_modules/htmlparser2/node_modules/domhandler/lib/index.js +0 -2
- package/dist/node_modules/htmlparser2/node_modules/domhandler/lib/index.js.map +0 -1
- package/dist/node_modules/htmlparser2/node_modules/domhandler/lib/node.js +0 -2
- package/dist/node_modules/htmlparser2/node_modules/domhandler/lib/node.js.map +0 -1
- package/dist/node_modules/htmlparser2/node_modules/domutils/lib/feeds.js +0 -2
- package/dist/node_modules/htmlparser2/node_modules/domutils/lib/feeds.js.map +0 -1
- package/dist/node_modules/htmlparser2/node_modules/domutils/lib/helpers.js +0 -2
- package/dist/node_modules/htmlparser2/node_modules/domutils/lib/helpers.js.map +0 -1
- package/dist/node_modules/htmlparser2/node_modules/domutils/lib/index.js +0 -2
- package/dist/node_modules/htmlparser2/node_modules/domutils/lib/index.js.map +0 -1
- package/dist/node_modules/htmlparser2/node_modules/domutils/lib/legacy.js +0 -2
- package/dist/node_modules/htmlparser2/node_modules/domutils/lib/legacy.js.map +0 -1
- package/dist/node_modules/htmlparser2/node_modules/domutils/lib/manipulation.js +0 -2
- package/dist/node_modules/htmlparser2/node_modules/domutils/lib/manipulation.js.map +0 -1
- package/dist/node_modules/htmlparser2/node_modules/domutils/lib/querying.js +0 -2
- package/dist/node_modules/htmlparser2/node_modules/domutils/lib/querying.js.map +0 -1
- package/dist/node_modules/htmlparser2/node_modules/domutils/lib/stringify.js +0 -2
- package/dist/node_modules/htmlparser2/node_modules/domutils/lib/stringify.js.map +0 -1
- package/dist/node_modules/htmlparser2/node_modules/domutils/lib/traversal.js +0 -2
- package/dist/node_modules/htmlparser2/node_modules/domutils/lib/traversal.js.map +0 -1
- package/dist/node_modules/htmlparser2/node_modules/entities/dist/commonjs/decode-codepoint.js +0 -2
- package/dist/node_modules/htmlparser2/node_modules/entities/dist/commonjs/decode-codepoint.js.map +0 -1
- package/dist/node_modules/htmlparser2/node_modules/entities/dist/commonjs/decode.js +0 -2
- package/dist/node_modules/htmlparser2/node_modules/entities/dist/commonjs/decode.js.map +0 -1
- package/dist/node_modules/htmlparser2/node_modules/entities/dist/commonjs/generated/decode-data-html.js +0 -2
- package/dist/node_modules/htmlparser2/node_modules/entities/dist/commonjs/generated/decode-data-html.js.map +0 -1
- package/dist/node_modules/htmlparser2/node_modules/entities/dist/commonjs/generated/decode-data-xml.js +0 -2
- package/dist/node_modules/htmlparser2/node_modules/entities/dist/commonjs/generated/decode-data-xml.js.map +0 -1
- package/dist/src/assets/icons/CheckMarkSquare.svg.js +0 -2
- package/dist/src/assets/icons/CheckMarkSquare.svg.js.map +0 -1
- package/dist/src/assets/icons/CloseIcon.svg.js +0 -2
- package/dist/src/assets/icons/CloseIcon.svg.js.map +0 -1
- package/dist/src/assets/icons/deleteOutlinedIcon.svg.js +0 -2
- package/dist/src/assets/icons/deleteOutlinedIcon.svg.js.map +0 -1
- package/dist/src/components/Chips/Chips.js +0 -2
- package/dist/src/components/Chips/Chips.js.map +0 -1
- package/dist/types/types/index.d.ts +0 -18
package/src/layout/layout.tsx
CHANGED
|
@@ -1,150 +1,162 @@
|
|
|
1
|
-
import { JSX, useEffect, useState } from 'react'
|
|
2
|
-
import { Alert, Button } from 'digitinary-ui'
|
|
3
|
-
import MethodsAccordion from '../components/MethodAccordion/MethodAccordion'
|
|
4
|
-
import styles from './layout.module.css'
|
|
5
|
-
import InfoForm from '../components/InfoForm/InfoForm'
|
|
6
|
-
import SectionHead from '../components/SectionHead/SectionHead'
|
|
7
|
-
import { transformOpenApiObject, transformOpenApiObjectToOrigin } from '../helpers/layout.helper'
|
|
8
|
-
import { OpenAPIFile } from '../types/openApi'
|
|
9
|
-
import LivePreview from '../components/LivePreview/LivePreview'
|
|
10
|
-
import { FormikProvider, useFormik } from 'formik'
|
|
11
|
-
import { schemaValidation } from '../validator/form.scheme'
|
|
12
|
-
import { TransformedOpenApi } from '@entities/transformedOpenApi'
|
|
13
|
-
import { methodColorMapping } from '../constants/index'
|
|
14
|
-
import CommonDialog from '../components/dialog'
|
|
15
|
-
|
|
16
|
-
interface ILayoutProps {
|
|
17
|
-
openApiJson?: OpenAPIFile
|
|
18
|
-
handleSave?: (values: unknown) => unknown
|
|
19
|
-
setIsFormDirty?: any
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
const
|
|
25
|
-
const
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
const
|
|
42
|
-
const [
|
|
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
|
-
|
|
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
|
-
|
|
1
|
+
import { JSX, useEffect, useState } from 'react'
|
|
2
|
+
import { Alert, Button } from 'digitinary-ui'
|
|
3
|
+
import MethodsAccordion from '../components/MethodAccordion/MethodAccordion'
|
|
4
|
+
import styles from './layout.module.css'
|
|
5
|
+
import InfoForm from '../components/InfoForm/InfoForm'
|
|
6
|
+
import SectionHead from '../components/SectionHead/SectionHead'
|
|
7
|
+
import { transformOpenApiObject, transformOpenApiObjectToOrigin } from '../helpers/layout.helper'
|
|
8
|
+
import { OpenAPIFile } from '../types/openApi'
|
|
9
|
+
import LivePreview from '../components/LivePreview/LivePreview'
|
|
10
|
+
import { FormikProvider, useFormik } from 'formik'
|
|
11
|
+
import { schemaValidation } from '../validator/form.scheme'
|
|
12
|
+
import { TransformedOpenApi } from '@entities/transformedOpenApi'
|
|
13
|
+
import { methodColorMapping } from '../constants/index'
|
|
14
|
+
import CommonDialog from '../components/dialog'
|
|
15
|
+
|
|
16
|
+
interface ILayoutProps {
|
|
17
|
+
openApiJson?: OpenAPIFile
|
|
18
|
+
handleSave?: (values: unknown) => unknown
|
|
19
|
+
setIsFormDirty?: any
|
|
20
|
+
openApiErrors?: any
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
const Layout = ({ openApiJson, handleSave, setIsFormDirty, openApiErrors }: ILayoutProps): JSX.Element => {
|
|
24
|
+
const clonedOpenApiJson = structuredClone(openApiJson)
|
|
25
|
+
const transformedOpenApi = transformOpenApiObject(clonedOpenApiJson)
|
|
26
|
+
const formik = useFormik<TransformedOpenApi>({
|
|
27
|
+
initialValues: structuredClone(transformedOpenApi),
|
|
28
|
+
validationSchema: schemaValidation,
|
|
29
|
+
validateOnMount: true,
|
|
30
|
+
onSubmit: (values, { validateForm, resetForm }) => {
|
|
31
|
+
// Handle save logic
|
|
32
|
+
const originalOpenApiForm = transformOpenApiObjectToOrigin(values)
|
|
33
|
+
handleSave(originalOpenApiForm)
|
|
34
|
+
resetForm({
|
|
35
|
+
values: values, // You can reset it to the same values if you want
|
|
36
|
+
})
|
|
37
|
+
|
|
38
|
+
validateForm(values)
|
|
39
|
+
},
|
|
40
|
+
})
|
|
41
|
+
const { dirty, isValid, isSubmitting, values, setFieldValue, handleSubmit } = formik
|
|
42
|
+
const [isPublishDialogOpen, setIsPublishDialogOpen] = useState(false)
|
|
43
|
+
const [openMethodIndex, setOpenMethodIndex] = useState<number | null>(null)
|
|
44
|
+
|
|
45
|
+
useEffect(() => {
|
|
46
|
+
if (setIsFormDirty) {
|
|
47
|
+
setIsFormDirty(dirty)
|
|
48
|
+
}
|
|
49
|
+
}, [dirty])
|
|
50
|
+
|
|
51
|
+
return (
|
|
52
|
+
<div className={styles.docsLayout}>
|
|
53
|
+
{dirty && (
|
|
54
|
+
<Alert className={styles.apiDocAlert} color="warning" severity="warning">
|
|
55
|
+
There are changes you made may not be saved
|
|
56
|
+
</Alert>
|
|
57
|
+
)}
|
|
58
|
+
<div className={styles.layoutContainer}>
|
|
59
|
+
<div className={`${styles.editorSide} ${styles.docSide}`}>
|
|
60
|
+
<SectionHead
|
|
61
|
+
className={styles.editorSectionHead_title}
|
|
62
|
+
text={
|
|
63
|
+
<div className={styles.editorSectionHead_content}>
|
|
64
|
+
API Documentation
|
|
65
|
+
<Button
|
|
66
|
+
className={styles.methodForm_submitBtn}
|
|
67
|
+
size="medium"
|
|
68
|
+
fullWidth={false}
|
|
69
|
+
type="submit"
|
|
70
|
+
variant="contained"
|
|
71
|
+
color="primary"
|
|
72
|
+
onClick={() => setIsPublishDialogOpen(true)}
|
|
73
|
+
disabled={!isValid || isSubmitting || !dirty}
|
|
74
|
+
>
|
|
75
|
+
Save
|
|
76
|
+
</Button>
|
|
77
|
+
</div>
|
|
78
|
+
}
|
|
79
|
+
/>
|
|
80
|
+
<FormikProvider value={formik}>
|
|
81
|
+
<InfoForm />
|
|
82
|
+
</FormikProvider>
|
|
83
|
+
<SectionHead className={styles.editorSectionHead} text="Endpoints" />
|
|
84
|
+
<FormikProvider value={formik}>
|
|
85
|
+
{values.paths.map((path, pathIndex) => (
|
|
86
|
+
<>
|
|
87
|
+
{path.methods
|
|
88
|
+
.sort(
|
|
89
|
+
(a, b) => methodColorMapping[a.type].order - methodColorMapping[b.type].order
|
|
90
|
+
)
|
|
91
|
+
.map((method, methodIndex) => (
|
|
92
|
+
<MethodsAccordion
|
|
93
|
+
tags={values.tags}
|
|
94
|
+
method={method}
|
|
95
|
+
path={path.path}
|
|
96
|
+
setFieldValue={(key, value) => {
|
|
97
|
+
const h = `paths[${pathIndex}].methods[${methodIndex}].${key}`
|
|
98
|
+
setFieldValue(h, value)
|
|
99
|
+
}}
|
|
100
|
+
isOpen={openMethodIndex === methodIndex}
|
|
101
|
+
setIsOpen={(open) => setOpenMethodIndex(open ? methodIndex : null)}
|
|
102
|
+
errors={(formik.errors.paths?.[pathIndex] as any)?.methods?.[methodIndex]}
|
|
103
|
+
/>
|
|
104
|
+
))}
|
|
105
|
+
</>
|
|
106
|
+
))}
|
|
107
|
+
</FormikProvider>
|
|
108
|
+
</div>
|
|
109
|
+
<div className={`${styles.livePreviewSide} ${styles.docSide}`}>
|
|
110
|
+
{transformedOpenApi && (
|
|
111
|
+
<FormikProvider value={formik}>
|
|
112
|
+
<LivePreview transformedData={transformedOpenApi} openApiErrors={openApiErrors}/>
|
|
113
|
+
</FormikProvider>
|
|
114
|
+
)}
|
|
115
|
+
</div>
|
|
116
|
+
</div>
|
|
117
|
+
<CommonDialog
|
|
118
|
+
status="warning"
|
|
119
|
+
content={
|
|
120
|
+
<>
|
|
121
|
+
<h5 style={{
|
|
122
|
+
fontWeight: 600,
|
|
123
|
+
fontSize: '1.5rem',
|
|
124
|
+
lineHeight: '1.875rem',
|
|
125
|
+
color: '#FAAD14',
|
|
126
|
+
textAlign: 'center',
|
|
127
|
+
margin: 0
|
|
128
|
+
}}>Publish Changes</h5>
|
|
129
|
+
<p
|
|
130
|
+
style={{
|
|
131
|
+
textAlign: 'center',
|
|
132
|
+
fontWeight: 400,
|
|
133
|
+
fontSize: '1rem',
|
|
134
|
+
lineHeight: '1.4375rem',
|
|
135
|
+
}}
|
|
136
|
+
>
|
|
137
|
+
Are you sure to Publish the changes?
|
|
138
|
+
</p>
|
|
139
|
+
</>
|
|
140
|
+
}
|
|
141
|
+
onSubmit={{
|
|
142
|
+
onClick: () => {
|
|
143
|
+
handleSubmit()
|
|
144
|
+
setIsPublishDialogOpen(false)
|
|
145
|
+
},
|
|
146
|
+
text: 'Publish',
|
|
147
|
+
color: 'warning',
|
|
148
|
+
fullWidth: true,
|
|
149
|
+
}}
|
|
150
|
+
onCancel={{
|
|
151
|
+
text: 'Cancel',
|
|
152
|
+
color: 'action',
|
|
153
|
+
fullWidth: true,
|
|
154
|
+
}}
|
|
155
|
+
onClose={() => setIsPublishDialogOpen(false)}
|
|
156
|
+
open={isPublishDialogOpen}
|
|
157
|
+
/>
|
|
158
|
+
</div>
|
|
159
|
+
)
|
|
160
|
+
}
|
|
161
|
+
|
|
162
|
+
export default Layout
|
package/src/types/layout.type.ts
CHANGED
|
@@ -1,30 +1,31 @@
|
|
|
1
|
-
import { HTTPMethod } from './openApi'
|
|
2
|
-
|
|
3
|
-
export type TransformedMethod = {
|
|
4
|
-
type: HTTPMethod
|
|
5
|
-
tags: string[]
|
|
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
|
-
|
|
1
|
+
import { HTTPMethod } from './openApi'
|
|
2
|
+
|
|
3
|
+
export type TransformedMethod = {
|
|
4
|
+
type: HTTPMethod
|
|
5
|
+
tags: string[]
|
|
6
|
+
summary?: string
|
|
7
|
+
parameters: any
|
|
8
|
+
requestBody: {
|
|
9
|
+
content: {
|
|
10
|
+
contentType: string
|
|
11
|
+
schema: {
|
|
12
|
+
properties: string
|
|
13
|
+
type: string
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
responses: {
|
|
18
|
+
code: string
|
|
19
|
+
content: {
|
|
20
|
+
contentType?: string
|
|
21
|
+
schema?: unknown
|
|
22
|
+
}
|
|
23
|
+
}[]
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
export type TransformedPath = {
|
|
27
|
+
path: string
|
|
28
|
+
methods: TransformedMethod[]
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
export type TransformedPathsArray = TransformedPath[]
|
package/src/types/openApi.ts
CHANGED
|
@@ -1,108 +1,108 @@
|
|
|
1
|
-
export interface OpenAPIFile {
|
|
2
|
-
openapi: string
|
|
3
|
-
info: {
|
|
4
|
-
title: string
|
|
5
|
-
description
|
|
6
|
-
version: string
|
|
7
|
-
}
|
|
8
|
-
servers?: {
|
|
9
|
-
url: string
|
|
10
|
-
description?: string
|
|
11
|
-
}[]
|
|
12
|
-
paths: {
|
|
13
|
-
[path: string]: Partial<
|
|
14
|
-
Record<
|
|
15
|
-
HTTPMethod,
|
|
16
|
-
{
|
|
17
|
-
tags: string[]
|
|
18
|
-
responses: Responses
|
|
19
|
-
summary?: string
|
|
20
|
-
description?: string
|
|
21
|
-
parameters?: Parameter[]
|
|
22
|
-
requestBody?: RequestBody
|
|
23
|
-
}
|
|
24
|
-
>
|
|
25
|
-
>
|
|
26
|
-
}
|
|
27
|
-
components?: {
|
|
28
|
-
schemas?: {
|
|
29
|
-
[schemaName: string]: Schema
|
|
30
|
-
}
|
|
31
|
-
securitySchemes?: {
|
|
32
|
-
[schemeName: string]: SecurityScheme
|
|
33
|
-
}
|
|
34
|
-
}
|
|
35
|
-
security?: {
|
|
36
|
-
[schemeName: string]: string[]
|
|
37
|
-
}[]
|
|
38
|
-
tags?: {
|
|
39
|
-
name: string
|
|
40
|
-
description?: string
|
|
41
|
-
externalDocs?: {
|
|
42
|
-
url: string
|
|
43
|
-
description: string
|
|
44
|
-
}[]
|
|
45
|
-
}[]
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
export interface Tags {
|
|
49
|
-
name: string
|
|
50
|
-
description?: string
|
|
51
|
-
externalDocs?: {
|
|
52
|
-
url: string
|
|
53
|
-
description: string
|
|
54
|
-
}[]
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
interface Parameter {
|
|
58
|
-
name: string
|
|
59
|
-
in: 'query' | 'header' | 'path' | 'cookie'
|
|
60
|
-
description?: string
|
|
61
|
-
required: boolean
|
|
62
|
-
schema: Schema
|
|
63
|
-
}
|
|
64
|
-
|
|
65
|
-
interface RequestBody {
|
|
66
|
-
description?: string
|
|
67
|
-
required: boolean
|
|
68
|
-
content: {
|
|
69
|
-
[contentType: string]: {
|
|
70
|
-
schema: Schema
|
|
71
|
-
}
|
|
72
|
-
}
|
|
73
|
-
}
|
|
74
|
-
|
|
75
|
-
interface Responses {
|
|
76
|
-
[statusCode: string]: {
|
|
77
|
-
description: string
|
|
78
|
-
content?: {
|
|
79
|
-
[contentType: string]: {
|
|
80
|
-
schema: Schema
|
|
81
|
-
}
|
|
82
|
-
}
|
|
83
|
-
}
|
|
84
|
-
}
|
|
85
|
-
|
|
86
|
-
interface Schema {
|
|
87
|
-
type?: string
|
|
88
|
-
format?: string
|
|
89
|
-
properties?: {
|
|
90
|
-
[propertyName: string]: Schema
|
|
91
|
-
}
|
|
92
|
-
items?: Schema
|
|
93
|
-
enum?: string[]
|
|
94
|
-
required?: string[]
|
|
95
|
-
}
|
|
96
|
-
|
|
97
|
-
export interface SecurityScheme {
|
|
98
|
-
type: 'apiKey' | 'http' | 'oauth2' | 'openIdConnect'
|
|
99
|
-
description?: string
|
|
100
|
-
name?: string
|
|
101
|
-
in?: 'query' | 'header' | 'cookie'
|
|
102
|
-
scheme?: string
|
|
103
|
-
bearerFormat?: string
|
|
104
|
-
flows?: any
|
|
105
|
-
openIdConnectUrl?: string
|
|
106
|
-
}
|
|
107
|
-
|
|
108
|
-
export type HTTPMethod = 'get' | 'put' | 'post' | 'delete' | 'options' | 'head' | 'patch' | 'trace'
|
|
1
|
+
export interface OpenAPIFile {
|
|
2
|
+
openapi: string
|
|
3
|
+
info: {
|
|
4
|
+
title: string
|
|
5
|
+
description: string
|
|
6
|
+
version: string
|
|
7
|
+
}
|
|
8
|
+
servers?: {
|
|
9
|
+
url: string
|
|
10
|
+
description?: string
|
|
11
|
+
}[]
|
|
12
|
+
paths: {
|
|
13
|
+
[path: string]: Partial<
|
|
14
|
+
Record<
|
|
15
|
+
HTTPMethod,
|
|
16
|
+
{
|
|
17
|
+
tags: string[]
|
|
18
|
+
responses: Responses
|
|
19
|
+
summary?: string
|
|
20
|
+
description?: string
|
|
21
|
+
parameters?: Parameter[]
|
|
22
|
+
requestBody?: RequestBody
|
|
23
|
+
}
|
|
24
|
+
>
|
|
25
|
+
>
|
|
26
|
+
}
|
|
27
|
+
components?: {
|
|
28
|
+
schemas?: {
|
|
29
|
+
[schemaName: string]: Schema
|
|
30
|
+
}
|
|
31
|
+
securitySchemes?: {
|
|
32
|
+
[schemeName: string]: SecurityScheme
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
security?: {
|
|
36
|
+
[schemeName: string]: string[]
|
|
37
|
+
}[]
|
|
38
|
+
tags?: {
|
|
39
|
+
name: string
|
|
40
|
+
description?: string
|
|
41
|
+
externalDocs?: {
|
|
42
|
+
url: string
|
|
43
|
+
description: string
|
|
44
|
+
}[]
|
|
45
|
+
}[]
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
export interface Tags {
|
|
49
|
+
name: string
|
|
50
|
+
description?: string
|
|
51
|
+
externalDocs?: {
|
|
52
|
+
url: string
|
|
53
|
+
description: string
|
|
54
|
+
}[]
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
export interface Parameter {
|
|
58
|
+
name: string
|
|
59
|
+
in: 'query' | 'header' | 'path' | 'cookie'
|
|
60
|
+
description?: string
|
|
61
|
+
required: boolean
|
|
62
|
+
schema: Schema
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
export interface RequestBody {
|
|
66
|
+
description?: string
|
|
67
|
+
required: boolean
|
|
68
|
+
content: {
|
|
69
|
+
[contentType: string]: {
|
|
70
|
+
schema: Schema
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
export interface Responses {
|
|
76
|
+
[statusCode: string]: {
|
|
77
|
+
description: string
|
|
78
|
+
content?: {
|
|
79
|
+
[contentType: string]: {
|
|
80
|
+
schema: Schema
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
interface Schema {
|
|
87
|
+
type?: string
|
|
88
|
+
format?: string
|
|
89
|
+
properties?: {
|
|
90
|
+
[propertyName: string]: Schema
|
|
91
|
+
}
|
|
92
|
+
items?: Schema
|
|
93
|
+
enum?: string[]
|
|
94
|
+
required?: string[]
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
export interface SecurityScheme {
|
|
98
|
+
type: 'apiKey' | 'http' | 'oauth2' | 'openIdConnect'
|
|
99
|
+
description?: string
|
|
100
|
+
name?: string
|
|
101
|
+
in?: 'query' | 'header' | 'cookie'
|
|
102
|
+
scheme?: string
|
|
103
|
+
bearerFormat?: string
|
|
104
|
+
flows?: any
|
|
105
|
+
openIdConnectUrl?: string
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
export type HTTPMethod = 'get' | 'put' | 'post' | 'delete' | 'options' | 'head' | 'patch' | 'trace'
|