vitepress-openapi 0.2.7 → 0.2.9
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/dist/{angular-html-C0iYY931.js → angular-html-B1XELn26.js} +2 -2
- package/dist/{angular-html-DAq3gDGA.cjs → angular-html-rIG_zEfF.cjs} +1 -1
- package/dist/{angular-ts-Ct5d_gHN.js → angular-ts-DXqtm5IU.js} +2 -2
- package/dist/{angular-ts-B2PPB0Y5.cjs → angular-ts-f2TIFV5M.cjs} +1 -1
- package/dist/{apl-CiiA3JDJ.js → apl-B1OCEGWr.js} +5 -5
- package/dist/{apl-CoWANpfc.cjs → apl-Ci3ALcue.cjs} +1 -1
- package/dist/{astro-BX6R0KnA.cjs → astro-CvLdnrh3.cjs} +1 -1
- package/dist/{astro-Bzlt-IuJ.js → astro-D1h7VNXE.js} +5 -5
- package/dist/{blade-BBZCfhID.cjs → blade-Cwi6STL9.cjs} +1 -1
- package/dist/{blade-BGVF6ubL.js → blade-DhZOZtfj.js} +7 -7
- package/dist/{c-BpiaxH9s.js → c-7YqkXL9Z.js} +1 -1
- package/dist/{c-CHRY6FQk.cjs → c-C7EnZWQp.cjs} +1 -1
- package/dist/{chapel-CCUE2hqL.cjs → chapel-BnA0bPCH.cjs} +1 -1
- package/dist/{chapel-fECU7c1r.js → chapel-JTgeOnk1.js} +1 -1
- package/dist/{cobol-lxVOio4o.js → cobol-BTWAs8is.js} +2 -2
- package/dist/{cobol-Ete-w65U.cjs → cobol-CP7NwoJy.cjs} +1 -1
- package/dist/{coffee-DcVdEhV6.cjs → coffee-LJIPHo3K.cjs} +1 -1
- package/dist/{coffee-D_GP6Mp_.js → coffee-WesP7zhC.js} +1 -1
- package/dist/{cpp-BQiBH6_n.cjs → cpp-Cbp1scY6.cjs} +1 -1
- package/dist/{cpp-C2_nndOX.js → cpp-DAQpXhG0.js} +3 -3
- package/dist/{crystal-D68fQQf4.js → crystal-B4idWfGx.js} +6 -6
- package/dist/{crystal-bWCs3mcQ.cjs → crystal-ChvXSZhJ.cjs} +1 -1
- package/dist/{css-LUs62piT.cjs → css-DddeWnQl.cjs} +1 -1
- package/dist/{css-CwZ52NVY.js → css-GGKvWM3L.js} +1 -1
- package/dist/{edge-CxIBp4BJ.js → edge-CtXsoVCh.js} +3 -3
- package/dist/{edge-CRrD84FE.cjs → edge-DwK7rLUo.cjs} +1 -1
- package/dist/{elixir-txrLIPgt.cjs → elixir-Bgu3U6Wa.cjs} +1 -1
- package/dist/{elixir-DzlkeFTp.js → elixir-D83eYIIE.js} +1 -1
- package/dist/{elm-BSAvBsXU.js → elm-DpgO83wp.js} +1 -1
- package/dist/{elm-D3rgeOAI.cjs → elm-lX9Roq8z.cjs} +1 -1
- package/dist/{erb-CDFFPhk2.js → erb-BQVZ9HCP.js} +2 -2
- package/dist/{erb-CEerDw7_.cjs → erb-D4GvUbRw.cjs} +1 -1
- package/dist/{git-rebase-BRc34H8A.cjs → git-rebase-BL2dAbMZ.cjs} +1 -1
- package/dist/{git-rebase-BI3TNfL1.js → git-rebase-Rrq2ZWm2.js} +1 -1
- package/dist/{glimmer-js-BCOl9pkK.js → glimmer-js-DWVebztp.js} +4 -4
- package/dist/{glimmer-js-BjCbjAxk.cjs → glimmer-js-kdiBETU4.cjs} +1 -1
- package/dist/{glimmer-ts-BaygTMht.cjs → glimmer-ts-2i4ik6-X.cjs} +1 -1
- package/dist/{glimmer-ts-DtU3AR2J.js → glimmer-ts-BR-tSF2n.js} +4 -4
- package/dist/{glsl-C3jot75m.js → glsl-NrFCE9B3.js} +2 -2
- package/dist/{glsl-C4QVQ8IM.cjs → glsl-XEAEz2VT.cjs} +1 -1
- package/dist/{graphql-CWVurcx-.cjs → graphql-Cafwg7BL.cjs} +1 -1
- package/dist/{graphql-C57m_foI.js → graphql-L_gmMBRF.js} +5 -5
- package/dist/{hack-CO29PdAW.cjs → hack-BPeNRA1P.cjs} +1 -1
- package/dist/{hack-LG-O4iX2.js → hack-CFPozk9L.js} +2 -2
- package/dist/{haml-Qqt96dA3.js → haml-Dnt1of6J.js} +3 -3
- package/dist/{haml-D5udMhEZ.cjs → haml-kHWYo3MO.cjs} +1 -1
- package/dist/{handlebars-dotklBKW.cjs → handlebars-Cp6KipX3.cjs} +1 -1
- package/dist/{handlebars-BBft0uRg.js → handlebars-DzeI5biV.js} +4 -4
- package/dist/{html-Cm4eMgz9.js → html-CD7xOHw5.js} +3 -3
- package/dist/{html-hrBEmwSv.cjs → html-DlNGDfk2.cjs} +1 -1
- package/dist/{html-derivative-Cu6O2gHN.cjs → html-derivative-CFtmvvi-.cjs} +1 -1
- package/dist/{html-derivative-DMWaumzq.js → html-derivative-Cb94qT-w.js} +1 -1
- package/dist/{http-D168KNW_.cjs → http-DSs5YpUC.cjs} +1 -1
- package/dist/{http-Cz6VY5Wo.js → http-TK3fYlls.js} +4 -4
- package/dist/{hurl-D36azgIj.js → hurl-BfEx9X4Q.js} +2 -2
- package/dist/{hurl-DSwY6Z5G.cjs → hurl-wYovbyGz.cjs} +1 -1
- package/dist/{java-CFiC7SeI.cjs → java-7h-cze_O.cjs} +1 -1
- package/dist/{java-BKXCRk8D.js → java-Cg0ETIHg.js} +1 -1
- package/dist/{javascript-Bx9N9g1f.cjs → javascript-BNQL6umw.cjs} +1 -1
- package/dist/{javascript-DljrdC8t.js → javascript-BzzJDFzo.js} +1 -1
- package/dist/{jinja-NZUdcntO.js → jinja-IbZE90jR.js} +1 -1
- package/dist/{jinja-f05HaP8v.cjs → jinja-Oa5J7fUC.cjs} +1 -1
- package/dist/{jison-BQnZ1V4P.js → jison-BSBE0rWh.js} +1 -1
- package/dist/{jison-Dlb0RIZ3.cjs → jison-BSMwaMLb.cjs} +1 -1
- package/dist/{json-CzaEM6zR.cjs → json-De9V2v7R.cjs} +1 -1
- package/dist/{json-DyprfpNy.js → json-KEsWV5Ng.js} +1 -1
- package/dist/{jsx-X5IYTTmR.cjs → jsx-BSapmhxJ.cjs} +1 -1
- package/dist/{jsx-DoPFZPXc.js → jsx-CeAAZrLd.js} +1 -1
- package/dist/{julia-DrSudrKE.js → julia-BZFATeHL.js} +4 -4
- package/dist/{julia-BUcVnjBf.cjs → julia-xcZKc5Ew.cjs} +1 -1
- package/dist/{just-tTSTWYrq.js → just-CMG_0Fcq.js} +5 -5
- package/dist/{just-DydEbCQZ.cjs → just-D18H_x3N.cjs} +1 -1
- package/dist/{latex-BUsA-DrV.js → latex-CV2tVWCk.js} +1 -1
- package/dist/{latex-BQA9tWbc.cjs → latex-CtVwg9F3.cjs} +1 -1
- package/dist/{liquid-cWkPgL2I.js → liquid-CGMhEsSb.js} +4 -4
- package/dist/{liquid-DkgygF2N.cjs → liquid-Dp13YYeR.cjs} +1 -1
- package/dist/{lua-C6iAvpwo.js → lua-AaCey3qg.js} +2 -2
- package/dist/{lua-DIfY63me.cjs → lua-Ch_W9mH8.cjs} +1 -1
- package/dist/{marko-Du_QgmTX.cjs → marko-C5qkRYFl.cjs} +1 -1
- package/dist/{marko-CNIbHKC5.js → marko-CBVMpjgt.js} +3 -3
- package/dist/{mdc-DJo1F4gz.js → mdc-BDRDuMS7.js} +2 -2
- package/dist/{mdc-C_TsMRBC.cjs → mdc-BMY__-lv.cjs} +1 -1
- package/dist/{nginx-CwCNXVm0.js → nginx-CtvX9zIL.js} +1 -1
- package/dist/{nginx-B4IJHacq.cjs → nginx-D85LWKUU.cjs} +1 -1
- package/dist/{nim-vPNRZtmW.js → nim-BlruIwKi.js} +6 -6
- package/dist/{nim-rz8U_2RE.cjs → nim-CyM3gSu_.cjs} +1 -1
- package/dist/{org-BXPZpMn-.js → org-8WaPnqtv.js} +26 -26
- package/dist/{org-BJUQuLxI.cjs → org-BCFMP1HF.cjs} +1 -1
- package/dist/{perl-C4EazcOb.js → perl-CAdQB2tx.js} +5 -5
- package/dist/{perl-CmADOgcQ.cjs → perl-DkYI6GA4.cjs} +1 -1
- package/dist/{php-BDdD_YcH.cjs → php-CCrUGZVW.cjs} +1 -1
- package/dist/{php-BsJ_ZqPP.js → php-_x3_l_UU.js} +6 -6
- package/dist/{pug-BqCAm08K.cjs → pug-DzKmLctf.cjs} +1 -1
- package/dist/{pug-BYXwQyBY.js → pug-hly27XLj.js} +3 -3
- package/dist/{qml-BkLbkVNV.cjs → qml-D-XitYWS.cjs} +1 -1
- package/dist/{qml-CnP9LpPo.js → qml-D_bIW4fQ.js} +1 -1
- package/dist/{r-Crbt2ian.cjs → r-C0mb1qAW.cjs} +1 -1
- package/dist/{r-BskJ0B3b.js → r-Crtx_Rj8.js} +1 -1
- package/dist/{razor-CgobKwDB.js → razor-CNmNW5in.js} +1 -1
- package/dist/{razor-CcOw1mzY.cjs → razor-DW4mGGX9.cjs} +1 -1
- package/dist/{regexp-35oNQcei.js → regexp-CVT3nhGv.js} +1 -1
- package/dist/{regexp-CiRKg-B7.cjs → regexp-DXSU4ubT.cjs} +1 -1
- package/dist/{rst-0CCQrjRR.cjs → rst-B5KTR2vb.cjs} +1 -1
- package/dist/{rst-CcG1VyHf.js → rst-BhA6XXbN.js} +6 -6
- package/dist/{ruby-D84T3HVs.js → ruby-CEbJCOQJ.js} +12 -12
- package/dist/{ruby-Bz7pH067.cjs → ruby-CUw63IwB.cjs} +1 -1
- package/dist/{sas-CfNVA6xj.cjs → sas-6_2bmt_p.cjs} +1 -1
- package/dist/{sas-leffZV-t.js → sas-UnkqfIql.js} +1 -1
- package/dist/{scss-tjluFEfq.cjs → scss-Cj6kiN3V.cjs} +1 -1
- package/dist/{scss-ConKgv_x.js → scss-CtC0Ahui.js} +2 -2
- package/dist/{shellscript-CZORtZ0m.cjs → shellscript-B77I5Ggp.cjs} +1 -1
- package/dist/{shellscript-Cqrf74-d.js → shellscript-DuIgASGN.js} +1 -1
- package/dist/{shellsession-C7TZqfBX.cjs → shellsession-BI9ZpV8b.cjs} +1 -1
- package/dist/{shellsession-DGN6o4H4.js → shellsession-DmtSuVxo.js} +1 -1
- package/dist/{soy-C3C1N4BB.js → soy-CrunrCzs.js} +1 -1
- package/dist/{soy-CYwevEyV.cjs → soy-iSOjWcJx.cjs} +1 -1
- package/dist/{sql-D28Ep8kC.js → sql-Cde1eu3c.js} +1 -1
- package/dist/{sql-CKAdltev.cjs → sql-CyoUs2h4.cjs} +1 -1
- package/dist/{stata-gwURYib4.cjs → stata-ChVO1eIY.cjs} +1 -1
- package/dist/{stata-BdKZ3Tfa.js → stata-SoHdZt6f.js} +1 -1
- package/dist/{surrealql-CBAekr00.cjs → surrealql-AyXmOtPo.cjs} +1 -1
- package/dist/{surrealql-BE3WUki2.js → surrealql-Bwe12AZT.js} +1 -1
- package/dist/{svelte-BIf-Q33W.js → svelte-5ylhl1aX.js} +3 -3
- package/dist/{svelte-ClXPqtyX.cjs → svelte-6qBNWwQn.cjs} +1 -1
- package/dist/{templ-CJJCQFkp.cjs → templ-DQeUexgT.cjs} +1 -1
- package/dist/{templ-KcJQzTCJ.js → templ-DZ18fL-0.js} +2 -2
- package/dist/{tex-DtiwEWZU.js → tex-Bu4Cft9y.js} +2 -2
- package/dist/{tex-V7tXlPyb.cjs → tex-grxyCd6F.cjs} +1 -1
- package/dist/{ts-tags-gxidxB8R.js → ts-tags-ChoZiVav.js} +7 -7
- package/dist/{ts-tags-BaSrqEU0.cjs → ts-tags-DWyJqpzh.cjs} +1 -1
- package/dist/{tsx-CLVkAc-4.js → tsx-BVZRMVCS.js} +1 -1
- package/dist/{tsx-yCIscrGd.cjs → tsx-D8K0BrmX.cjs} +1 -1
- package/dist/{twig-DucNk_L2.cjs → twig-CzsEUGpk.cjs} +1 -1
- package/dist/{twig-BozPiA4G.js → twig-qC2X1Ju8.js} +5 -5
- package/dist/types/src/components/Common/OAJSONEditor.vue.d.ts +2 -2
- package/dist/types/src/lib/parser/generateRequestBodyUi.d.ts +2 -1
- package/dist/types/src/lib/parser/generateResponseUi.d.ts +2 -1
- package/dist/types/src/lib/parser/getSchemaUi.d.ts +5 -1
- package/dist/types/src/lib/parser/mergeAllOf.d.ts +6 -0
- package/dist/types/src/lib/parser/resolveCircularRef.d.ts +1 -1
- package/dist/{typescript-v3MDZy3z.js → typescript-BnzWnec5.js} +1 -1
- package/dist/{typescript-CpL8J23X.cjs → typescript-DJ3zklOW.cjs} +1 -1
- package/dist/{typst-KAYwLgnz.cjs → typst-5ZpLDH4k.cjs} +1 -1
- package/dist/{typst-BqVfAgGz.js → typst-Bw8BzyoB.js} +29 -29
- package/dist/{useOpenapi-_Y6U0hd9.cjs → useOpenapi-CfKOQmG7.cjs} +77 -77
- package/dist/{useOpenapi-B8TP2xUt.js → useOpenapi-vxhinHuF.js} +1538 -1451
- package/dist/vitepress-openapi.client.cjs.js +4 -4
- package/dist/vitepress-openapi.client.es.js +9044 -9040
- package/dist/vitepress-openapi.node.cjs.js +1 -1
- package/dist/vitepress-openapi.node.es.js +1 -1
- package/dist/{vue-DDP4ToP4.cjs → vue-BPajHkJ2.cjs} +1 -1
- package/dist/{vue-CCBnDBrj.js → vue-DwyDZ4RX.js} +6 -6
- package/dist/{vue-html-ChckxjrF.js → vue-html-Cj4_bNem.js} +1 -1
- package/dist/{vue-html-pUsOdCRA.cjs → vue-html-pQ4URscA.cjs} +1 -1
- package/dist/{vue-vine-CW6_oew-.js → vue-vine-0CAFnvXq.js} +3 -3
- package/dist/{vue-vine-C-R1ePqA.cjs → vue-vine-BxsDBvMs.cjs} +1 -1
- package/dist/{xml-5oO_YDXi.cjs → xml-CqFmiD9z.cjs} +1 -1
- package/dist/{xml-BjuxZasO.js → xml-PSx8kIzM.js} +2 -2
- package/dist/{xsl-A-O9TTaY.js → xsl-BJXJ9U2q.js} +1 -1
- package/dist/{xsl-BfGzl8_E.cjs → xsl-BsFSS-SN.cjs} +1 -1
- package/dist/{yaml-CFG4vyir.cjs → yaml-BOcaVyO_.cjs} +1 -1
- package/dist/{yaml-DgRJBItn.js → yaml-BsVfajRZ.js} +1 -1
- package/package.json +1 -1
- package/src/components/Common/OAJSONEditor.vue +2 -1
- package/src/composables/useOpenapi.ts +2 -2
- package/src/composables/usePlayground.ts +4 -2
- package/src/lib/examples/getSchemaUiJson.ts +118 -13
- package/src/lib/parser/dereferenceWithAnnotations.ts +22 -5
- package/src/lib/parser/generateRequestBodyUi.ts +3 -3
- package/src/lib/parser/generateResponseUi.ts +3 -3
- package/src/lib/parser/getSchemaUi.ts +50 -22
- package/src/lib/parser/mergeAllOf.ts +45 -0
- package/src/lib/parser/parseOpenapi.ts +12 -7
- package/src/lib/parser/resolveCircularRef.ts +25 -45
- package/src/lib/spec/createOpenApiSpec.ts +27 -51
|
@@ -1 +1 @@
|
|
|
1
|
-
const e=require("./useOpenapi-
|
|
1
|
+
const e=require("./useOpenapi-CfKOQmG7.cjs"),t=require("./java-7h-cze_O.cjs");var n=e.$({default:()=>i}),r=Object.freeze(JSON.parse(`{"displayName":"XML","name":"xml","patterns":[{"begin":"(<\\\\?)\\\\s*([-0-9A-Z_a-z]+)","captures":{"1":{"name":"punctuation.definition.tag.xml"},"2":{"name":"entity.name.tag.xml"}},"end":"(\\\\?>)","name":"meta.tag.preprocessor.xml","patterns":[{"match":" ([-A-Za-z]+)","name":"entity.other.attribute-name.xml"},{"include":"#doublequotedString"},{"include":"#singlequotedString"}]},{"begin":"(<!)(DOCTYPE)\\\\s+([:A-Z_a-z][-.0-:A-Z_a-z]*)","captures":{"1":{"name":"punctuation.definition.tag.xml"},"2":{"name":"keyword.other.doctype.xml"},"3":{"name":"variable.language.documentroot.xml"}},"end":"\\\\s*(>)","name":"meta.tag.sgml.doctype.xml","patterns":[{"include":"#internalSubset"}]},{"include":"#comments"},{"begin":"(<)((?:([-0-9A-Z_a-z]+)(:))?([-0-:A-Z_a-z]+))(?=(\\\\s[^>]*)?></\\\\2>)","beginCaptures":{"1":{"name":"punctuation.definition.tag.xml"},"2":{"name":"entity.name.tag.xml"},"3":{"name":"entity.name.tag.namespace.xml"},"4":{"name":"punctuation.separator.namespace.xml"},"5":{"name":"entity.name.tag.localname.xml"}},"end":"(>)(</)((?:([-0-9A-Z_a-z]+)(:))?([-0-:A-Z_a-z]+))(>)","endCaptures":{"1":{"name":"punctuation.definition.tag.xml"},"2":{"name":"punctuation.definition.tag.xml"},"3":{"name":"entity.name.tag.xml"},"4":{"name":"entity.name.tag.namespace.xml"},"5":{"name":"punctuation.separator.namespace.xml"},"6":{"name":"entity.name.tag.localname.xml"},"7":{"name":"punctuation.definition.tag.xml"}},"name":"meta.tag.no-content.xml","patterns":[{"include":"#tagStuff"}]},{"begin":"(</?)(?:([-.\\\\w]+)((:)))?([-.:\\\\w]+)","captures":{"1":{"name":"punctuation.definition.tag.xml"},"2":{"name":"entity.name.tag.namespace.xml"},"3":{"name":"entity.name.tag.xml"},"4":{"name":"punctuation.separator.namespace.xml"},"5":{"name":"entity.name.tag.localname.xml"}},"end":"(/?>)","name":"meta.tag.xml","patterns":[{"include":"#tagStuff"}]},{"include":"#entity"},{"include":"#bare-ampersand"},{"begin":"<%@","beginCaptures":{"0":{"name":"punctuation.section.embedded.begin.xml"}},"end":"%>","endCaptures":{"0":{"name":"punctuation.section.embedded.end.xml"}},"name":"source.java-props.embedded.xml","patterns":[{"match":"page|include|taglib","name":"keyword.other.page-props.xml"}]},{"begin":"<%[!=]?(?!--)","beginCaptures":{"0":{"name":"punctuation.section.embedded.begin.xml"}},"end":"(?!--)%>","endCaptures":{"0":{"name":"punctuation.section.embedded.end.xml"}},"name":"source.java.embedded.xml","patterns":[{"include":"source.java"}]},{"begin":"<!\\\\[CDATA\\\\[","beginCaptures":{"0":{"name":"punctuation.definition.string.begin.xml"}},"end":"]]>","endCaptures":{"0":{"name":"punctuation.definition.string.end.xml"}},"name":"string.unquoted.cdata.xml"}],"repository":{"EntityDecl":{"begin":"(<!)(ENTITY)\\\\s+(%\\\\s+)?([:A-Z_a-z][-.0-:A-Z_a-z]*)(\\\\s+(?:SYSTEM|PUBLIC)\\\\s+)?","captures":{"1":{"name":"punctuation.definition.tag.xml"},"2":{"name":"keyword.other.entity.xml"},"3":{"name":"punctuation.definition.entity.xml"},"4":{"name":"variable.language.entity.xml"},"5":{"name":"keyword.other.entitytype.xml"}},"end":"(>)","patterns":[{"include":"#doublequotedString"},{"include":"#singlequotedString"}]},"bare-ampersand":{"match":"&","name":"invalid.illegal.bad-ampersand.xml"},"comments":{"patterns":[{"begin":"<%--","captures":{"0":{"name":"punctuation.definition.comment.xml"},"end":"--%>","name":"comment.block.xml"}},{"begin":"<!--","captures":{"0":{"name":"punctuation.definition.comment.xml"}},"end":"-->","name":"comment.block.xml","patterns":[{"begin":"--(?!>)","captures":{"0":{"name":"invalid.illegal.bad-comments-or-CDATA.xml"}}}]}]},"doublequotedString":{"begin":"\\"","beginCaptures":{"0":{"name":"punctuation.definition.string.begin.xml"}},"end":"\\"","endCaptures":{"0":{"name":"punctuation.definition.string.end.xml"}},"name":"string.quoted.double.xml","patterns":[{"include":"#entity"},{"include":"#bare-ampersand"}]},"entity":{"captures":{"1":{"name":"punctuation.definition.constant.xml"},"3":{"name":"punctuation.definition.constant.xml"}},"match":"(&)([:A-Z_a-z][-.0-:A-Z_a-z]*|#[0-9]+|#x\\\\h+)(;)","name":"constant.character.entity.xml"},"internalSubset":{"begin":"(\\\\[)","captures":{"1":{"name":"punctuation.definition.constant.xml"}},"end":"(])","name":"meta.internalsubset.xml","patterns":[{"include":"#EntityDecl"},{"include":"#parameterEntity"},{"include":"#comments"}]},"parameterEntity":{"captures":{"1":{"name":"punctuation.definition.constant.xml"},"3":{"name":"punctuation.definition.constant.xml"}},"match":"(%)([:A-Z_a-z][-.0-:A-Z_a-z]*)(;)","name":"constant.character.parameter-entity.xml"},"singlequotedString":{"begin":"'","beginCaptures":{"0":{"name":"punctuation.definition.string.begin.xml"}},"end":"'","endCaptures":{"0":{"name":"punctuation.definition.string.end.xml"}},"name":"string.quoted.single.xml","patterns":[{"include":"#entity"},{"include":"#bare-ampersand"}]},"tagStuff":{"patterns":[{"captures":{"1":{"name":"entity.other.attribute-name.namespace.xml"},"2":{"name":"entity.other.attribute-name.xml"},"3":{"name":"punctuation.separator.namespace.xml"},"4":{"name":"entity.other.attribute-name.localname.xml"}},"match":"(?:^|\\\\s+)(?:([-.\\\\w]+)((:)))?([-.:\\\\w]+)\\\\s*="},{"include":"#doublequotedString"},{"include":"#singlequotedString"}]}},"scopeName":"text.xml","embeddedLangs":["java"]}`)),i=[...t.t,r];Object.defineProperty(exports,"n",{enumerable:!0,get:function(){return n}}),Object.defineProperty(exports,"t",{enumerable:!0,get:function(){return i}});
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { $ as e } from "./useOpenapi-
|
|
2
|
-
import { t } from "./java-
|
|
1
|
+
import { $ as e } from "./useOpenapi-vxhinHuF.js";
|
|
2
|
+
import { t } from "./java-Cg0ETIHg.js";
|
|
3
3
|
//#region node_modules/.pnpm/@shikijs+langs@4.4.3/node_modules/@shikijs/langs/dist/xml.mjs
|
|
4
4
|
var n = /* @__PURE__ */ e({ default: () => i }), r = Object.freeze(JSON.parse("{\"displayName\":\"XML\",\"name\":\"xml\",\"patterns\":[{\"begin\":\"(<\\\\?)\\\\s*([-0-9A-Z_a-z]+)\",\"captures\":{\"1\":{\"name\":\"punctuation.definition.tag.xml\"},\"2\":{\"name\":\"entity.name.tag.xml\"}},\"end\":\"(\\\\?>)\",\"name\":\"meta.tag.preprocessor.xml\",\"patterns\":[{\"match\":\" ([-A-Za-z]+)\",\"name\":\"entity.other.attribute-name.xml\"},{\"include\":\"#doublequotedString\"},{\"include\":\"#singlequotedString\"}]},{\"begin\":\"(<!)(DOCTYPE)\\\\s+([:A-Z_a-z][-.0-:A-Z_a-z]*)\",\"captures\":{\"1\":{\"name\":\"punctuation.definition.tag.xml\"},\"2\":{\"name\":\"keyword.other.doctype.xml\"},\"3\":{\"name\":\"variable.language.documentroot.xml\"}},\"end\":\"\\\\s*(>)\",\"name\":\"meta.tag.sgml.doctype.xml\",\"patterns\":[{\"include\":\"#internalSubset\"}]},{\"include\":\"#comments\"},{\"begin\":\"(<)((?:([-0-9A-Z_a-z]+)(:))?([-0-:A-Z_a-z]+))(?=(\\\\s[^>]*)?></\\\\2>)\",\"beginCaptures\":{\"1\":{\"name\":\"punctuation.definition.tag.xml\"},\"2\":{\"name\":\"entity.name.tag.xml\"},\"3\":{\"name\":\"entity.name.tag.namespace.xml\"},\"4\":{\"name\":\"punctuation.separator.namespace.xml\"},\"5\":{\"name\":\"entity.name.tag.localname.xml\"}},\"end\":\"(>)(</)((?:([-0-9A-Z_a-z]+)(:))?([-0-:A-Z_a-z]+))(>)\",\"endCaptures\":{\"1\":{\"name\":\"punctuation.definition.tag.xml\"},\"2\":{\"name\":\"punctuation.definition.tag.xml\"},\"3\":{\"name\":\"entity.name.tag.xml\"},\"4\":{\"name\":\"entity.name.tag.namespace.xml\"},\"5\":{\"name\":\"punctuation.separator.namespace.xml\"},\"6\":{\"name\":\"entity.name.tag.localname.xml\"},\"7\":{\"name\":\"punctuation.definition.tag.xml\"}},\"name\":\"meta.tag.no-content.xml\",\"patterns\":[{\"include\":\"#tagStuff\"}]},{\"begin\":\"(</?)(?:([-.\\\\w]+)((:)))?([-.:\\\\w]+)\",\"captures\":{\"1\":{\"name\":\"punctuation.definition.tag.xml\"},\"2\":{\"name\":\"entity.name.tag.namespace.xml\"},\"3\":{\"name\":\"entity.name.tag.xml\"},\"4\":{\"name\":\"punctuation.separator.namespace.xml\"},\"5\":{\"name\":\"entity.name.tag.localname.xml\"}},\"end\":\"(/?>)\",\"name\":\"meta.tag.xml\",\"patterns\":[{\"include\":\"#tagStuff\"}]},{\"include\":\"#entity\"},{\"include\":\"#bare-ampersand\"},{\"begin\":\"<%@\",\"beginCaptures\":{\"0\":{\"name\":\"punctuation.section.embedded.begin.xml\"}},\"end\":\"%>\",\"endCaptures\":{\"0\":{\"name\":\"punctuation.section.embedded.end.xml\"}},\"name\":\"source.java-props.embedded.xml\",\"patterns\":[{\"match\":\"page|include|taglib\",\"name\":\"keyword.other.page-props.xml\"}]},{\"begin\":\"<%[!=]?(?!--)\",\"beginCaptures\":{\"0\":{\"name\":\"punctuation.section.embedded.begin.xml\"}},\"end\":\"(?!--)%>\",\"endCaptures\":{\"0\":{\"name\":\"punctuation.section.embedded.end.xml\"}},\"name\":\"source.java.embedded.xml\",\"patterns\":[{\"include\":\"source.java\"}]},{\"begin\":\"<!\\\\[CDATA\\\\[\",\"beginCaptures\":{\"0\":{\"name\":\"punctuation.definition.string.begin.xml\"}},\"end\":\"]]>\",\"endCaptures\":{\"0\":{\"name\":\"punctuation.definition.string.end.xml\"}},\"name\":\"string.unquoted.cdata.xml\"}],\"repository\":{\"EntityDecl\":{\"begin\":\"(<!)(ENTITY)\\\\s+(%\\\\s+)?([:A-Z_a-z][-.0-:A-Z_a-z]*)(\\\\s+(?:SYSTEM|PUBLIC)\\\\s+)?\",\"captures\":{\"1\":{\"name\":\"punctuation.definition.tag.xml\"},\"2\":{\"name\":\"keyword.other.entity.xml\"},\"3\":{\"name\":\"punctuation.definition.entity.xml\"},\"4\":{\"name\":\"variable.language.entity.xml\"},\"5\":{\"name\":\"keyword.other.entitytype.xml\"}},\"end\":\"(>)\",\"patterns\":[{\"include\":\"#doublequotedString\"},{\"include\":\"#singlequotedString\"}]},\"bare-ampersand\":{\"match\":\"&\",\"name\":\"invalid.illegal.bad-ampersand.xml\"},\"comments\":{\"patterns\":[{\"begin\":\"<%--\",\"captures\":{\"0\":{\"name\":\"punctuation.definition.comment.xml\"},\"end\":\"--%>\",\"name\":\"comment.block.xml\"}},{\"begin\":\"<!--\",\"captures\":{\"0\":{\"name\":\"punctuation.definition.comment.xml\"}},\"end\":\"-->\",\"name\":\"comment.block.xml\",\"patterns\":[{\"begin\":\"--(?!>)\",\"captures\":{\"0\":{\"name\":\"invalid.illegal.bad-comments-or-CDATA.xml\"}}}]}]},\"doublequotedString\":{\"begin\":\"\\\"\",\"beginCaptures\":{\"0\":{\"name\":\"punctuation.definition.string.begin.xml\"}},\"end\":\"\\\"\",\"endCaptures\":{\"0\":{\"name\":\"punctuation.definition.string.end.xml\"}},\"name\":\"string.quoted.double.xml\",\"patterns\":[{\"include\":\"#entity\"},{\"include\":\"#bare-ampersand\"}]},\"entity\":{\"captures\":{\"1\":{\"name\":\"punctuation.definition.constant.xml\"},\"3\":{\"name\":\"punctuation.definition.constant.xml\"}},\"match\":\"(&)([:A-Z_a-z][-.0-:A-Z_a-z]*|#[0-9]+|#x\\\\h+)(;)\",\"name\":\"constant.character.entity.xml\"},\"internalSubset\":{\"begin\":\"(\\\\[)\",\"captures\":{\"1\":{\"name\":\"punctuation.definition.constant.xml\"}},\"end\":\"(])\",\"name\":\"meta.internalsubset.xml\",\"patterns\":[{\"include\":\"#EntityDecl\"},{\"include\":\"#parameterEntity\"},{\"include\":\"#comments\"}]},\"parameterEntity\":{\"captures\":{\"1\":{\"name\":\"punctuation.definition.constant.xml\"},\"3\":{\"name\":\"punctuation.definition.constant.xml\"}},\"match\":\"(%)([:A-Z_a-z][-.0-:A-Z_a-z]*)(;)\",\"name\":\"constant.character.parameter-entity.xml\"},\"singlequotedString\":{\"begin\":\"'\",\"beginCaptures\":{\"0\":{\"name\":\"punctuation.definition.string.begin.xml\"}},\"end\":\"'\",\"endCaptures\":{\"0\":{\"name\":\"punctuation.definition.string.end.xml\"}},\"name\":\"string.quoted.single.xml\",\"patterns\":[{\"include\":\"#entity\"},{\"include\":\"#bare-ampersand\"}]},\"tagStuff\":{\"patterns\":[{\"captures\":{\"1\":{\"name\":\"entity.other.attribute-name.namespace.xml\"},\"2\":{\"name\":\"entity.other.attribute-name.xml\"},\"3\":{\"name\":\"punctuation.separator.namespace.xml\"},\"4\":{\"name\":\"entity.other.attribute-name.localname.xml\"}},\"match\":\"(?:^|\\\\s+)(?:([-.\\\\w]+)((:)))?([-.:\\\\w]+)\\\\s*=\"},{\"include\":\"#doublequotedString\"},{\"include\":\"#singlequotedString\"}]}},\"scopeName\":\"text.xml\",\"embeddedLangs\":[\"java\"]}")), i = [...t, r];
|
|
5
5
|
//#endregion
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { t as e } from "./xml-
|
|
1
|
+
import { t as e } from "./xml-PSx8kIzM.js";
|
|
2
2
|
//#region node_modules/.pnpm/@shikijs+langs@4.4.3/node_modules/@shikijs/langs/dist/xsl.mjs
|
|
3
3
|
var t = Object.freeze(JSON.parse("{\"displayName\":\"XSL\",\"name\":\"xsl\",\"patterns\":[{\"begin\":\"(<)(xsl)((:))(template)\",\"captures\":{\"1\":{\"name\":\"punctuation.definition.tag.xml\"},\"2\":{\"name\":\"entity.name.tag.namespace.xml\"},\"3\":{\"name\":\"entity.name.tag.xml\"},\"4\":{\"name\":\"punctuation.separator.namespace.xml\"},\"5\":{\"name\":\"entity.name.tag.localname.xml\"}},\"end\":\"(>)\",\"name\":\"meta.tag.xml.template\",\"patterns\":[{\"captures\":{\"1\":{\"name\":\"entity.other.attribute-name.namespace.xml\"},\"2\":{\"name\":\"entity.other.attribute-name.xml\"},\"3\":{\"name\":\"punctuation.separator.namespace.xml\"},\"4\":{\"name\":\"entity.other.attribute-name.localname.xml\"}},\"match\":\" (?:([-0-9A-Z_a-z]+)((:)))?([-A-Za-z]+)\"},{\"include\":\"#doublequotedString\"},{\"include\":\"#singlequotedString\"}]},{\"include\":\"text.xml\"}],\"repository\":{\"doublequotedString\":{\"begin\":\"\\\"\",\"beginCaptures\":{\"0\":{\"name\":\"punctuation.definition.string.begin.xml\"}},\"end\":\"\\\"\",\"endCaptures\":{\"0\":{\"name\":\"punctuation.definition.string.end.xml\"}},\"name\":\"string.quoted.double.xml\"},\"singlequotedString\":{\"begin\":\"'\",\"beginCaptures\":{\"0\":{\"name\":\"punctuation.definition.string.begin.xml\"}},\"end\":\"'\",\"endCaptures\":{\"0\":{\"name\":\"punctuation.definition.string.end.xml\"}},\"name\":\"string.quoted.single.xml\"}},\"scopeName\":\"text.xml.xsl\",\"embeddedLangs\":[\"xml\"]}")), n = [...e, t];
|
|
4
4
|
//#endregion
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const e=require("./xml-
|
|
1
|
+
const e=require("./xml-CqFmiD9z.cjs");var t=Object.freeze(JSON.parse(`{"displayName":"XSL","name":"xsl","patterns":[{"begin":"(<)(xsl)((:))(template)","captures":{"1":{"name":"punctuation.definition.tag.xml"},"2":{"name":"entity.name.tag.namespace.xml"},"3":{"name":"entity.name.tag.xml"},"4":{"name":"punctuation.separator.namespace.xml"},"5":{"name":"entity.name.tag.localname.xml"}},"end":"(>)","name":"meta.tag.xml.template","patterns":[{"captures":{"1":{"name":"entity.other.attribute-name.namespace.xml"},"2":{"name":"entity.other.attribute-name.xml"},"3":{"name":"punctuation.separator.namespace.xml"},"4":{"name":"entity.other.attribute-name.localname.xml"}},"match":" (?:([-0-9A-Z_a-z]+)((:)))?([-A-Za-z]+)"},{"include":"#doublequotedString"},{"include":"#singlequotedString"}]},{"include":"text.xml"}],"repository":{"doublequotedString":{"begin":"\\"","beginCaptures":{"0":{"name":"punctuation.definition.string.begin.xml"}},"end":"\\"","endCaptures":{"0":{"name":"punctuation.definition.string.end.xml"}},"name":"string.quoted.double.xml"},"singlequotedString":{"begin":"'","beginCaptures":{"0":{"name":"punctuation.definition.string.begin.xml"}},"end":"'","endCaptures":{"0":{"name":"punctuation.definition.string.end.xml"}},"name":"string.quoted.single.xml"}},"scopeName":"text.xml.xsl","embeddedLangs":["xml"]}`)),n=[...e.t,t];exports.default=n;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
var e=require("./useOpenapi-_Y6U0hd9.cjs").$({default:()=>t}),t=[Object.freeze(JSON.parse(`{"displayName":"YAML","fileTypes":["yaml","yml","rviz","reek","clang-format","yaml-tmlanguage","syntax","sublime-syntax"],"firstLineMatch":"^%YAML( ?1.\\\\d+)?","name":"yaml","patterns":[{"include":"#comment"},{"include":"#property"},{"include":"#directive"},{"match":"^---","name":"entity.other.document.begin.yaml"},{"match":"^\\\\.{3}","name":"entity.other.document.end.yaml"},{"include":"#node"}],"repository":{"block-collection":{"patterns":[{"include":"#block-sequence"},{"include":"#block-mapping"}]},"block-mapping":{"patterns":[{"include":"#block-pair"}]},"block-node":{"patterns":[{"include":"#prototype"},{"include":"#block-scalar"},{"include":"#block-collection"},{"include":"#flow-scalar-plain-out"},{"include":"#flow-node"}]},"block-pair":{"patterns":[{"begin":"\\\\?","beginCaptures":{"1":{"name":"punctuation.definition.key-value.begin.yaml"}},"end":"(?=\\\\?)|^ *(:)|(:)","endCaptures":{"1":{"name":"punctuation.separator.key-value.mapping.yaml"},"2":{"name":"invalid.illegal.expected-newline.yaml"}},"name":"meta.block-mapping.yaml","patterns":[{"include":"#block-node"}]},{"begin":"(?=(?:[^-\\\\]!\\"#%\\\\&'*,:>?@\\\\[\`{|}\\\\s]|[-:?]\\\\S)([^:\\\\s]|:\\\\S|\\\\s+(?![#\\\\s]))*\\\\s*:(\\\\s|$))","end":"(?=\\\\s*$|\\\\s+#|\\\\s*:(\\\\s|$))","patterns":[{"include":"#flow-scalar-plain-out-implicit-type"},{"begin":"[^-\\\\]!\\"#%\\\\&'*,:>?@\\\\[\`{|}\\\\s]|[-:?]\\\\S","beginCaptures":{"0":{"name":"entity.name.tag.yaml"}},"contentName":"entity.name.tag.yaml","end":"(?=\\\\s*$|\\\\s+#|\\\\s*:(\\\\s|$))","name":"string.unquoted.plain.out.yaml"}]},{"match":":(?=\\\\s|$)","name":"punctuation.separator.key-value.mapping.yaml"}]},"block-scalar":{"begin":"(?:(\\\\|)|(>))([1-9])?([-+])?(.*\\\\n?)","beginCaptures":{"1":{"name":"keyword.control.flow.block-scalar.literal.yaml"},"2":{"name":"keyword.control.flow.block-scalar.folded.yaml"},"3":{"name":"constant.numeric.indentation-indicator.yaml"},"4":{"name":"storage.modifier.chomping-indicator.yaml"},"5":{"patterns":[{"include":"#comment"},{"match":".+","name":"invalid.illegal.expected-comment-or-newline.yaml"}]}},"end":"^(?=\\\\S)|(?!\\\\G)","patterns":[{"begin":"^( +)(?! )","end":"^(?!\\\\1|\\\\s*$)","name":"string.unquoted.block.yaml"}]},"block-sequence":{"match":"(-)(?!\\\\S)","name":"punctuation.definition.block.sequence.item.yaml"},"comment":{"begin":"(?:^([\\\\t ]*)|[\\\\t ]+)(?=#\\\\p{print}*$)","beginCaptures":{"1":{"name":"punctuation.whitespace.comment.leading.yaml"}},"end":"(?!\\\\G)","patterns":[{"begin":"#","beginCaptures":{"0":{"name":"punctuation.definition.comment.yaml"}},"end":"\\\\n","name":"comment.line.number-sign.yaml"}]},"directive":{"begin":"^%","beginCaptures":{"0":{"name":"punctuation.definition.directive.begin.yaml"}},"end":"(?=$|[\\\\t ]+($|#))","name":"meta.directive.yaml","patterns":[{"captures":{"1":{"name":"keyword.other.directive.yaml.yaml"},"2":{"name":"constant.numeric.yaml-version.yaml"}},"match":"\\\\G(YAML)[\\\\t ]+(\\\\d+\\\\.\\\\d+)"},{"captures":{"1":{"name":"keyword.other.directive.tag.yaml"},"2":{"name":"storage.type.tag-handle.yaml"},"3":{"name":"support.type.tag-prefix.yaml"}},"match":"\\\\G(TAG)(?:[\\\\t ]+(!(?:[-0-9A-Za-z]*!)?)(?:[\\\\t ]+(!(?:%\\\\h{2}|[]!#$\\\\&-;=?-\\\\[_a-z~])*|(?![]!,\\\\[{}])(?:%\\\\h{2}|[]!#$\\\\&-;=?-\\\\[_a-z~])+))?)?"},{"captures":{"1":{"name":"support.other.directive.reserved.yaml"},"2":{"name":"string.unquoted.directive-name.yaml"},"3":{"name":"string.unquoted.directive-parameter.yaml"}},"match":"\\\\G(\\\\w+)(?:[\\\\t ]+(\\\\w+)(?:[\\\\t ]+(\\\\w+))?)?"},{"match":"\\\\S+","name":"invalid.illegal.unrecognized.yaml"}]},"flow-alias":{"captures":{"1":{"name":"keyword.control.flow.alias.yaml"},"2":{"name":"punctuation.definition.alias.yaml"},"3":{"name":"variable.other.alias.yaml"},"4":{"name":"invalid.illegal.character.anchor.yaml"}},"match":"((\\\\*))([^],/\\\\[{}\\\\s]+)([^],}\\\\s]\\\\S*)?"},"flow-collection":{"patterns":[{"include":"#flow-sequence"},{"include":"#flow-mapping"}]},"flow-mapping":{"begin":"\\\\{","beginCaptures":{"0":{"name":"punctuation.definition.mapping.begin.yaml"}},"end":"}","endCaptures":{"0":{"name":"punctuation.definition.mapping.end.yaml"}},"name":"meta.flow-mapping.yaml","patterns":[{"include":"#prototype"},{"match":",","name":"punctuation.separator.mapping.yaml"},{"include":"#flow-pair"}]},"flow-node":{"patterns":[{"include":"#prototype"},{"include":"#flow-alias"},{"include":"#flow-collection"},{"include":"#flow-scalar"}]},"flow-pair":{"patterns":[{"begin":"\\\\?","beginCaptures":{"0":{"name":"punctuation.definition.key-value.begin.yaml"}},"end":"(?=[],}])","name":"meta.flow-pair.explicit.yaml","patterns":[{"include":"#prototype"},{"include":"#flow-pair"},{"include":"#flow-node"},{"begin":":(?=\\\\s|$|[],\\\\[{}])","beginCaptures":{"0":{"name":"punctuation.separator.key-value.mapping.yaml"}},"end":"(?=[],}])","patterns":[{"include":"#flow-value"}]}]},{"begin":"(?=(?:[^-\\\\]!\\"#%\\\\&'*,:>?@\\\\[\`{|}\\\\s]|[-:?][^],\\\\[{}\\\\s])([^],:\\\\[{}\\\\s]|:[^],\\\\[{}\\\\s]|\\\\s+(?![#\\\\s]))*\\\\s*:(\\\\s|$))","end":"(?=\\\\s*$|\\\\s+#|\\\\s*:(\\\\s|$)|\\\\s*:[],\\\\[{}]|\\\\s*[],\\\\[{}])","name":"meta.flow-pair.key.yaml","patterns":[{"include":"#flow-scalar-plain-in-implicit-type"},{"begin":"[^-\\\\]!\\"#%\\\\&'*,:>?@\\\\[\`{|}\\\\s]|[-:?][^],\\\\[{}\\\\s]","beginCaptures":{"0":{"name":"entity.name.tag.yaml"}},"contentName":"entity.name.tag.yaml","end":"(?=\\\\s*$|\\\\s+#|\\\\s*:(\\\\s|$)|\\\\s*:[],\\\\[{}]|\\\\s*[],\\\\[{}])","name":"string.unquoted.plain.in.yaml"}]},{"include":"#flow-node"},{"begin":":(?=\\\\s|$|[],\\\\[{}])","captures":{"0":{"name":"punctuation.separator.key-value.mapping.yaml"}},"end":"(?=[],}])","name":"meta.flow-pair.yaml","patterns":[{"include":"#flow-value"}]}]},"flow-scalar":{"patterns":[{"include":"#flow-scalar-double-quoted"},{"include":"#flow-scalar-single-quoted"},{"include":"#flow-scalar-plain-in"}]},"flow-scalar-double-quoted":{"begin":"\\"","beginCaptures":{"0":{"name":"punctuation.definition.string.begin.yaml"}},"end":"\\"","endCaptures":{"0":{"name":"punctuation.definition.string.end.yaml"}},"name":"string.quoted.double.yaml","patterns":[{"match":"\\\\\\\\([ \\"/0LN\\\\\\\\_abefnprtv]|x\\\\d\\\\d|u\\\\d{4}|U\\\\d{8})","name":"constant.character.escape.yaml"},{"match":"\\\\\\\\\\\\n","name":"constant.character.escape.double-quoted.newline.yaml"}]},"flow-scalar-plain-in":{"patterns":[{"include":"#flow-scalar-plain-in-implicit-type"},{"begin":"[^-\\\\]!\\"#%\\\\&'*,:>?@\\\\[\`{|}\\\\s]|[-:?][^],\\\\[{}\\\\s]","end":"(?=\\\\s*$|\\\\s+#|\\\\s*:(\\\\s|$)|\\\\s*:[],\\\\[{}]|\\\\s*[],\\\\[{}])","name":"string.unquoted.plain.in.yaml"}]},"flow-scalar-plain-in-implicit-type":{"patterns":[{"captures":{"1":{"name":"constant.language.null.yaml"},"2":{"name":"constant.language.boolean.yaml"},"3":{"name":"constant.numeric.integer.yaml"},"4":{"name":"constant.numeric.float.yaml"},"5":{"name":"constant.other.timestamp.yaml"},"6":{"name":"constant.language.value.yaml"},"7":{"name":"constant.language.merge.yaml"}},"match":"(?:(null|Null|NULL|~)|([Yy]|yes|Yes|YES|[Nn]|no|No|NO|true|True|TRUE|false|False|FALSE|on|On|ON|off|Off|OFF)|([-+]?0b[01_]+|[-+]?0[0-7_]+|[-+]?(?:0|[1-9][0-9_]*)|[-+]?0x[_\\\\h]+|[-+]?[1-9][0-9_]*(?::[0-5]?[0-9])+)|([-+]?(?:[0-9][0-9_]*)?\\\\.[.0-9]*(?:[Ee][-+][0-9]+)?|[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+\\\\.[0-9_]*|[-+]?\\\\.(?:inf|Inf|INF)|\\\\.(?:nan|NaN|NAN))|(\\\\d{4}-\\\\d{2}-\\\\d{2}|\\\\d{4}-\\\\d{1,2}-\\\\d{1,2}(?:[Tt]|[\\\\t ]+)\\\\d{1,2}:\\\\d{2}:\\\\d{2}(?:\\\\.\\\\d*)?(?:[\\\\t ]*Z|[-+]\\\\d{1,2}(?::\\\\d{1,2})?)?)|(=)|(<<))(?=\\\\s*$|\\\\s+#|\\\\s*:(\\\\s|$)|\\\\s*:[],\\\\[{}]|\\\\s*[],\\\\[{}])"}]},"flow-scalar-plain-out":{"patterns":[{"include":"#flow-scalar-plain-out-implicit-type"},{"begin":"[^-\\\\]!\\"#%\\\\&'*,:>?@\\\\[\`{|}\\\\s]|[-:?]\\\\S","end":"(?=\\\\s*$|\\\\s+#|\\\\s*:(\\\\s|$))","name":"string.unquoted.plain.out.yaml"}]},"flow-scalar-plain-out-implicit-type":{"patterns":[{"captures":{"1":{"name":"constant.language.null.yaml"},"2":{"name":"constant.language.boolean.yaml"},"3":{"name":"constant.numeric.integer.yaml"},"4":{"name":"constant.numeric.float.yaml"},"5":{"name":"constant.other.timestamp.yaml"},"6":{"name":"constant.language.value.yaml"},"7":{"name":"constant.language.merge.yaml"}},"match":"(?:(null|Null|NULL|~)|([Yy]|yes|Yes|YES|[Nn]|no|No|NO|true|True|TRUE|false|False|FALSE|on|On|ON|off|Off|OFF)|([-+]?0b[01_]+|[-+]?0[0-7_]+|[-+]?(?:0|[1-9][0-9_]*)|[-+]?0x[_\\\\h]+|[-+]?[1-9][0-9_]*(?::[0-5]?[0-9])+)|([-+]?(?:[0-9][0-9_]*)?\\\\.[.0-9]*(?:[Ee][-+][0-9]+)?|[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+\\\\.[0-9_]*|[-+]?\\\\.(?:inf|Inf|INF)|\\\\.(?:nan|NaN|NAN))|(\\\\d{4}-\\\\d{2}-\\\\d{2}|\\\\d{4}-\\\\d{1,2}-\\\\d{1,2}(?:[Tt]|[\\\\t ]+)\\\\d{1,2}:\\\\d{2}:\\\\d{2}(?:\\\\.\\\\d*)?(?:[\\\\t ]*Z|[-+]\\\\d{1,2}(?::\\\\d{1,2})?)?)|(=)|(<<))(?=\\\\s*$|\\\\s+#|\\\\s*:(\\\\s|$))"}]},"flow-scalar-single-quoted":{"begin":"'","beginCaptures":{"0":{"name":"punctuation.definition.string.begin.yaml"}},"end":"'(?!')","endCaptures":{"0":{"name":"punctuation.definition.string.end.yaml"}},"name":"string.quoted.single.yaml","patterns":[{"match":"''","name":"constant.character.escape.single-quoted.yaml"}]},"flow-sequence":{"begin":"\\\\[","beginCaptures":{"0":{"name":"punctuation.definition.sequence.begin.yaml"}},"end":"]","endCaptures":{"0":{"name":"punctuation.definition.sequence.end.yaml"}},"name":"meta.flow-sequence.yaml","patterns":[{"include":"#prototype"},{"match":",","name":"punctuation.separator.sequence.yaml"},{"include":"#flow-pair"},{"include":"#flow-node"}]},"flow-value":{"patterns":[{"begin":"\\\\G(?![],}])","end":"(?=[],}])","name":"meta.flow-pair.value.yaml","patterns":[{"include":"#flow-node"}]}]},"node":{"patterns":[{"include":"#block-node"}]},"property":{"begin":"(?=[!\\\\&])","end":"(?!\\\\G)","name":"meta.property.yaml","patterns":[{"captures":{"1":{"name":"keyword.control.property.anchor.yaml"},"2":{"name":"punctuation.definition.anchor.yaml"},"3":{"name":"entity.name.type.anchor.yaml"},"4":{"name":"invalid.illegal.character.anchor.yaml"}},"match":"\\\\G((&))([^],/\\\\[{}\\\\s]+)(\\\\S+)?"},{"match":"\\\\G!(?:<(?:%\\\\h{2}|[]!#$\\\\&-;=?-\\\\[_a-z~])+>|(?:[-0-9A-Za-z]*!)?(?:%\\\\h{2}|[#$\\\\&-+\\\\--;=?-Z_a-z~])+|)(?=[\\\\t ]|$)","name":"storage.type.tag-handle.yaml"},{"match":"\\\\S+","name":"invalid.illegal.tag-handle.yaml"}]},"prototype":{"patterns":[{"include":"#comment"},{"include":"#property"}]}},"scopeName":"source.yaml","aliases":["yml"]}`))];Object.defineProperty(exports,"n",{enumerable:!0,get:function(){return e}}),Object.defineProperty(exports,"t",{enumerable:!0,get:function(){return t}});
|
|
1
|
+
var e=require("./useOpenapi-CfKOQmG7.cjs").$({default:()=>t}),t=[Object.freeze(JSON.parse(`{"displayName":"YAML","fileTypes":["yaml","yml","rviz","reek","clang-format","yaml-tmlanguage","syntax","sublime-syntax"],"firstLineMatch":"^%YAML( ?1.\\\\d+)?","name":"yaml","patterns":[{"include":"#comment"},{"include":"#property"},{"include":"#directive"},{"match":"^---","name":"entity.other.document.begin.yaml"},{"match":"^\\\\.{3}","name":"entity.other.document.end.yaml"},{"include":"#node"}],"repository":{"block-collection":{"patterns":[{"include":"#block-sequence"},{"include":"#block-mapping"}]},"block-mapping":{"patterns":[{"include":"#block-pair"}]},"block-node":{"patterns":[{"include":"#prototype"},{"include":"#block-scalar"},{"include":"#block-collection"},{"include":"#flow-scalar-plain-out"},{"include":"#flow-node"}]},"block-pair":{"patterns":[{"begin":"\\\\?","beginCaptures":{"1":{"name":"punctuation.definition.key-value.begin.yaml"}},"end":"(?=\\\\?)|^ *(:)|(:)","endCaptures":{"1":{"name":"punctuation.separator.key-value.mapping.yaml"},"2":{"name":"invalid.illegal.expected-newline.yaml"}},"name":"meta.block-mapping.yaml","patterns":[{"include":"#block-node"}]},{"begin":"(?=(?:[^-\\\\]!\\"#%\\\\&'*,:>?@\\\\[\`{|}\\\\s]|[-:?]\\\\S)([^:\\\\s]|:\\\\S|\\\\s+(?![#\\\\s]))*\\\\s*:(\\\\s|$))","end":"(?=\\\\s*$|\\\\s+#|\\\\s*:(\\\\s|$))","patterns":[{"include":"#flow-scalar-plain-out-implicit-type"},{"begin":"[^-\\\\]!\\"#%\\\\&'*,:>?@\\\\[\`{|}\\\\s]|[-:?]\\\\S","beginCaptures":{"0":{"name":"entity.name.tag.yaml"}},"contentName":"entity.name.tag.yaml","end":"(?=\\\\s*$|\\\\s+#|\\\\s*:(\\\\s|$))","name":"string.unquoted.plain.out.yaml"}]},{"match":":(?=\\\\s|$)","name":"punctuation.separator.key-value.mapping.yaml"}]},"block-scalar":{"begin":"(?:(\\\\|)|(>))([1-9])?([-+])?(.*\\\\n?)","beginCaptures":{"1":{"name":"keyword.control.flow.block-scalar.literal.yaml"},"2":{"name":"keyword.control.flow.block-scalar.folded.yaml"},"3":{"name":"constant.numeric.indentation-indicator.yaml"},"4":{"name":"storage.modifier.chomping-indicator.yaml"},"5":{"patterns":[{"include":"#comment"},{"match":".+","name":"invalid.illegal.expected-comment-or-newline.yaml"}]}},"end":"^(?=\\\\S)|(?!\\\\G)","patterns":[{"begin":"^( +)(?! )","end":"^(?!\\\\1|\\\\s*$)","name":"string.unquoted.block.yaml"}]},"block-sequence":{"match":"(-)(?!\\\\S)","name":"punctuation.definition.block.sequence.item.yaml"},"comment":{"begin":"(?:^([\\\\t ]*)|[\\\\t ]+)(?=#\\\\p{print}*$)","beginCaptures":{"1":{"name":"punctuation.whitespace.comment.leading.yaml"}},"end":"(?!\\\\G)","patterns":[{"begin":"#","beginCaptures":{"0":{"name":"punctuation.definition.comment.yaml"}},"end":"\\\\n","name":"comment.line.number-sign.yaml"}]},"directive":{"begin":"^%","beginCaptures":{"0":{"name":"punctuation.definition.directive.begin.yaml"}},"end":"(?=$|[\\\\t ]+($|#))","name":"meta.directive.yaml","patterns":[{"captures":{"1":{"name":"keyword.other.directive.yaml.yaml"},"2":{"name":"constant.numeric.yaml-version.yaml"}},"match":"\\\\G(YAML)[\\\\t ]+(\\\\d+\\\\.\\\\d+)"},{"captures":{"1":{"name":"keyword.other.directive.tag.yaml"},"2":{"name":"storage.type.tag-handle.yaml"},"3":{"name":"support.type.tag-prefix.yaml"}},"match":"\\\\G(TAG)(?:[\\\\t ]+(!(?:[-0-9A-Za-z]*!)?)(?:[\\\\t ]+(!(?:%\\\\h{2}|[]!#$\\\\&-;=?-\\\\[_a-z~])*|(?![]!,\\\\[{}])(?:%\\\\h{2}|[]!#$\\\\&-;=?-\\\\[_a-z~])+))?)?"},{"captures":{"1":{"name":"support.other.directive.reserved.yaml"},"2":{"name":"string.unquoted.directive-name.yaml"},"3":{"name":"string.unquoted.directive-parameter.yaml"}},"match":"\\\\G(\\\\w+)(?:[\\\\t ]+(\\\\w+)(?:[\\\\t ]+(\\\\w+))?)?"},{"match":"\\\\S+","name":"invalid.illegal.unrecognized.yaml"}]},"flow-alias":{"captures":{"1":{"name":"keyword.control.flow.alias.yaml"},"2":{"name":"punctuation.definition.alias.yaml"},"3":{"name":"variable.other.alias.yaml"},"4":{"name":"invalid.illegal.character.anchor.yaml"}},"match":"((\\\\*))([^],/\\\\[{}\\\\s]+)([^],}\\\\s]\\\\S*)?"},"flow-collection":{"patterns":[{"include":"#flow-sequence"},{"include":"#flow-mapping"}]},"flow-mapping":{"begin":"\\\\{","beginCaptures":{"0":{"name":"punctuation.definition.mapping.begin.yaml"}},"end":"}","endCaptures":{"0":{"name":"punctuation.definition.mapping.end.yaml"}},"name":"meta.flow-mapping.yaml","patterns":[{"include":"#prototype"},{"match":",","name":"punctuation.separator.mapping.yaml"},{"include":"#flow-pair"}]},"flow-node":{"patterns":[{"include":"#prototype"},{"include":"#flow-alias"},{"include":"#flow-collection"},{"include":"#flow-scalar"}]},"flow-pair":{"patterns":[{"begin":"\\\\?","beginCaptures":{"0":{"name":"punctuation.definition.key-value.begin.yaml"}},"end":"(?=[],}])","name":"meta.flow-pair.explicit.yaml","patterns":[{"include":"#prototype"},{"include":"#flow-pair"},{"include":"#flow-node"},{"begin":":(?=\\\\s|$|[],\\\\[{}])","beginCaptures":{"0":{"name":"punctuation.separator.key-value.mapping.yaml"}},"end":"(?=[],}])","patterns":[{"include":"#flow-value"}]}]},{"begin":"(?=(?:[^-\\\\]!\\"#%\\\\&'*,:>?@\\\\[\`{|}\\\\s]|[-:?][^],\\\\[{}\\\\s])([^],:\\\\[{}\\\\s]|:[^],\\\\[{}\\\\s]|\\\\s+(?![#\\\\s]))*\\\\s*:(\\\\s|$))","end":"(?=\\\\s*$|\\\\s+#|\\\\s*:(\\\\s|$)|\\\\s*:[],\\\\[{}]|\\\\s*[],\\\\[{}])","name":"meta.flow-pair.key.yaml","patterns":[{"include":"#flow-scalar-plain-in-implicit-type"},{"begin":"[^-\\\\]!\\"#%\\\\&'*,:>?@\\\\[\`{|}\\\\s]|[-:?][^],\\\\[{}\\\\s]","beginCaptures":{"0":{"name":"entity.name.tag.yaml"}},"contentName":"entity.name.tag.yaml","end":"(?=\\\\s*$|\\\\s+#|\\\\s*:(\\\\s|$)|\\\\s*:[],\\\\[{}]|\\\\s*[],\\\\[{}])","name":"string.unquoted.plain.in.yaml"}]},{"include":"#flow-node"},{"begin":":(?=\\\\s|$|[],\\\\[{}])","captures":{"0":{"name":"punctuation.separator.key-value.mapping.yaml"}},"end":"(?=[],}])","name":"meta.flow-pair.yaml","patterns":[{"include":"#flow-value"}]}]},"flow-scalar":{"patterns":[{"include":"#flow-scalar-double-quoted"},{"include":"#flow-scalar-single-quoted"},{"include":"#flow-scalar-plain-in"}]},"flow-scalar-double-quoted":{"begin":"\\"","beginCaptures":{"0":{"name":"punctuation.definition.string.begin.yaml"}},"end":"\\"","endCaptures":{"0":{"name":"punctuation.definition.string.end.yaml"}},"name":"string.quoted.double.yaml","patterns":[{"match":"\\\\\\\\([ \\"/0LN\\\\\\\\_abefnprtv]|x\\\\d\\\\d|u\\\\d{4}|U\\\\d{8})","name":"constant.character.escape.yaml"},{"match":"\\\\\\\\\\\\n","name":"constant.character.escape.double-quoted.newline.yaml"}]},"flow-scalar-plain-in":{"patterns":[{"include":"#flow-scalar-plain-in-implicit-type"},{"begin":"[^-\\\\]!\\"#%\\\\&'*,:>?@\\\\[\`{|}\\\\s]|[-:?][^],\\\\[{}\\\\s]","end":"(?=\\\\s*$|\\\\s+#|\\\\s*:(\\\\s|$)|\\\\s*:[],\\\\[{}]|\\\\s*[],\\\\[{}])","name":"string.unquoted.plain.in.yaml"}]},"flow-scalar-plain-in-implicit-type":{"patterns":[{"captures":{"1":{"name":"constant.language.null.yaml"},"2":{"name":"constant.language.boolean.yaml"},"3":{"name":"constant.numeric.integer.yaml"},"4":{"name":"constant.numeric.float.yaml"},"5":{"name":"constant.other.timestamp.yaml"},"6":{"name":"constant.language.value.yaml"},"7":{"name":"constant.language.merge.yaml"}},"match":"(?:(null|Null|NULL|~)|([Yy]|yes|Yes|YES|[Nn]|no|No|NO|true|True|TRUE|false|False|FALSE|on|On|ON|off|Off|OFF)|([-+]?0b[01_]+|[-+]?0[0-7_]+|[-+]?(?:0|[1-9][0-9_]*)|[-+]?0x[_\\\\h]+|[-+]?[1-9][0-9_]*(?::[0-5]?[0-9])+)|([-+]?(?:[0-9][0-9_]*)?\\\\.[.0-9]*(?:[Ee][-+][0-9]+)?|[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+\\\\.[0-9_]*|[-+]?\\\\.(?:inf|Inf|INF)|\\\\.(?:nan|NaN|NAN))|(\\\\d{4}-\\\\d{2}-\\\\d{2}|\\\\d{4}-\\\\d{1,2}-\\\\d{1,2}(?:[Tt]|[\\\\t ]+)\\\\d{1,2}:\\\\d{2}:\\\\d{2}(?:\\\\.\\\\d*)?(?:[\\\\t ]*Z|[-+]\\\\d{1,2}(?::\\\\d{1,2})?)?)|(=)|(<<))(?=\\\\s*$|\\\\s+#|\\\\s*:(\\\\s|$)|\\\\s*:[],\\\\[{}]|\\\\s*[],\\\\[{}])"}]},"flow-scalar-plain-out":{"patterns":[{"include":"#flow-scalar-plain-out-implicit-type"},{"begin":"[^-\\\\]!\\"#%\\\\&'*,:>?@\\\\[\`{|}\\\\s]|[-:?]\\\\S","end":"(?=\\\\s*$|\\\\s+#|\\\\s*:(\\\\s|$))","name":"string.unquoted.plain.out.yaml"}]},"flow-scalar-plain-out-implicit-type":{"patterns":[{"captures":{"1":{"name":"constant.language.null.yaml"},"2":{"name":"constant.language.boolean.yaml"},"3":{"name":"constant.numeric.integer.yaml"},"4":{"name":"constant.numeric.float.yaml"},"5":{"name":"constant.other.timestamp.yaml"},"6":{"name":"constant.language.value.yaml"},"7":{"name":"constant.language.merge.yaml"}},"match":"(?:(null|Null|NULL|~)|([Yy]|yes|Yes|YES|[Nn]|no|No|NO|true|True|TRUE|false|False|FALSE|on|On|ON|off|Off|OFF)|([-+]?0b[01_]+|[-+]?0[0-7_]+|[-+]?(?:0|[1-9][0-9_]*)|[-+]?0x[_\\\\h]+|[-+]?[1-9][0-9_]*(?::[0-5]?[0-9])+)|([-+]?(?:[0-9][0-9_]*)?\\\\.[.0-9]*(?:[Ee][-+][0-9]+)?|[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+\\\\.[0-9_]*|[-+]?\\\\.(?:inf|Inf|INF)|\\\\.(?:nan|NaN|NAN))|(\\\\d{4}-\\\\d{2}-\\\\d{2}|\\\\d{4}-\\\\d{1,2}-\\\\d{1,2}(?:[Tt]|[\\\\t ]+)\\\\d{1,2}:\\\\d{2}:\\\\d{2}(?:\\\\.\\\\d*)?(?:[\\\\t ]*Z|[-+]\\\\d{1,2}(?::\\\\d{1,2})?)?)|(=)|(<<))(?=\\\\s*$|\\\\s+#|\\\\s*:(\\\\s|$))"}]},"flow-scalar-single-quoted":{"begin":"'","beginCaptures":{"0":{"name":"punctuation.definition.string.begin.yaml"}},"end":"'(?!')","endCaptures":{"0":{"name":"punctuation.definition.string.end.yaml"}},"name":"string.quoted.single.yaml","patterns":[{"match":"''","name":"constant.character.escape.single-quoted.yaml"}]},"flow-sequence":{"begin":"\\\\[","beginCaptures":{"0":{"name":"punctuation.definition.sequence.begin.yaml"}},"end":"]","endCaptures":{"0":{"name":"punctuation.definition.sequence.end.yaml"}},"name":"meta.flow-sequence.yaml","patterns":[{"include":"#prototype"},{"match":",","name":"punctuation.separator.sequence.yaml"},{"include":"#flow-pair"},{"include":"#flow-node"}]},"flow-value":{"patterns":[{"begin":"\\\\G(?![],}])","end":"(?=[],}])","name":"meta.flow-pair.value.yaml","patterns":[{"include":"#flow-node"}]}]},"node":{"patterns":[{"include":"#block-node"}]},"property":{"begin":"(?=[!\\\\&])","end":"(?!\\\\G)","name":"meta.property.yaml","patterns":[{"captures":{"1":{"name":"keyword.control.property.anchor.yaml"},"2":{"name":"punctuation.definition.anchor.yaml"},"3":{"name":"entity.name.type.anchor.yaml"},"4":{"name":"invalid.illegal.character.anchor.yaml"}},"match":"\\\\G((&))([^],/\\\\[{}\\\\s]+)(\\\\S+)?"},{"match":"\\\\G!(?:<(?:%\\\\h{2}|[]!#$\\\\&-;=?-\\\\[_a-z~])+>|(?:[-0-9A-Za-z]*!)?(?:%\\\\h{2}|[#$\\\\&-+\\\\--;=?-Z_a-z~])+|)(?=[\\\\t ]|$)","name":"storage.type.tag-handle.yaml"},{"match":"\\\\S+","name":"invalid.illegal.tag-handle.yaml"}]},"prototype":{"patterns":[{"include":"#comment"},{"include":"#property"}]}},"scopeName":"source.yaml","aliases":["yml"]}`))];Object.defineProperty(exports,"n",{enumerable:!0,get:function(){return e}}),Object.defineProperty(exports,"t",{enumerable:!0,get:function(){return t}});
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { $ as e } from "./useOpenapi-
|
|
1
|
+
import { $ as e } from "./useOpenapi-vxhinHuF.js";
|
|
2
2
|
//#region node_modules/.pnpm/@shikijs+langs@4.4.3/node_modules/@shikijs/langs/dist/yaml.mjs
|
|
3
3
|
var t = /* @__PURE__ */ e({ default: () => n }), n = [Object.freeze(JSON.parse("{\"displayName\":\"YAML\",\"fileTypes\":[\"yaml\",\"yml\",\"rviz\",\"reek\",\"clang-format\",\"yaml-tmlanguage\",\"syntax\",\"sublime-syntax\"],\"firstLineMatch\":\"^%YAML( ?1.\\\\d+)?\",\"name\":\"yaml\",\"patterns\":[{\"include\":\"#comment\"},{\"include\":\"#property\"},{\"include\":\"#directive\"},{\"match\":\"^---\",\"name\":\"entity.other.document.begin.yaml\"},{\"match\":\"^\\\\.{3}\",\"name\":\"entity.other.document.end.yaml\"},{\"include\":\"#node\"}],\"repository\":{\"block-collection\":{\"patterns\":[{\"include\":\"#block-sequence\"},{\"include\":\"#block-mapping\"}]},\"block-mapping\":{\"patterns\":[{\"include\":\"#block-pair\"}]},\"block-node\":{\"patterns\":[{\"include\":\"#prototype\"},{\"include\":\"#block-scalar\"},{\"include\":\"#block-collection\"},{\"include\":\"#flow-scalar-plain-out\"},{\"include\":\"#flow-node\"}]},\"block-pair\":{\"patterns\":[{\"begin\":\"\\\\?\",\"beginCaptures\":{\"1\":{\"name\":\"punctuation.definition.key-value.begin.yaml\"}},\"end\":\"(?=\\\\?)|^ *(:)|(:)\",\"endCaptures\":{\"1\":{\"name\":\"punctuation.separator.key-value.mapping.yaml\"},\"2\":{\"name\":\"invalid.illegal.expected-newline.yaml\"}},\"name\":\"meta.block-mapping.yaml\",\"patterns\":[{\"include\":\"#block-node\"}]},{\"begin\":\"(?=(?:[^-\\\\]!\\\"#%\\\\&'*,:>?@\\\\[`{|}\\\\s]|[-:?]\\\\S)([^:\\\\s]|:\\\\S|\\\\s+(?![#\\\\s]))*\\\\s*:(\\\\s|$))\",\"end\":\"(?=\\\\s*$|\\\\s+#|\\\\s*:(\\\\s|$))\",\"patterns\":[{\"include\":\"#flow-scalar-plain-out-implicit-type\"},{\"begin\":\"[^-\\\\]!\\\"#%\\\\&'*,:>?@\\\\[`{|}\\\\s]|[-:?]\\\\S\",\"beginCaptures\":{\"0\":{\"name\":\"entity.name.tag.yaml\"}},\"contentName\":\"entity.name.tag.yaml\",\"end\":\"(?=\\\\s*$|\\\\s+#|\\\\s*:(\\\\s|$))\",\"name\":\"string.unquoted.plain.out.yaml\"}]},{\"match\":\":(?=\\\\s|$)\",\"name\":\"punctuation.separator.key-value.mapping.yaml\"}]},\"block-scalar\":{\"begin\":\"(?:(\\\\|)|(>))([1-9])?([-+])?(.*\\\\n?)\",\"beginCaptures\":{\"1\":{\"name\":\"keyword.control.flow.block-scalar.literal.yaml\"},\"2\":{\"name\":\"keyword.control.flow.block-scalar.folded.yaml\"},\"3\":{\"name\":\"constant.numeric.indentation-indicator.yaml\"},\"4\":{\"name\":\"storage.modifier.chomping-indicator.yaml\"},\"5\":{\"patterns\":[{\"include\":\"#comment\"},{\"match\":\".+\",\"name\":\"invalid.illegal.expected-comment-or-newline.yaml\"}]}},\"end\":\"^(?=\\\\S)|(?!\\\\G)\",\"patterns\":[{\"begin\":\"^( +)(?! )\",\"end\":\"^(?!\\\\1|\\\\s*$)\",\"name\":\"string.unquoted.block.yaml\"}]},\"block-sequence\":{\"match\":\"(-)(?!\\\\S)\",\"name\":\"punctuation.definition.block.sequence.item.yaml\"},\"comment\":{\"begin\":\"(?:^([\\\\t ]*)|[\\\\t ]+)(?=#\\\\p{print}*$)\",\"beginCaptures\":{\"1\":{\"name\":\"punctuation.whitespace.comment.leading.yaml\"}},\"end\":\"(?!\\\\G)\",\"patterns\":[{\"begin\":\"#\",\"beginCaptures\":{\"0\":{\"name\":\"punctuation.definition.comment.yaml\"}},\"end\":\"\\\\n\",\"name\":\"comment.line.number-sign.yaml\"}]},\"directive\":{\"begin\":\"^%\",\"beginCaptures\":{\"0\":{\"name\":\"punctuation.definition.directive.begin.yaml\"}},\"end\":\"(?=$|[\\\\t ]+($|#))\",\"name\":\"meta.directive.yaml\",\"patterns\":[{\"captures\":{\"1\":{\"name\":\"keyword.other.directive.yaml.yaml\"},\"2\":{\"name\":\"constant.numeric.yaml-version.yaml\"}},\"match\":\"\\\\G(YAML)[\\\\t ]+(\\\\d+\\\\.\\\\d+)\"},{\"captures\":{\"1\":{\"name\":\"keyword.other.directive.tag.yaml\"},\"2\":{\"name\":\"storage.type.tag-handle.yaml\"},\"3\":{\"name\":\"support.type.tag-prefix.yaml\"}},\"match\":\"\\\\G(TAG)(?:[\\\\t ]+(!(?:[-0-9A-Za-z]*!)?)(?:[\\\\t ]+(!(?:%\\\\h{2}|[]!#$\\\\&-;=?-\\\\[_a-z~])*|(?![]!,\\\\[{}])(?:%\\\\h{2}|[]!#$\\\\&-;=?-\\\\[_a-z~])+))?)?\"},{\"captures\":{\"1\":{\"name\":\"support.other.directive.reserved.yaml\"},\"2\":{\"name\":\"string.unquoted.directive-name.yaml\"},\"3\":{\"name\":\"string.unquoted.directive-parameter.yaml\"}},\"match\":\"\\\\G(\\\\w+)(?:[\\\\t ]+(\\\\w+)(?:[\\\\t ]+(\\\\w+))?)?\"},{\"match\":\"\\\\S+\",\"name\":\"invalid.illegal.unrecognized.yaml\"}]},\"flow-alias\":{\"captures\":{\"1\":{\"name\":\"keyword.control.flow.alias.yaml\"},\"2\":{\"name\":\"punctuation.definition.alias.yaml\"},\"3\":{\"name\":\"variable.other.alias.yaml\"},\"4\":{\"name\":\"invalid.illegal.character.anchor.yaml\"}},\"match\":\"((\\\\*))([^],/\\\\[{}\\\\s]+)([^],}\\\\s]\\\\S*)?\"},\"flow-collection\":{\"patterns\":[{\"include\":\"#flow-sequence\"},{\"include\":\"#flow-mapping\"}]},\"flow-mapping\":{\"begin\":\"\\\\{\",\"beginCaptures\":{\"0\":{\"name\":\"punctuation.definition.mapping.begin.yaml\"}},\"end\":\"}\",\"endCaptures\":{\"0\":{\"name\":\"punctuation.definition.mapping.end.yaml\"}},\"name\":\"meta.flow-mapping.yaml\",\"patterns\":[{\"include\":\"#prototype\"},{\"match\":\",\",\"name\":\"punctuation.separator.mapping.yaml\"},{\"include\":\"#flow-pair\"}]},\"flow-node\":{\"patterns\":[{\"include\":\"#prototype\"},{\"include\":\"#flow-alias\"},{\"include\":\"#flow-collection\"},{\"include\":\"#flow-scalar\"}]},\"flow-pair\":{\"patterns\":[{\"begin\":\"\\\\?\",\"beginCaptures\":{\"0\":{\"name\":\"punctuation.definition.key-value.begin.yaml\"}},\"end\":\"(?=[],}])\",\"name\":\"meta.flow-pair.explicit.yaml\",\"patterns\":[{\"include\":\"#prototype\"},{\"include\":\"#flow-pair\"},{\"include\":\"#flow-node\"},{\"begin\":\":(?=\\\\s|$|[],\\\\[{}])\",\"beginCaptures\":{\"0\":{\"name\":\"punctuation.separator.key-value.mapping.yaml\"}},\"end\":\"(?=[],}])\",\"patterns\":[{\"include\":\"#flow-value\"}]}]},{\"begin\":\"(?=(?:[^-\\\\]!\\\"#%\\\\&'*,:>?@\\\\[`{|}\\\\s]|[-:?][^],\\\\[{}\\\\s])([^],:\\\\[{}\\\\s]|:[^],\\\\[{}\\\\s]|\\\\s+(?![#\\\\s]))*\\\\s*:(\\\\s|$))\",\"end\":\"(?=\\\\s*$|\\\\s+#|\\\\s*:(\\\\s|$)|\\\\s*:[],\\\\[{}]|\\\\s*[],\\\\[{}])\",\"name\":\"meta.flow-pair.key.yaml\",\"patterns\":[{\"include\":\"#flow-scalar-plain-in-implicit-type\"},{\"begin\":\"[^-\\\\]!\\\"#%\\\\&'*,:>?@\\\\[`{|}\\\\s]|[-:?][^],\\\\[{}\\\\s]\",\"beginCaptures\":{\"0\":{\"name\":\"entity.name.tag.yaml\"}},\"contentName\":\"entity.name.tag.yaml\",\"end\":\"(?=\\\\s*$|\\\\s+#|\\\\s*:(\\\\s|$)|\\\\s*:[],\\\\[{}]|\\\\s*[],\\\\[{}])\",\"name\":\"string.unquoted.plain.in.yaml\"}]},{\"include\":\"#flow-node\"},{\"begin\":\":(?=\\\\s|$|[],\\\\[{}])\",\"captures\":{\"0\":{\"name\":\"punctuation.separator.key-value.mapping.yaml\"}},\"end\":\"(?=[],}])\",\"name\":\"meta.flow-pair.yaml\",\"patterns\":[{\"include\":\"#flow-value\"}]}]},\"flow-scalar\":{\"patterns\":[{\"include\":\"#flow-scalar-double-quoted\"},{\"include\":\"#flow-scalar-single-quoted\"},{\"include\":\"#flow-scalar-plain-in\"}]},\"flow-scalar-double-quoted\":{\"begin\":\"\\\"\",\"beginCaptures\":{\"0\":{\"name\":\"punctuation.definition.string.begin.yaml\"}},\"end\":\"\\\"\",\"endCaptures\":{\"0\":{\"name\":\"punctuation.definition.string.end.yaml\"}},\"name\":\"string.quoted.double.yaml\",\"patterns\":[{\"match\":\"\\\\\\\\([ \\\"/0LN\\\\\\\\_abefnprtv]|x\\\\d\\\\d|u\\\\d{4}|U\\\\d{8})\",\"name\":\"constant.character.escape.yaml\"},{\"match\":\"\\\\\\\\\\\\n\",\"name\":\"constant.character.escape.double-quoted.newline.yaml\"}]},\"flow-scalar-plain-in\":{\"patterns\":[{\"include\":\"#flow-scalar-plain-in-implicit-type\"},{\"begin\":\"[^-\\\\]!\\\"#%\\\\&'*,:>?@\\\\[`{|}\\\\s]|[-:?][^],\\\\[{}\\\\s]\",\"end\":\"(?=\\\\s*$|\\\\s+#|\\\\s*:(\\\\s|$)|\\\\s*:[],\\\\[{}]|\\\\s*[],\\\\[{}])\",\"name\":\"string.unquoted.plain.in.yaml\"}]},\"flow-scalar-plain-in-implicit-type\":{\"patterns\":[{\"captures\":{\"1\":{\"name\":\"constant.language.null.yaml\"},\"2\":{\"name\":\"constant.language.boolean.yaml\"},\"3\":{\"name\":\"constant.numeric.integer.yaml\"},\"4\":{\"name\":\"constant.numeric.float.yaml\"},\"5\":{\"name\":\"constant.other.timestamp.yaml\"},\"6\":{\"name\":\"constant.language.value.yaml\"},\"7\":{\"name\":\"constant.language.merge.yaml\"}},\"match\":\"(?:(null|Null|NULL|~)|([Yy]|yes|Yes|YES|[Nn]|no|No|NO|true|True|TRUE|false|False|FALSE|on|On|ON|off|Off|OFF)|([-+]?0b[01_]+|[-+]?0[0-7_]+|[-+]?(?:0|[1-9][0-9_]*)|[-+]?0x[_\\\\h]+|[-+]?[1-9][0-9_]*(?::[0-5]?[0-9])+)|([-+]?(?:[0-9][0-9_]*)?\\\\.[.0-9]*(?:[Ee][-+][0-9]+)?|[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+\\\\.[0-9_]*|[-+]?\\\\.(?:inf|Inf|INF)|\\\\.(?:nan|NaN|NAN))|(\\\\d{4}-\\\\d{2}-\\\\d{2}|\\\\d{4}-\\\\d{1,2}-\\\\d{1,2}(?:[Tt]|[\\\\t ]+)\\\\d{1,2}:\\\\d{2}:\\\\d{2}(?:\\\\.\\\\d*)?(?:[\\\\t ]*Z|[-+]\\\\d{1,2}(?::\\\\d{1,2})?)?)|(=)|(<<))(?=\\\\s*$|\\\\s+#|\\\\s*:(\\\\s|$)|\\\\s*:[],\\\\[{}]|\\\\s*[],\\\\[{}])\"}]},\"flow-scalar-plain-out\":{\"patterns\":[{\"include\":\"#flow-scalar-plain-out-implicit-type\"},{\"begin\":\"[^-\\\\]!\\\"#%\\\\&'*,:>?@\\\\[`{|}\\\\s]|[-:?]\\\\S\",\"end\":\"(?=\\\\s*$|\\\\s+#|\\\\s*:(\\\\s|$))\",\"name\":\"string.unquoted.plain.out.yaml\"}]},\"flow-scalar-plain-out-implicit-type\":{\"patterns\":[{\"captures\":{\"1\":{\"name\":\"constant.language.null.yaml\"},\"2\":{\"name\":\"constant.language.boolean.yaml\"},\"3\":{\"name\":\"constant.numeric.integer.yaml\"},\"4\":{\"name\":\"constant.numeric.float.yaml\"},\"5\":{\"name\":\"constant.other.timestamp.yaml\"},\"6\":{\"name\":\"constant.language.value.yaml\"},\"7\":{\"name\":\"constant.language.merge.yaml\"}},\"match\":\"(?:(null|Null|NULL|~)|([Yy]|yes|Yes|YES|[Nn]|no|No|NO|true|True|TRUE|false|False|FALSE|on|On|ON|off|Off|OFF)|([-+]?0b[01_]+|[-+]?0[0-7_]+|[-+]?(?:0|[1-9][0-9_]*)|[-+]?0x[_\\\\h]+|[-+]?[1-9][0-9_]*(?::[0-5]?[0-9])+)|([-+]?(?:[0-9][0-9_]*)?\\\\.[.0-9]*(?:[Ee][-+][0-9]+)?|[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+\\\\.[0-9_]*|[-+]?\\\\.(?:inf|Inf|INF)|\\\\.(?:nan|NaN|NAN))|(\\\\d{4}-\\\\d{2}-\\\\d{2}|\\\\d{4}-\\\\d{1,2}-\\\\d{1,2}(?:[Tt]|[\\\\t ]+)\\\\d{1,2}:\\\\d{2}:\\\\d{2}(?:\\\\.\\\\d*)?(?:[\\\\t ]*Z|[-+]\\\\d{1,2}(?::\\\\d{1,2})?)?)|(=)|(<<))(?=\\\\s*$|\\\\s+#|\\\\s*:(\\\\s|$))\"}]},\"flow-scalar-single-quoted\":{\"begin\":\"'\",\"beginCaptures\":{\"0\":{\"name\":\"punctuation.definition.string.begin.yaml\"}},\"end\":\"'(?!')\",\"endCaptures\":{\"0\":{\"name\":\"punctuation.definition.string.end.yaml\"}},\"name\":\"string.quoted.single.yaml\",\"patterns\":[{\"match\":\"''\",\"name\":\"constant.character.escape.single-quoted.yaml\"}]},\"flow-sequence\":{\"begin\":\"\\\\[\",\"beginCaptures\":{\"0\":{\"name\":\"punctuation.definition.sequence.begin.yaml\"}},\"end\":\"]\",\"endCaptures\":{\"0\":{\"name\":\"punctuation.definition.sequence.end.yaml\"}},\"name\":\"meta.flow-sequence.yaml\",\"patterns\":[{\"include\":\"#prototype\"},{\"match\":\",\",\"name\":\"punctuation.separator.sequence.yaml\"},{\"include\":\"#flow-pair\"},{\"include\":\"#flow-node\"}]},\"flow-value\":{\"patterns\":[{\"begin\":\"\\\\G(?![],}])\",\"end\":\"(?=[],}])\",\"name\":\"meta.flow-pair.value.yaml\",\"patterns\":[{\"include\":\"#flow-node\"}]}]},\"node\":{\"patterns\":[{\"include\":\"#block-node\"}]},\"property\":{\"begin\":\"(?=[!\\\\&])\",\"end\":\"(?!\\\\G)\",\"name\":\"meta.property.yaml\",\"patterns\":[{\"captures\":{\"1\":{\"name\":\"keyword.control.property.anchor.yaml\"},\"2\":{\"name\":\"punctuation.definition.anchor.yaml\"},\"3\":{\"name\":\"entity.name.type.anchor.yaml\"},\"4\":{\"name\":\"invalid.illegal.character.anchor.yaml\"}},\"match\":\"\\\\G((&))([^],/\\\\[{}\\\\s]+)(\\\\S+)?\"},{\"match\":\"\\\\G!(?:<(?:%\\\\h{2}|[]!#$\\\\&-;=?-\\\\[_a-z~])+>|(?:[-0-9A-Za-z]*!)?(?:%\\\\h{2}|[#$\\\\&-+\\\\--;=?-Z_a-z~])+|)(?=[\\\\t ]|$)\",\"name\":\"storage.type.tag-handle.yaml\"},{\"match\":\"\\\\S+\",\"name\":\"invalid.illegal.tag-handle.yaml\"}]},\"prototype\":{\"patterns\":[{\"include\":\"#comment\"},{\"include\":\"#property\"}]}},\"scopeName\":\"source.yaml\",\"aliases\":[\"yml\"]}"))];
|
|
4
4
|
//#endregion
|
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@ import type { InjectionKey } from 'vue'
|
|
|
2
2
|
import type { OpenApiSpecInstance } from '../lib/spec/createOpenApiSpec'
|
|
3
3
|
import type { OpenAPIDocument, ParsedOpenAPI } from '../types'
|
|
4
4
|
import type { PartialUseThemeConfig } from './useTheme'
|
|
5
|
-
import { inject } from 'vue'
|
|
5
|
+
import { hasInjectionContext, inject } from 'vue'
|
|
6
6
|
import { parseOpenapi } from '../lib/parser/parseOpenapi'
|
|
7
7
|
import { createOpenApiSpec } from '../lib/spec/createOpenApiSpec'
|
|
8
8
|
import { parseSpec } from '../lib/utils/parseSpec'
|
|
@@ -48,7 +48,7 @@ async function createInstanceAsync(options: {
|
|
|
48
48
|
}
|
|
49
49
|
|
|
50
50
|
export function injectOpenapi(): OpenApiSpecInstance | null {
|
|
51
|
-
return inject(OPENAPI_LOCAL_KEY, null)
|
|
51
|
+
return hasInjectionContext() ? inject(OPENAPI_LOCAL_KEY, null) : null
|
|
52
52
|
}
|
|
53
53
|
|
|
54
54
|
export function getGlobalOpenapi(): OpenApiSpecInstance | null {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { OpenAPIV3 } from '@scalar/openapi-types'
|
|
2
2
|
import type { OperationData } from '../lib/operation/operationData'
|
|
3
|
-
import { inject, ref } from 'vue'
|
|
3
|
+
import { hasInjectionContext, inject, ref } from 'vue'
|
|
4
4
|
import { OPERATION_DATA_KEY } from '../lib/operation/operationData'
|
|
5
5
|
import { isResponseDownloadable } from '../lib/playground/responseDownloadable'
|
|
6
6
|
import { serializeRequestBody } from '../lib/playground/serializeRequestBody'
|
|
@@ -47,7 +47,9 @@ export function usePlayground() {
|
|
|
47
47
|
const loading = ref(false)
|
|
48
48
|
const response = ref<PlaygroundResponse | null>(null)
|
|
49
49
|
const imageUrls = ref<string[]>([])
|
|
50
|
-
const operationData =
|
|
50
|
+
const operationData = hasInjectionContext()
|
|
51
|
+
? inject<OperationData | undefined>(OPERATION_DATA_KEY, undefined)
|
|
52
|
+
: undefined
|
|
51
53
|
|
|
52
54
|
function setSecuritySchemeDefaultValues(values: Partial<SecuritySchemeDefaultValues>) {
|
|
53
55
|
securitySchemeDefaultValues = {
|
|
@@ -26,6 +26,12 @@ function uiPropertyToJson(property: OAProperty, useExample: boolean): any {
|
|
|
26
26
|
return uiPropertyArrayToJson(property, useExample)
|
|
27
27
|
}
|
|
28
28
|
|
|
29
|
+
// Resolve oneOf/anyOf before literal-type collapsing so nested member
|
|
30
|
+
// examples/enums/formats (e.g. OAS 3.1 nullable anyOf) are not skipped.
|
|
31
|
+
if (isUnionProperty(property)) {
|
|
32
|
+
return resolveUnionProperty(property, useExample)
|
|
33
|
+
}
|
|
34
|
+
|
|
29
35
|
if (isLiteralType(property)) {
|
|
30
36
|
return uiPropertyLiteralToJson(property, useExample)
|
|
31
37
|
}
|
|
@@ -38,15 +44,15 @@ function uiPropertyToJson(property: OAProperty, useExample: boolean): any {
|
|
|
38
44
|
}, useExample)
|
|
39
45
|
}
|
|
40
46
|
|
|
41
|
-
if (isUnionProperty(property)) {
|
|
42
|
-
return resolveUnionProperty(property, useExample)
|
|
43
|
-
}
|
|
44
|
-
|
|
45
47
|
if (containsType(property, 'object')) {
|
|
46
48
|
return uiPropertyObjectToJson(property.properties || [], useExample)
|
|
47
49
|
}
|
|
48
50
|
|
|
49
|
-
return getDefaultValueForType(
|
|
51
|
+
return getDefaultValueForType(
|
|
52
|
+
property.types[0] ?? 'string',
|
|
53
|
+
property.defaultValue,
|
|
54
|
+
useExample ? property.constraints?.format as string | undefined : undefined,
|
|
55
|
+
)
|
|
50
56
|
}
|
|
51
57
|
|
|
52
58
|
function uiPropertyArrayToJson(property: OAProperty, useExample: boolean): any {
|
|
@@ -64,12 +70,35 @@ function uiPropertyArrayToJson(property: OAProperty, useExample: boolean): any {
|
|
|
64
70
|
return [uiPropertyObjectToJson(property.properties, useExample)]
|
|
65
71
|
}
|
|
66
72
|
|
|
73
|
+
if (useExample) {
|
|
74
|
+
// Explicit array example wins; ignore `subexamples`, which hold item examples.
|
|
75
|
+
const example = getPropertyExample({ ...property, subexamples: undefined })
|
|
76
|
+
if (Array.isArray(example)) {
|
|
77
|
+
return example
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
// Primitive item enum/format live on `property.items`, not the array node.
|
|
82
|
+
// Untyped items (e.g. `items: { enum: [...] }`) have no `subtype`, so check first.
|
|
83
|
+
if (property.items) {
|
|
84
|
+
return [uiPropertyToJson(property.items, useExample)]
|
|
85
|
+
}
|
|
86
|
+
|
|
67
87
|
if (property.subtype) {
|
|
68
88
|
if (property.subtype === 'object' && property.properties) {
|
|
69
89
|
return [uiPropertyObjectToJson(property.properties as OAProperty[], useExample)]
|
|
70
90
|
}
|
|
71
91
|
|
|
72
|
-
|
|
92
|
+
if (useExample) {
|
|
93
|
+
const format = property.constraints?.format as string | undefined
|
|
94
|
+
return [
|
|
95
|
+
getPropertyExample(property)
|
|
96
|
+
?? getEnumDefaultValue(property)
|
|
97
|
+
?? getDefaultValueForType(property.subtype, property.defaultValue, format),
|
|
98
|
+
]
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
return [getDefaultValueForType(property.subtype, property.defaultValue)]
|
|
73
102
|
}
|
|
74
103
|
|
|
75
104
|
return []
|
|
@@ -92,13 +121,28 @@ function uiPropertyLiteralToJson(property: OAProperty, useExample: boolean): any
|
|
|
92
121
|
if (example != null) {
|
|
93
122
|
return example
|
|
94
123
|
}
|
|
124
|
+
|
|
125
|
+
// Explicit schema default outranks the first enum value.
|
|
126
|
+
if (property.defaultValue !== undefined) {
|
|
127
|
+
return property.defaultValue
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
const enumDefault = getEnumDefaultValue(property)
|
|
131
|
+
if (enumDefault !== undefined) {
|
|
132
|
+
return enumDefault
|
|
133
|
+
}
|
|
95
134
|
}
|
|
96
135
|
|
|
97
136
|
if (property.constraints?.format === 'binary') {
|
|
98
137
|
return ''
|
|
99
138
|
}
|
|
100
139
|
|
|
101
|
-
return getDefaultValueForType(
|
|
140
|
+
return getDefaultValueForType(
|
|
141
|
+
property.types[0] ?? 'string',
|
|
142
|
+
property.defaultValue,
|
|
143
|
+
// Format placeholders are sample-oriented (same as examples/enums).
|
|
144
|
+
useExample ? property.constraints?.format as string | undefined : undefined,
|
|
145
|
+
)
|
|
102
146
|
}
|
|
103
147
|
|
|
104
148
|
/**
|
|
@@ -111,17 +155,30 @@ function uiPropertyConstantToJson(property: OAProperty): any {
|
|
|
111
155
|
return example
|
|
112
156
|
}
|
|
113
157
|
|
|
114
|
-
return getDefaultValueForType(
|
|
158
|
+
return getDefaultValueForType(
|
|
159
|
+
property.types[0] ?? 'string',
|
|
160
|
+
property.defaultValue,
|
|
161
|
+
property.constraints?.format as string | undefined,
|
|
162
|
+
)
|
|
115
163
|
}
|
|
116
164
|
|
|
117
|
-
function
|
|
165
|
+
function getEnumDefaultValue(property: OAProperty): unknown {
|
|
166
|
+
if (!property.enum || property.enum.length === 0) {
|
|
167
|
+
return undefined
|
|
168
|
+
}
|
|
169
|
+
|
|
170
|
+
const nonNull = property.enum.find(value => value !== null && value !== undefined)
|
|
171
|
+
return nonNull !== undefined ? nonNull : property.enum[0]
|
|
172
|
+
}
|
|
173
|
+
|
|
174
|
+
function getDefaultValueForType(type: string, defaultValue: unknown, format?: string): any {
|
|
118
175
|
if (defaultValue !== undefined) {
|
|
119
176
|
return defaultValue
|
|
120
177
|
}
|
|
121
178
|
|
|
122
179
|
switch (type) {
|
|
123
180
|
case 'string':
|
|
124
|
-
return
|
|
181
|
+
return getDefaultStringForFormat(format)
|
|
125
182
|
case 'number':
|
|
126
183
|
case 'integer':
|
|
127
184
|
return 0
|
|
@@ -140,6 +197,28 @@ function getDefaultValueForType(type: string, defaultValue: unknown): any {
|
|
|
140
197
|
}
|
|
141
198
|
}
|
|
142
199
|
|
|
200
|
+
function getDefaultStringForFormat(format?: string): string {
|
|
201
|
+
switch (format) {
|
|
202
|
+
case 'date-time':
|
|
203
|
+
return '2024-01-01T00:00:00Z'
|
|
204
|
+
case 'date':
|
|
205
|
+
return '2024-01-01'
|
|
206
|
+
case 'time':
|
|
207
|
+
return '00:00:00'
|
|
208
|
+
case 'uuid':
|
|
209
|
+
return '123e4567-e89b-12d3-a456-426614174000'
|
|
210
|
+
case 'email':
|
|
211
|
+
return 'user@example.com'
|
|
212
|
+
case 'uri':
|
|
213
|
+
case 'url':
|
|
214
|
+
return 'https://example.com'
|
|
215
|
+
case 'binary':
|
|
216
|
+
return ''
|
|
217
|
+
default:
|
|
218
|
+
return 'string'
|
|
219
|
+
}
|
|
220
|
+
}
|
|
221
|
+
|
|
143
222
|
function isSingleType(property: OAProperty, type: string): boolean {
|
|
144
223
|
return property.types?.length === 1 && property.types[0] === type
|
|
145
224
|
}
|
|
@@ -169,9 +248,35 @@ function isUnionProperty(property: OAProperty): boolean {
|
|
|
169
248
|
}
|
|
170
249
|
|
|
171
250
|
function resolveUnionProperty(property: OAProperty, useExample: boolean): any {
|
|
251
|
+
// Parent-level example/default on the anyOf/oneOf node win over member fallbacks.
|
|
252
|
+
if (useExample) {
|
|
253
|
+
const example = getPropertyExample(property)
|
|
254
|
+
if (example != null) {
|
|
255
|
+
return example
|
|
256
|
+
}
|
|
257
|
+
}
|
|
258
|
+
|
|
259
|
+
if (property.defaultValue !== undefined) {
|
|
260
|
+
return property.defaultValue
|
|
261
|
+
}
|
|
262
|
+
|
|
172
263
|
if (property.properties && property.properties.length > 0) {
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
264
|
+
const preferred
|
|
265
|
+
= property.properties.find(member => !isSingleType(member, 'null'))
|
|
266
|
+
?? property.properties[0]
|
|
267
|
+
return uiPropertyToJson(preferred, useExample)
|
|
176
268
|
}
|
|
269
|
+
|
|
270
|
+
if (useExample) {
|
|
271
|
+
const enumDefault = getEnumDefaultValue(property)
|
|
272
|
+
if (enumDefault !== undefined) {
|
|
273
|
+
return enumDefault
|
|
274
|
+
}
|
|
275
|
+
}
|
|
276
|
+
|
|
277
|
+
return getDefaultValueForType(
|
|
278
|
+
property.types.find(type => type !== 'null') ?? property.types[0] ?? 'string',
|
|
279
|
+
property.defaultValue,
|
|
280
|
+
useExample ? property.constraints?.format as string | undefined : undefined,
|
|
281
|
+
)
|
|
177
282
|
}
|
|
@@ -27,7 +27,7 @@ export function resolveRefSync(schema: JSONSchema, ref: string): unknown {
|
|
|
27
27
|
|
|
28
28
|
// The ref is a JSON pointer, so walk through the path segments to find the
|
|
29
29
|
// referenced node in the schema. The leading "#" is removed by splitting.
|
|
30
|
-
const path = ref.split('/').slice(1)
|
|
30
|
+
const path = ref.split('/').slice(1).map(unescapePointerSegment)
|
|
31
31
|
|
|
32
32
|
let current: any = schema
|
|
33
33
|
// Walk segment by segment until we either reach the target or hit a dead end
|
|
@@ -44,6 +44,15 @@ export function resolveRefSync(schema: JSONSchema, ref: string): unknown {
|
|
|
44
44
|
return current
|
|
45
45
|
}
|
|
46
46
|
|
|
47
|
+
// RFC 6901: a URI-fragment JSON pointer is percent-encoded, with `~1` for `/` and `~0` for `~`.
|
|
48
|
+
function unescapePointerSegment(segment: string): string {
|
|
49
|
+
try {
|
|
50
|
+
segment = decodeURIComponent(segment)
|
|
51
|
+
}
|
|
52
|
+
catch {}
|
|
53
|
+
return segment.replace(/~1/g, '/').replace(/~0/g, '~')
|
|
54
|
+
}
|
|
55
|
+
|
|
47
56
|
// Lightweight deep clone based on https://github.com/lukeed/klona, License - MIT;
|
|
48
57
|
// implementation from the @trojs/openapi-dereference https://trojs.org/, License - MIT.
|
|
49
58
|
export function klona(val: any): any {
|
|
@@ -129,17 +138,19 @@ export function dereferenceWithAnnotationsSync(schema: JSONSchema): JSONSchema {
|
|
|
129
138
|
return cache.get(schema) as JSONSchema
|
|
130
139
|
}
|
|
131
140
|
|
|
132
|
-
|
|
141
|
+
// Node -> what it resolved to. A `$ref` node reached again (e.g. a shared parameter
|
|
142
|
+
// cloned for a second operation) must yield its resolved value, not the raw `$ref`.
|
|
143
|
+
const resolvedNodes = new Map<any, any>()
|
|
133
144
|
const cloned = klona(schema)
|
|
134
145
|
markOrigins(cloned)
|
|
135
146
|
|
|
136
147
|
const resolve = (current: any): any => {
|
|
137
148
|
if (typeof current === 'object' && current !== null) {
|
|
138
149
|
// Don't process the same object twice to prevent infinite recursion on circular structures
|
|
139
|
-
if (
|
|
140
|
-
return current
|
|
150
|
+
if (resolvedNodes.has(current)) {
|
|
151
|
+
return resolvedNodes.get(current)
|
|
141
152
|
}
|
|
142
|
-
|
|
153
|
+
resolvedNodes.set(current, current)
|
|
143
154
|
|
|
144
155
|
if (Array.isArray(current)) {
|
|
145
156
|
// Recurse into array items
|
|
@@ -154,6 +165,11 @@ export function dereferenceWithAnnotationsSync(schema: JSONSchema): JSONSchema {
|
|
|
154
165
|
ref = resolveRefSync(cloned, ref.$ref)
|
|
155
166
|
} while (ref?.$ref)
|
|
156
167
|
|
|
168
|
+
// Leave unresolvable refs in place instead of aborting the whole dereference.
|
|
169
|
+
if (ref == null) {
|
|
170
|
+
return current
|
|
171
|
+
}
|
|
172
|
+
|
|
157
173
|
// Clone the referenced object so that adding annotations doesn't mutate the cache
|
|
158
174
|
// and keep track of where it originated from
|
|
159
175
|
ref = cloneWithOrigins(ref)
|
|
@@ -165,6 +181,7 @@ export function dereferenceWithAnnotationsSync(schema: JSONSchema): JSONSchema {
|
|
|
165
181
|
ref[key] = current[key]
|
|
166
182
|
}
|
|
167
183
|
}
|
|
184
|
+
resolvedNodes.set(current, ref)
|
|
168
185
|
return ref
|
|
169
186
|
}
|
|
170
187
|
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import type { ParsedContent, ParsedOpenAPI, ParsedOperation } from '../../types'
|
|
2
2
|
import { httpVerbs } from '../../index'
|
|
3
3
|
import { getSchemaExample } from '../examples/getSchemaExample'
|
|
4
|
-
import { getSchemaUi } from './getSchemaUi'
|
|
4
|
+
import { getSchemaUi, SchemaUiCache } from './getSchemaUi'
|
|
5
5
|
|
|
6
|
-
export function generateRequestBodyUi(spec: ParsedOpenAPI): ParsedOpenAPI {
|
|
6
|
+
export function generateRequestBodyUi(spec: ParsedOpenAPI, cache = new SchemaUiCache()): ParsedOpenAPI {
|
|
7
7
|
if (!spec.paths) {
|
|
8
8
|
return spec
|
|
9
9
|
}
|
|
@@ -27,7 +27,7 @@ export function generateRequestBodyUi(spec: ParsedOpenAPI): ParsedOpenAPI {
|
|
|
27
27
|
continue
|
|
28
28
|
}
|
|
29
29
|
|
|
30
|
-
parsedContent.ui = getSchemaUi(parsedContent.schema)
|
|
30
|
+
parsedContent.ui = getSchemaUi(parsedContent.schema, cache)
|
|
31
31
|
parsedContent.examples = {
|
|
32
32
|
...(parsedContent.examples || {}),
|
|
33
33
|
...getSchemaExample(contentType, parsedContent.ui, true),
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import type { ParsedContent, ParsedOpenAPI, ParsedOperation } from '../../types'
|
|
2
2
|
import { httpVerbs } from '../../index'
|
|
3
3
|
import { getSchemaExample } from '../examples/getSchemaExample'
|
|
4
|
-
import { getSchemaUi } from './getSchemaUi'
|
|
4
|
+
import { getSchemaUi, SchemaUiCache } from './getSchemaUi'
|
|
5
5
|
|
|
6
|
-
export function generateResponseUi(spec: ParsedOpenAPI): ParsedOpenAPI {
|
|
6
|
+
export function generateResponseUi(spec: ParsedOpenAPI, cache = new SchemaUiCache()): ParsedOpenAPI {
|
|
7
7
|
if (!spec.paths) {
|
|
8
8
|
return spec
|
|
9
9
|
}
|
|
@@ -28,7 +28,7 @@ export function generateResponseUi(spec: ParsedOpenAPI): ParsedOpenAPI {
|
|
|
28
28
|
continue
|
|
29
29
|
}
|
|
30
30
|
|
|
31
|
-
parsedContent.ui = getSchemaUi(parsedContent.schema)
|
|
31
|
+
parsedContent.ui = getSchemaUi(parsedContent.schema, cache)
|
|
32
32
|
parsedContent.examples = {
|
|
33
33
|
...(parsedContent.examples || {}),
|
|
34
34
|
...getSchemaExample(contentType, parsedContent.ui, true),
|