@redocly/openapi-docs 3.3.20 → 3.3.22
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/redocly-openapi-docs.min.js +243 -243
- package/lib/models/tab.d.ts +1 -1
- package/lib/services/code-samples/httpsnippet/targets/javascript/fetch.js +1 -1
- package/lib/services/code-samples/httpsnippet/targets/node/fetch.js +1 -1
- package/lib/utils/helpers.d.ts +1 -1
- package/lib-esm/models/tab.d.ts +1 -1
- package/lib-esm/services/code-samples/httpsnippet/targets/javascript/fetch.js +1 -1
- package/lib-esm/services/code-samples/httpsnippet/targets/node/fetch.js +1 -1
- package/lib-esm/utils/helpers.d.ts +1 -1
- package/package.json +6 -6
package/lib/models/tab.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";var __importDefault=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(exports,"__esModule",{value:!0}),exports.info=void 0;const stringify_object_1=__importDefault(require("stringify-object")),code_builder_1=require("../../helpers/code-builder"),code_helpers_1=require("../../helpers/code-helpers"),utils_1=require("../../../../utils"),__1=require("../.."),constants_1=require("../../helpers/constants"),constants_2=require("../../../../../constants"),handler=function(e,t,{target:s,client:a}){var n,r,i,o,
|
|
1
|
+
"use strict";var __importDefault=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(exports,"__esModule",{value:!0}),exports.info=void 0;const stringify_object_1=__importDefault(require("stringify-object")),code_builder_1=require("../../helpers/code-builder"),code_helpers_1=require("../../helpers/code-helpers"),utils_1=require("../../../../utils"),__1=require("../.."),constants_1=require("../../helpers/constants"),constants_2=require("../../../../../constants"),handler=function(e,t,{target:s,client:a}){var n,r,i,o,l;const d=Object.assign({indent:" ",credentials:null},t),c=new code_builder_1.CodeBuilder({indentation:d.indent,variablesPrefix:d.variablesPrefix,capitalize:!0,lang:constants_1.Lang.JAVASCRIPT}),p={method:e.method.toUpperCase()};Object.keys(e.headersObj).length&&(p.headers=e.headersObj);let u=!1;if(d.withComments&&addComments(c),null===(n=e.securityOAuth2ExtraCalls)||void 0===n?void 0:n.length){const t=new __1.HTTPSnippet(null===(r=e.securityOAuth2ExtraCalls)||void 0===r?void 0:r[0]).convert(s,a,Object.assign(Object.assign({},d),{withImports:!1,withComments:!1,variablesPrefix:"oAuth2"}));c.push(t),c.blank(),p.headers=p.headers||{},p.headers.Authorization="'Bearer ' + oAuth2Data.access_token",u=!0}null!==d.credentials&&(p.credentials=d.credentials);const h=Object.getOwnPropertyNames(e.queryObj).length;if(h&&c.push(`const ${c.var("query")} = new URLSearchParams(${(0,stringify_object_1.default)(e.queryObj,{indent:d.indent,inlineCharacterLimit:25})}).toString();`).blank(),e.postData)switch((0,utils_1.normalizeMimeType)(e.postData.mimeType)){case constants_2.MediaTypes.URL_ENCODED:p.body=e.postData.paramsObj?`new URLSearchParams(${c.var("formData")}).toString()`:e.postData.text,e.postData.paramsObj&&c.push(`const ${c.var("formData")} = ${(0,code_helpers_1.addIndentation)((0,stringify_object_1.default)(e.postData.paramsObj,{indent:d.indent,inlineCharacterLimit:25}),{level:0,firstLine:!1})};`).blank();break;case constants_2.MediaTypes.JSON:e.postData.jsonObj&&(p.body=`JSON.stringify(${(0,code_helpers_1.addIndentation)((0,stringify_object_1.default)(e.postData.jsonObj,{indent:d.indent,inlineCharacterLimit:25}),{level:1,firstLine:!1})})`);break;case constants_2.MediaTypes.MULTIPART:c.push(`const ${c.var("form")} = new FormData();`),null===(i=null==p?void 0:p.headers)||void 0===i||delete i["Content-Type"],e.postData.params.forEach((function(e){c.push(`${c.var("form")}.append(%s, %s);`,JSON.stringify(e.name),JSON.stringify(e.value||e.fileName||""))})),p.body=c.var("form"),c.blank();break;default:e.postData.text&&(p.body=`\`${(0,code_helpers_1.addIndentation)(e.postData.text,{level:2,indent:d.indent,firstLine:!1}).trim()}\``)}const _=p.headers&&p.headers.Accept&&(0,utils_1.normalizeMimeType)(p.headers.Accept)===constants_2.MediaTypes.JSON||(0,utils_1.normalizeMimeType)(null===(o=e.postData)||void 0===o?void 0:o.mimeType)===constants_2.MediaTypes.JSON;if(e.basicAuth){const{username:t,password:s}=e.basicAuth;p.headers=p.headers||{},p.headers.Authorization=`'Basic ' + btoa('${t}:${s}')`,u=!0}(0,code_helpers_1.printUrlVariablesDeclarations)(e,c);const m=(0,code_helpers_1.buildUrlExpression)(e,c);return c.push(`const ${c.var("resp")} = await fetch(`).push(1,"`"+m+(h?"?${"+c.var("query")+"}":"")+"`,").push((0,code_helpers_1.addIndentation)((0,stringify_object_1.default)(p,{indent:d.indent,inlineCharacterLimit:25,transform:(0,code_helpers_1.getPreserveTransformer)({body:!0,authorizationHeader:u})}),{level:1,indent:d.indent})).push(");").blank(),(null===(l=e.allResponseCodes)||void 0===l?void 0:l.includes("204"))?(c.push("if (resp.status === 204) {").push(1,"console.log('success');").push("} else {"),c.push(1,`const ${c.var("data")} = await ${c.var("resp")}.${_?"json()":"text()"};`).push(1,`console.log(${c.var("data")});`).push("}")):c.push(`const ${c.var("data")} = await ${c.var("resp")}.${_?"json()":"text()"};`).push(`console.log(${c.var("data")});`),c.join()};function addComments(e){e.push("/**"),e.push(" * Requires ES8-compatible browser: https://caniuse.com/async-functions"),e.push(" */"),e.blank()}exports.info={key:"fetch",title:"fetch",link:"https://developer.mozilla.org/en-US/docs/Web/API/Fetch_API/Using_Fetch",description:"Perform asynchronous HTTP requests with the Fetch API"},exports.default=handler;
|
|
2
2
|
//# sourceMappingURL=fetch.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";var __importDefault=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(exports,"__esModule",{value:!0}),exports.info=void 0;const stringify_object_1=__importDefault(require("stringify-object")),code_builder_1=require("../../helpers/code-builder"),code_helpers_1=require("../../helpers/code-helpers"),constants_1=require("../../helpers/constants"),utils_1=require("../../../../utils"),__1=require("../.."),constants_2=require("../../../../../constants"),handler=function(e,t,{target:a,client:s}){var n,r,i,o,l
|
|
1
|
+
"use strict";var __importDefault=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(exports,"__esModule",{value:!0}),exports.info=void 0;const stringify_object_1=__importDefault(require("stringify-object")),code_builder_1=require("../../helpers/code-builder"),code_helpers_1=require("../../helpers/code-helpers"),constants_1=require("../../helpers/constants"),utils_1=require("../../../../utils"),__1=require("../.."),constants_2=require("../../../../../constants"),handler=function(e,t,{target:a,client:s}){var n,r,i,o,l;const d=Object.assign({indent:" ",showBoilerplate:!0,level:1},t),{level:p}=d;let c=!1;const h=new code_builder_1.CodeBuilder({indentation:d.indent,variablesPrefix:d.variablesPrefix,capitalize:!0,lang:constants_1.Lang.NODEJS});d.withComments&&addComments(h),d.withImports&&(h.push("import fetch from 'node-fetch';"),h.blank()),d.showBoilerplate&&h.push("async function run() {");const u={method:e.method.toUpperCase()};Object.keys(e.headersObj).length&&(u.headers=e.headersObj);let m=!1;if(null===(n=e.securityOAuth2ExtraCalls)||void 0===n?void 0:n.length){const t=new __1.HTTPSnippet(null===(r=e.securityOAuth2ExtraCalls)||void 0===r?void 0:r[0]).convert(a,s,Object.assign(Object.assign({},d),{withImports:!1,withComments:!1,variablesPrefix:"oAuth2",showBoilerplate:!1,level:1}));h.push(t),h.blank(),u.headers=u.headers||{},u.headers.Authorization="'Bearer ' + oAuth2Data.access_token",m=!0}const f=Object.getOwnPropertyNames(e.queryObj).length;if(f&&h.push(p,`const ${h.var("query")} = new URLSearchParams(${(0,code_helpers_1.addIndentation)((0,stringify_object_1.default)(e.queryObj,{indent:d.indent,inlineCharacterLimit:25}),{level:p,indent:d.indent,firstLine:!1})}).toString();`).blank(),e.postData)switch((0,utils_1.normalizeMimeType)(e.postData.mimeType)){case constants_2.MediaTypes.URL_ENCODED:u.body=e.postData.paramsObj?`new URLSearchParams(${h.var("formData")}).toString()`:e.postData.text,e.postData.paramsObj&&h.push(p,`const ${h.var("formData")} = ${(0,code_helpers_1.addIndentation)((0,stringify_object_1.default)(e.postData.paramsObj,{indent:d.indent,inlineCharacterLimit:25}),{level:p,firstLine:!1})};`).blank();break;case constants_2.MediaTypes.JSON:e.postData.jsonObj&&(u.body=`JSON.stringify(${(0,code_helpers_1.addIndentation)((0,stringify_object_1.default)(e.postData.jsonObj,{indent:d.indent,inlineCharacterLimit:25}),{level:p,firstLine:!1})})`);break;case constants_2.MediaTypes.MULTIPART:null===(i=null==u?void 0:u.headers)||void 0===i||delete i["Content-Type"],d.withImports&&h.unshift("import FormData from 'form-data';"),h.push(p,`const ${h.var("form")} = new FormData();`),e.postData.params.forEach((function(e){e.fileName||e.fileName||e.contentType?e.fileName&&(c=!0,h.blank(),h.push(p,`${h.var("form")}.append('" + param.name + "', fs.createReadStream('" + param.fileName + "'));`)):h.push(p,"form.append('"+e.name+"','"+e.value+"');")})),u.body=h.var("form"),h.blank();break;default:e.postData.text&&(u.body=`\`${(0,code_helpers_1.addIndentation)(e.postData.text,{level:p+1,indent:d.indent,firstLine:!1}).trim()}\``)}if(e.cookies.length){let t="";e.cookies.forEach((function(e){t=t+encodeURIComponent(e.name)+"="+encodeURIComponent(e.value)+"; "})),t=t.trim(),u.headers||(u.headers={}),u.headers.cookie=t}if(e.basicAuth){const{username:t,password:a}=e.basicAuth;u.headers=u.headers||{},u.headers.Authorization=`'Basic ' + Buffer.from('${t}:${a}').toString('base64')`,m=!0}c&&d.withImports&&h.unshift("import fs from 'fs';");const _=u.headers&&u.headers.Accept&&(0,utils_1.normalizeMimeType)(u.headers.Accept)===constants_2.MediaTypes.JSON||(0,utils_1.normalizeMimeType)(null===(o=e.postData)||void 0===o?void 0:o.mimeType)===constants_2.MediaTypes.JSON;(0,code_helpers_1.printUrlVariablesDeclarations)(e,h,p);const b=(0,code_helpers_1.buildUrlExpression)(e,h);return h.push(p,`const ${h.var("resp")} = await fetch(`).push(p+1,"`"+b+(f?"?${"+h.var("query")+"}":"")+"`,").push(p+1,(0,code_helpers_1.addIndentation)((0,stringify_object_1.default)(u,{indent:d.indent,inlineCharacterLimit:25,transform:(0,code_helpers_1.getPreserveTransformer)({body:!0,authorizationHeader:m})}),{level:p+1,indent:d.indent,firstLine:!1})).push(p,");").blank(),(null===(l=e.allResponseCodes)||void 0===l?void 0:l.includes("204"))?(h.push(p,"if (resp.status === 204) {").push(p+1,"console.log('success');").push(p,"} else {"),h.push(p+1,`const ${h.var("data")} = await ${h.var("resp")}.${_?"json()":"text()"};`).push(p+1,`console.log(${h.var("data")});`).push(p,"}")):h.push(p,`const ${h.var("data")} = await ${h.var("resp")}.${_?"json()":"text()"};`).push(p,`console.log(${h.var("data")});`),d.showBoilerplate&&h.push("}").blank().push("run();"),h.join().replace(/"fs\.createReadStream\(\\"(.+)\\"\)"/,'fs.createReadStream("$1")')};function addComments(e){e.push("/**"),e.push(" * Requires Node.js >= 14"),e.push(" *"),e.push(' * Requires module "node-fetch" >= 2.6.1'),e.push(" * See here for installation details:"),e.push(" * https://www.npmjs.com/package/node-fetch"),e.push(" */"),e.blank()}exports.info={key:"fetch",title:"Fetch",link:"https://github.com/bitinn/node-fetch",description:"Simplified HTTP node-fetch client"},exports.default=handler;
|
|
2
2
|
//# sourceMappingURL=fetch.js.map
|
package/lib/utils/helpers.d.ts
CHANGED
|
@@ -43,4 +43,4 @@ export declare function getJsUrl(): string;
|
|
|
43
43
|
export declare const normalizeText: (text?: string | GenericObject) => string;
|
|
44
44
|
export declare const getValueFromMdParsedExtension: (item: GenericObject, key: 'description' | 'summary' | 'x-summary' | 'x-enumDescriptions') => any;
|
|
45
45
|
export declare function isLastInArray(arr: Array<unknown>, index: number): boolean;
|
|
46
|
-
export declare function isLastProperty(obj:
|
|
46
|
+
export declare function isLastProperty(obj: object, key: string): boolean;
|
package/lib-esm/models/tab.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import stringifyObject from"stringify-object";import{CodeBuilder}from"../../helpers/code-builder";import{addIndentation,getPreserveTransformer,buildUrlExpression,printUrlVariablesDeclarations}from"../../helpers/code-helpers";import{normalizeMimeType}from"../../../../utils";import{HTTPSnippet}from"../..";import{Lang}from"../../helpers/constants";import{MediaTypes}from"../../../../../constants";const handler=function(e,t,{target:a,client:n}){var s,i,
|
|
1
|
+
import stringifyObject from"stringify-object";import{CodeBuilder}from"../../helpers/code-builder";import{addIndentation,getPreserveTransformer,buildUrlExpression,printUrlVariablesDeclarations}from"../../helpers/code-helpers";import{normalizeMimeType}from"../../../../utils";import{HTTPSnippet}from"../..";import{Lang}from"../../helpers/constants";import{MediaTypes}from"../../../../../constants";const handler=function(e,t,{target:a,client:n}){var s,r,i,o,d;const l=Object.assign({indent:" ",credentials:null},t),p=new CodeBuilder({indentation:l.indent,variablesPrefix:l.variablesPrefix,capitalize:!0,lang:Lang.JAVASCRIPT}),c={method:e.method.toUpperCase()};Object.keys(e.headersObj).length&&(c.headers=e.headersObj);let h=!1;if(l.withComments&&addComments(p),null===(s=e.securityOAuth2ExtraCalls)||void 0===s?void 0:s.length){const t=new HTTPSnippet(null===(r=e.securityOAuth2ExtraCalls)||void 0===r?void 0:r[0]).convert(a,n,Object.assign(Object.assign({},l),{withImports:!1,withComments:!1,variablesPrefix:"oAuth2"}));p.push(t),p.blank(),c.headers=c.headers||{},c.headers.Authorization="'Bearer ' + oAuth2Data.access_token",h=!0}null!==l.credentials&&(c.credentials=l.credentials);const m=Object.getOwnPropertyNames(e.queryObj).length;if(m&&p.push(`const ${p.var("query")} = new URLSearchParams(${stringifyObject(e.queryObj,{indent:l.indent,inlineCharacterLimit:25})}).toString();`).blank(),e.postData)switch(normalizeMimeType(e.postData.mimeType)){case MediaTypes.URL_ENCODED:c.body=e.postData.paramsObj?`new URLSearchParams(${p.var("formData")}).toString()`:e.postData.text,e.postData.paramsObj&&p.push(`const ${p.var("formData")} = ${addIndentation(stringifyObject(e.postData.paramsObj,{indent:l.indent,inlineCharacterLimit:25}),{level:0,firstLine:!1})};`).blank();break;case MediaTypes.JSON:e.postData.jsonObj&&(c.body=`JSON.stringify(${addIndentation(stringifyObject(e.postData.jsonObj,{indent:l.indent,inlineCharacterLimit:25}),{level:1,firstLine:!1})})`);break;case MediaTypes.MULTIPART:p.push(`const ${p.var("form")} = new FormData();`),null===(i=null==c?void 0:c.headers)||void 0===i||delete i["Content-Type"],e.postData.params.forEach((function(e){p.push(`${p.var("form")}.append(%s, %s);`,JSON.stringify(e.name),JSON.stringify(e.value||e.fileName||""))})),c.body=p.var("form"),p.blank();break;default:e.postData.text&&(c.body=`\`${addIndentation(e.postData.text,{level:2,indent:l.indent,firstLine:!1}).trim()}\``)}const u=c.headers&&c.headers.Accept&&normalizeMimeType(c.headers.Accept)===MediaTypes.JSON||normalizeMimeType(null===(o=e.postData)||void 0===o?void 0:o.mimeType)===MediaTypes.JSON;if(e.basicAuth){const{username:t,password:a}=e.basicAuth;c.headers=c.headers||{},c.headers.Authorization=`'Basic ' + btoa('${t}:${a}')`,h=!0}printUrlVariablesDeclarations(e,p);const b=buildUrlExpression(e,p);return p.push(`const ${p.var("resp")} = await fetch(`).push(1,"`"+b+(m?"?${"+p.var("query")+"}":"")+"`,").push(addIndentation(stringifyObject(c,{indent:l.indent,inlineCharacterLimit:25,transform:getPreserveTransformer({body:!0,authorizationHeader:h})}),{level:1,indent:l.indent})).push(");").blank(),(null===(d=e.allResponseCodes)||void 0===d?void 0:d.includes("204"))?(p.push("if (resp.status === 204) {").push(1,"console.log('success');").push("} else {"),p.push(1,`const ${p.var("data")} = await ${p.var("resp")}.${u?"json()":"text()"};`).push(1,`console.log(${p.var("data")});`).push("}")):p.push(`const ${p.var("data")} = await ${p.var("resp")}.${u?"json()":"text()"};`).push(`console.log(${p.var("data")});`),p.join()};function addComments(e){e.push("/**"),e.push(" * Requires ES8-compatible browser: https://caniuse.com/async-functions"),e.push(" */"),e.blank()}export const info={key:"fetch",title:"fetch",link:"https://developer.mozilla.org/en-US/docs/Web/API/Fetch_API/Using_Fetch",description:"Perform asynchronous HTTP requests with the Fetch API"};export default handler;
|
|
2
2
|
//# sourceMappingURL=fetch.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import stringifyObject from"stringify-object";import{CodeBuilder}from"../../helpers/code-builder";import{addIndentation,getPreserveTransformer,buildUrlExpression,printUrlVariablesDeclarations}from"../../helpers/code-helpers";import{Lang}from"../../helpers/constants";import{normalizeMimeType}from"../../../../utils";import{HTTPSnippet}from"../..";import{MediaTypes}from"../../../../../constants";const handler=function(e,t,{target:a,client:n}){var s,i,r,o,d
|
|
1
|
+
import stringifyObject from"stringify-object";import{CodeBuilder}from"../../helpers/code-builder";import{addIndentation,getPreserveTransformer,buildUrlExpression,printUrlVariablesDeclarations}from"../../helpers/code-helpers";import{Lang}from"../../helpers/constants";import{normalizeMimeType}from"../../../../utils";import{HTTPSnippet}from"../..";import{MediaTypes}from"../../../../../constants";const handler=function(e,t,{target:a,client:n}){var s,i,r,o,d;const l=Object.assign({indent:" ",showBoilerplate:!0,level:1},t),{level:p}=l;let h=!1;const c=new CodeBuilder({indentation:l.indent,variablesPrefix:l.variablesPrefix,capitalize:!0,lang:Lang.NODEJS});l.withComments&&addComments(c),l.withImports&&(c.push("import fetch from 'node-fetch';"),c.blank()),l.showBoilerplate&&c.push("async function run() {");const m={method:e.method.toUpperCase()};Object.keys(e.headersObj).length&&(m.headers=e.headersObj);let u=!1;if(null===(s=e.securityOAuth2ExtraCalls)||void 0===s?void 0:s.length){const t=new HTTPSnippet(null===(i=e.securityOAuth2ExtraCalls)||void 0===i?void 0:i[0]).convert(a,n,Object.assign(Object.assign({},l),{withImports:!1,withComments:!1,variablesPrefix:"oAuth2",showBoilerplate:!1,level:1}));c.push(t),c.blank(),m.headers=m.headers||{},m.headers.Authorization="'Bearer ' + oAuth2Data.access_token",u=!0}const f=Object.getOwnPropertyNames(e.queryObj).length;if(f&&c.push(p,`const ${c.var("query")} = new URLSearchParams(${addIndentation(stringifyObject(e.queryObj,{indent:l.indent,inlineCharacterLimit:25}),{level:p,indent:l.indent,firstLine:!1})}).toString();`).blank(),e.postData)switch(normalizeMimeType(e.postData.mimeType)){case MediaTypes.URL_ENCODED:m.body=e.postData.paramsObj?`new URLSearchParams(${c.var("formData")}).toString()`:e.postData.text,e.postData.paramsObj&&c.push(p,`const ${c.var("formData")} = ${addIndentation(stringifyObject(e.postData.paramsObj,{indent:l.indent,inlineCharacterLimit:25}),{level:p,firstLine:!1})};`).blank();break;case MediaTypes.JSON:e.postData.jsonObj&&(m.body=`JSON.stringify(${addIndentation(stringifyObject(e.postData.jsonObj,{indent:l.indent,inlineCharacterLimit:25}),{level:p,firstLine:!1})})`);break;case MediaTypes.MULTIPART:null===(r=null==m?void 0:m.headers)||void 0===r||delete r["Content-Type"],l.withImports&&c.unshift("import FormData from 'form-data';"),c.push(p,`const ${c.var("form")} = new FormData();`),e.postData.params.forEach((function(e){e.fileName||e.fileName||e.contentType?e.fileName&&(h=!0,c.blank(),c.push(p,`${c.var("form")}.append('" + param.name + "', fs.createReadStream('" + param.fileName + "'));`)):c.push(p,"form.append('"+e.name+"','"+e.value+"');")})),m.body=c.var("form"),c.blank();break;default:e.postData.text&&(m.body=`\`${addIndentation(e.postData.text,{level:p+1,indent:l.indent,firstLine:!1}).trim()}\``)}if(e.cookies.length){let t="";e.cookies.forEach((function(e){t=t+encodeURIComponent(e.name)+"="+encodeURIComponent(e.value)+"; "})),t=t.trim(),m.headers||(m.headers={}),m.headers.cookie=t}if(e.basicAuth){const{username:t,password:a}=e.basicAuth;m.headers=m.headers||{},m.headers.Authorization=`'Basic ' + Buffer.from('${t}:${a}').toString('base64')`,u=!0}h&&l.withImports&&c.unshift("import fs from 'fs';");const b=m.headers&&m.headers.Accept&&normalizeMimeType(m.headers.Accept)===MediaTypes.JSON||normalizeMimeType(null===(o=e.postData)||void 0===o?void 0:o.mimeType)===MediaTypes.JSON;printUrlVariablesDeclarations(e,c,p);const v=buildUrlExpression(e,c);return c.push(p,`const ${c.var("resp")} = await fetch(`).push(p+1,"`"+v+(f?"?${"+c.var("query")+"}":"")+"`,").push(p+1,addIndentation(stringifyObject(m,{indent:l.indent,inlineCharacterLimit:25,transform:getPreserveTransformer({body:!0,authorizationHeader:u})}),{level:p+1,indent:l.indent,firstLine:!1})).push(p,");").blank(),(null===(d=e.allResponseCodes)||void 0===d?void 0:d.includes("204"))?(c.push(p,"if (resp.status === 204) {").push(p+1,"console.log('success');").push(p,"} else {"),c.push(p+1,`const ${c.var("data")} = await ${c.var("resp")}.${b?"json()":"text()"};`).push(p+1,`console.log(${c.var("data")});`).push(p,"}")):c.push(p,`const ${c.var("data")} = await ${c.var("resp")}.${b?"json()":"text()"};`).push(p,`console.log(${c.var("data")});`),l.showBoilerplate&&c.push("}").blank().push("run();"),c.join().replace(/"fs\.createReadStream\(\\"(.+)\\"\)"/,'fs.createReadStream("$1")')};function addComments(e){e.push("/**"),e.push(" * Requires Node.js >= 14"),e.push(" *"),e.push(' * Requires module "node-fetch" >= 2.6.1'),e.push(" * See here for installation details:"),e.push(" * https://www.npmjs.com/package/node-fetch"),e.push(" */"),e.blank()}export const info={key:"fetch",title:"Fetch",link:"https://github.com/bitinn/node-fetch",description:"Simplified HTTP node-fetch client"};export default handler;
|
|
2
2
|
//# sourceMappingURL=fetch.js.map
|
|
@@ -43,4 +43,4 @@ export declare function getJsUrl(): string;
|
|
|
43
43
|
export declare const normalizeText: (text?: string | GenericObject) => string;
|
|
44
44
|
export declare const getValueFromMdParsedExtension: (item: GenericObject, key: 'description' | 'summary' | 'x-summary' | 'x-enumDescriptions') => any;
|
|
45
45
|
export declare function isLastInArray(arr: Array<unknown>, index: number): boolean;
|
|
46
|
-
export declare function isLastProperty(obj:
|
|
46
|
+
export declare function isLastProperty(obj: object, key: string): boolean;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@redocly/openapi-docs",
|
|
3
|
-
"version": "3.3.
|
|
3
|
+
"version": "3.3.22",
|
|
4
4
|
"description": "Redocly OpenAPI Docs",
|
|
5
5
|
"main": "lib/index.js",
|
|
6
6
|
"module": "lib-esm/index.js",
|
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
},
|
|
25
25
|
"dependencies": {
|
|
26
26
|
"@markdoc/markdoc": "0.4.0",
|
|
27
|
-
"@redocly/openapi-core": "1.25.
|
|
27
|
+
"@redocly/openapi-core": "1.25.3",
|
|
28
28
|
"deepmerge": "^4.2.2",
|
|
29
29
|
"dompurify": "^2.0.12",
|
|
30
30
|
"fast-deep-equal": "^3.1.3",
|
|
@@ -33,8 +33,8 @@
|
|
|
33
33
|
"lunr": "^2.3.8",
|
|
34
34
|
"openapi-sampler": "^1.5.1",
|
|
35
35
|
"path-browserify": "^1.0.1",
|
|
36
|
-
"prismjs": "
|
|
37
|
-
"react-router-dom": "
|
|
36
|
+
"prismjs": "1.29.0",
|
|
37
|
+
"react-router-dom": "6.21.1",
|
|
38
38
|
"slugify": "^1.4.4",
|
|
39
39
|
"stickyfill": "^1.1.1",
|
|
40
40
|
"stringify-object": "^3.3.0",
|
|
@@ -45,7 +45,7 @@
|
|
|
45
45
|
"url": "~0.11.0",
|
|
46
46
|
"url-template": "^2.0.8",
|
|
47
47
|
"util": "~0.12.5",
|
|
48
|
-
"@redocly/replay": "0.5.
|
|
48
|
+
"@redocly/replay": "0.5.17",
|
|
49
49
|
"@redocly/config": "0.12.0"
|
|
50
50
|
},
|
|
51
51
|
"devDependencies": {
|
|
@@ -93,7 +93,7 @@
|
|
|
93
93
|
"webpack": "5.94.0",
|
|
94
94
|
"webpack-cli": "5.1.4",
|
|
95
95
|
"webpack-dev-server": "5.1.0",
|
|
96
|
-
"@redocly/theme": "0.
|
|
96
|
+
"@redocly/theme": "0.44.0"
|
|
97
97
|
},
|
|
98
98
|
"scripts": {
|
|
99
99
|
"start": "webpack serve --mode=development --hot",
|