@redocly/openapi-docs 3.19.0-next.6 → 3.19.0-next.8
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 +2410 -1983
- package/lib/components/Download/DownloadSpecification.js +4 -4
- package/lib/components/Language/LanguageList.d.ts +2 -0
- package/lib/components/Language/LanguageList.js +1 -1
- package/lib/components/Overview/Overview.js +1 -1
- package/lib/components/Replay/Replay.js +1 -1
- package/lib/components/Replay/utils.d.ts +3 -2
- package/lib/components/Replay/utils.js +1 -1
- package/lib/components/RightPanel/RightPanel.js +1 -1
- package/lib/components/ServerList/ServerList.js +11 -11
- package/lib/services/code-samples/httpsnippet/helpers/code-builder.js +3 -3
- package/lib/services/code-samples/httpsnippet/helpers/code-helpers.js +2 -2
- package/lib/services/code-samples/httpsnippet/helpers/mocks/code-helpers-mock.js +26 -2
- package/package.json +6 -6
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{jsx as e,Fragment as d,jsxs as s}from"react/jsx-runtime";import{memo as p,useCallback as f}from"react";import{
|
|
1
|
+
import{jsx as e,Fragment as d,jsxs as s}from"react/jsx-runtime";import{memo as p,useCallback as f}from"react";import{getPathPrefix as x,combineUrls as g}from"@redocly/theme/core/openapi";import{DocumentIcon as w}from"@redocly/theme/icons/DocumentIcon/DocumentIcon";import{JsonIcon as b}from"@redocly/theme/icons/JsonIcon/JsonIcon";import{FileIcon as u}from"@redocly/theme/icons/FileIcon/FileIcon";import{DownloadButton as h}from"@redocly/theme/components/Buttons/DownloadButton";import{useTelemetry as y}from"../../hooks/index.js";import{styled as r}from"../../styled-components.js";function v({downloadObjects:t}){const l=y(),n=x(),c=f(o=>{switch(o){case"yaml":return e(w,{});case"json":return e(b,{});default:return e(u,{})}},[]);return t?e(D,{children:(t||[]).map(({title:o,url:a,iconType:m})=>{const i=n?g(n,a):a;return s(k,{onClick:()=>{l.sendDownloadDefinitionClickedMessage()},children:[s(j,{children:[c(m),e("a",{href:i,target:"_blank",download:!0,rel:"noreferrer",children:o})]}),e(h,{data:i})]},o)})}):e(d,{})}const J=p(v),k=r.div`
|
|
2
2
|
display: flex;
|
|
3
3
|
align-items: baseline;
|
|
4
4
|
justify-content: space-between;
|
|
@@ -10,7 +10,7 @@ import{jsx as e,Fragment as d,jsxs as s}from"react/jsx-runtime";import{memo as p
|
|
|
10
10
|
padding-bottom: 0px;
|
|
11
11
|
border-bottom: none;
|
|
12
12
|
}
|
|
13
|
-
`,
|
|
13
|
+
`,j=r.span`
|
|
14
14
|
display: flex;
|
|
15
15
|
width: calc(100% - 25px);
|
|
16
16
|
gap: var(--spacing-xs);
|
|
@@ -28,7 +28,7 @@ import{jsx as e,Fragment as d,jsxs as s}from"react/jsx-runtime";import{memo as p
|
|
|
28
28
|
overflow: hidden;
|
|
29
29
|
white-space: nowrap;
|
|
30
30
|
}
|
|
31
|
-
`,
|
|
31
|
+
`,D=r.div`
|
|
32
32
|
display: flex;
|
|
33
33
|
align-items: center;
|
|
34
34
|
align-self: flex-start;
|
|
@@ -36,4 +36,4 @@ import{jsx as e,Fragment as d,jsxs as s}from"react/jsx-runtime";import{memo as p
|
|
|
36
36
|
flex-direction: column;
|
|
37
37
|
gap: var(--spacing-sm);
|
|
38
38
|
font-size: var(--font-size-base);
|
|
39
|
-
`;export{
|
|
39
|
+
`;export{J as DownloadSpecification};
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { TFunction } from '@redocly/theme/core/openapi';
|
|
1
2
|
import type { TabType } from '../../models/tab.js';
|
|
2
3
|
type LangTypeType = TabType<{
|
|
3
4
|
lang: string;
|
|
@@ -5,6 +6,7 @@ type LangTypeType = TabType<{
|
|
|
5
6
|
interface LanguageListProps {
|
|
6
7
|
languages: LangTypeType[];
|
|
7
8
|
activeLanguage: string;
|
|
9
|
+
translate: TFunction;
|
|
8
10
|
}
|
|
9
11
|
export declare const LanguageList: import("react").NamedExoticComponent<LanguageListProps>;
|
|
10
12
|
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as a,jsxs as I}from"react/jsx-runtime";import{useLayoutEffect as
|
|
1
|
+
import{jsx as a,jsxs as I}from"react/jsx-runtime";import{useLayoutEffect as j,useRef as A,useState as w,useCallback as S,memo as V,useMemo as E}from"react";import{useAtomValue as H,useSetAtom as W}from"jotai";import{Button as _}from"@redocly/theme/components/Button/Button";import{OverflowMenuVerticalIcon as v}from"@redocly/theme/icons/OverflowMenuVerticalIcon/OverflowMenuVerticalIcon";import{Tooltip as D}from"@redocly/theme/components/Tooltip/Tooltip";import{LanguageDropdown as M}from"./LanguageDropdown.js";import{languageAtom as R,layoutAtom as O}from"../../jotai/app.js";import{LanguageListContainer as z,LanguageListItem as B,Container as G}from"./styled.js";import{LanguageItem as P}from"./LanguageItem.js";import{DROPDOWN_TRIGGER_WIDTH as N,ITEM_WIDTH as L}from"./constants.js";import{LanguageListSkeleton as $}from"../common/Skeleton/LanguageListSkeleton.js";import{useTelemetry as q}from"../../hooks/index.js";function F({languages:o,activeLanguage:t,translate:r}){const[n,l]=w([]),[s,u]=w([]),d=q(),g=A(null),k=H(O),h=W(R),p=e=>{d.sendSelectLanguageClickedMessage([{object:"select_language",language:e}])},b=e=>{h(e),p(e)},x=e=>{const m=s.findIndex(i=>i.key===e);if(m!==-1){const i=[...s],c=[...n];y(c,i,m),l(c),u(i),p(e),h(e)}},f=S(()=>{const e=g?.current?.offsetWidth;if(!e)return;const{newVisibleItems:m,newHiddenItems:i}=J(e,[...o]),c=i.findIndex(T=>T.key===t);c!==-1&&y(m,i,c),l(m),u(i)},[t,o]);j(()=>(f(),window.addEventListener("resize",f),()=>{window.removeEventListener("resize",f)}),[k,t]);const C=E(()=>n.length>=5||s.length?"space-between":"start",[s.length,n.length]);return I(G,{ref:g,children:[I(z,{$justifyContent:C,children:[!n.length&&a($,{}),n.map(e=>a(B,{onClick:()=>b(e.key),active:t===e.key,children:a(P,{item:e,withIcon:!0})},e.key))]}),s.length?a(M,{activeTab:t,samples:s,onChange:x,trigger:a(D,{tip:r("openapi.languages.moreButton.tooltipText","View more languages"),arrowPosition:"right",placement:"top",children:a(_,{icon:a(v,{}),"aria-label":"More languages",variant:"text",style:{height:"100%"}})}),withArrow:!1,withCheckmark:!1,width:156}):null]})}const ae=V(F);function J(o,t){let r=0;const n=[],l=[];return t.forEach((s,u)=>{const g=u===t.length-1&&l.length===0?0:N;o&&r+L+g<=o?(n.push(s),r+=L):l.push(s)}),{newVisibleItems:n,newHiddenItems:l}}function y(o,t,r){const n=o[o.length-1];n&&(o[o.length-1]=t[r],t[r]=n)}export{ae as LanguageList};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as t,jsxs as s,Fragment as
|
|
1
|
+
import{jsx as t,jsxs as s,Fragment as p}from"react/jsx-runtime";import{CopyButton as d}from"@redocly/theme/components/Buttons/CopyButton";import{NewTabButton as a}from"@redocly/theme/components/Buttons/NewTabButton";import{EmailButton as u}from"@redocly/theme/components/Buttons/EmailButton";import{Tooltip as h}from"@redocly/theme/components/Tooltip/Tooltip";import{PanelItem as c,PanelItemDescription as n,PanelItemsList as b}from"../PanelItem/index.js";function S({info:e,translate:r}){const l=e.contact&&e.contact.url&&t(c,{header:t(n,{children:r("openapi.info.contact.url","URL")}),title:t("a",{href:e.contact.url,target:"_blank",rel:"noreferrer",children:e.contact.url}),actions:[t(a,{data:e.contact.url},"NewTabButton")]})||null,i=e.contact&&e.contact.email&&t(c,{header:t(n,{children:e.contact.name||r("openapi.info.contact.name","E-mail")}),title:t("a",{href:"mailto:"+e.contact.email,children:e.contact.email}),actions:[t(h,{tip:r("button.copy.tooltipText","Copy to clipboard"),placement:"top",arrowPosition:"right",children:t(d,{data:e.contact.email})},"CopyButton"),t(u,{data:e.contact.email},"EmailButton")]})||null,o=e.license&&t(c,{header:t(n,{children:r("openapi.info.license","License")}),title:e.license.identifier?e.license.identifier:t("a",{href:e.license.url,target:"_blank",rel:"noreferrer",children:e.license.name}),actions:[t(a,{data:e.license.url||""},"NewTabButton")]})||null,m=e.termsOfService&&t(c,{title:t("a",{href:e.termsOfService,target:"_blank",rel:"noreferrer",children:r("openapi.info.termsOfService","Terms of Service")}),actions:[t(a,{data:e.termsOfService},e.termsOfService)]})||null;return t(p,{children:s(b,{children:[l,i,o,m]})})}export{S as Overview};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as o,Fragment as
|
|
1
|
+
import{jsx as o,Fragment as z,jsxs as H}from"react/jsx-runtime";import{lazy as J,memo as K,Suspense as W,useCallback as m,useRef as w,useState as Q}from"react";import{useAtom as u,useAtomValue as p}from"jotai";import X from"deepmerge";const Y=J(async()=>import("@redocly/replay").then(e=>({default:e.ReplayOverlay})));import{Button as Z}from"@redocly/theme/components/Button/Button";import{useFocusTrap as $,useModalScrollLock as ee}from"@redocly/theme/core/openapi";import{RocketIcon as te}from"@redocly/theme/icons/RocketIcon/RocketIcon";import{CircleDashIcon as oe}from"@redocly/theme/icons/CircleDashIcon/CircleDashIcon";import{Portal as re}from"@redocly/theme/components/Portal/Portal";import{useConfigureReplay as ne}from"@redocly/theme/ext/use-configure-replay";import{globalOptionsAtom as ae,globalStoreAtom as se}from"../../jotai/store.js";import{allOperationsAtom as ie,replayStateAtom as le}from"../../jotai/replay.js";import{allOperations as me,getDefaultOperationStore as pe}from"../../jotai/operation.js";import{LOADING_STATE as n}from"../../constants.js";import{environmentAtom as ce,userClaimsAtom as fe}from"../../jotai/app.js";import{convertOperationToReplayValueForRedoc as ue}from"./utils.js";import{useTranslate as de,useTelemetry as ye}from"../../hooks/index.js";import{JsonPointer as he}from"../../utils/index.js";import{getDefaultCollectorUrl as Oe}from"../../utils/telemetry.js";import{createTryItOpenEvent as Ie,createTryItSentEvent as Re}from"../../events/index.js";import{joinWithSeparator as ge}from"../../services/history/helpers.js";import{HTTPSnippet as ve}from"../../services/code-samples/httpsnippet/index.js";function Se({operation:e,corsProxyUrl:P,fullOpenApi:d}){const y=de(),q=ye(),h=w(null),O=p(ae),{mockServer:E,oAuth2RedirectURI:N,routingBasePath:c}=O,I=p(ie),{parser:R,options:{events:a}}=p(se),g=p(fe),[s,V]=Q(!1),[l,v]=u(le),[S,A]=u(me),[[,j],T]=u(ce),{config:x,refresh:D}=ne({userClaims:g,info:R?.definition.info,operation:{name:e.name,path:e.path,operationId:e.operationId||"",href:e.href,method:e.httpVerb},servers:e.servers},s);$(h),ee(s);const k=m(()=>D(),[D]),G=m(({operations:t,environment:i,environments:f})=>{const F=t.reduce((b,r)=>{r.requestValues.body=r.requestValues.body instanceof URLSearchParams?Object.fromEntries(r.requestValues.body.entries()):r.requestValues.body;const{path:B,method:M}=r.apiPath,L=he.compile(["paths",B,M]);return b[L]=X(pe(L),r),b},{});A({...S,...F}),T({environment:i,environments:f})},[S,A,T]),C=()=>{if(l!==n.LOADING){if(!s&&(q.sendTryItOpenedMessage(),a?.tryItOpen&&e)){const t=Ie({operation:e});a.tryItOpen(t)}V(!s)}l===n.NOT_LOADED&&v(n.LOADING)},U=m(t=>{if(a?.tryItSent&&e){const i=Re({operation:e,isSuccess:t});a.tryItSent(i)}},[a,e]),_=m(t=>{if(!t)return;const i=I.find(f=>f.operationId===t);return ge(c,i?.href)},[I,c]);return d?H(z,{children:[o(Z,{onClick:C,variant:"primary",iconPosition:"left",icon:l===n.LOADING?o(oe,{}):o(te,{}),children:l===n.LOADING?y("openapi.loading","Loading..."):y("openapi.tryIt","Try it")}),s&&o(W,{children:o(re,{mountId:"api-content",children:o("div",{ref:h,children:o(Y,{activeOperationId:e.operationId||e.pointer,api:d,onRequestChange:G,onClose:C,onLoad:()=>v(n.LOADED),settings:{corsProxyUrl:P,mockServer:E,selectedEnvironment:j,apiId:R?.definition.info?.["x-metadata"]?.apiId,oAuth2RedirectURI:N,disableCollectionsTab:!0,storageKey:c,telemetry:{tracerName:"try-it",collectorUrl:Oe()},HTTPSnippet:ve,convertOperationToReplayValue:ue(g,x,O),getOperationUrl:_,onRequestReset:k},onRequestSent:U})})})})]}):null}const Je=K(Se);export{Je as Replay};
|
|
@@ -4,7 +4,8 @@ import type { AppStore } from '../../jotai/app.js';
|
|
|
4
4
|
import type { ConfigureRequestValues, ConfigureServerRequestValues } from '@redocly/theme/ext/configure';
|
|
5
5
|
import { type UserClaims } from '@redocly/theme/core/openapi';
|
|
6
6
|
import { type SecurityRequirement } from '../../models/index.js';
|
|
7
|
-
|
|
7
|
+
import { type Options } from '../../services/index.js';
|
|
8
|
+
export declare function convertOperationToReplayValue(path: string, method: string, openAPI: OpenAPIDefinition, userClaims?: UserClaims, operationState?: OperationStore, appState?: AppStore, dynamicReplayValues?: ConfigureRequestValues | ConfigureServerRequestValues | null, options?: Options): {
|
|
8
9
|
id: string;
|
|
9
10
|
name: string;
|
|
10
11
|
method: string;
|
|
@@ -23,7 +24,7 @@ export declare function convertOperationToReplayValue(path: string, method: stri
|
|
|
23
24
|
};
|
|
24
25
|
};
|
|
25
26
|
} | undefined;
|
|
26
|
-
export declare function convertOperationToReplayValueForRedoc(userClaims?: UserClaims, dynamicReplayValues?: ConfigureRequestValues | ConfigureServerRequestValues | null): (path: string, method: string, openAPI: OpenAPIDefinition) => {
|
|
27
|
+
export declare function convertOperationToReplayValueForRedoc(userClaims?: UserClaims, dynamicReplayValues?: ConfigureRequestValues | ConfigureServerRequestValues | null, options?: Options): (path: string, method: string, openAPI: OpenAPIDefinition) => {
|
|
27
28
|
operationId: string;
|
|
28
29
|
id: string;
|
|
29
30
|
name: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{isPrimitive as
|
|
1
|
+
import{isPrimitive as v}from"@redocly/theme/core/openapi";import{getOperation as O}from"../../models/index.js";import{normalizeOptions as b,OpenAPIParser as E}from"../../services/index.js";import{JsonPointer as w}from"../../utils/index.js";function V(t,r,n,a,e,o,i,m){if(!n)return;const u=new E(n),c=u.definition.paths?.[t];let d=c?.[r];!d&&c?.additionalOperations&&(d=c.additionalOperations[r]);const s=O(u,{...d,pathName:t,httpVerb:r,pathParameters:c.parameters||[],pathServers:c.servers||[]},void 0,m??b({}),"",{isCallback:!1},a,i);if(!s)return;const h=o?.activeMimeName||s.requestBody?.content?.mediaTypes[0]?.name||"application/json";return{id:s.id,name:s.name,method:s.httpVerb,operationId:s.operationId,parameters:y(s.parameters,e?.requestValues),body:q(s.requestBody,n,e?.requestValues?.body?{activeExampleName:e?.activeExampleName,[h]:e?.requestValues?.body}:e?.activeExampleName?{activeExampleName:e?.activeExampleName}:void 0),path:s.path,href:s.href,servers:s.servers,security:I(s.security),responses:Object.fromEntries(s.responses.map(l=>[l.code,{code:l.code,description:l.description,mediaTypes:l.content?.mediaTypes.reduce((p,f)=>(p[f.name]={name:f.name,schema:x(f.schema?.rawSchema,n)},p),{})}]))}}function k(t,r,n){return function(a,e,o){const i=V(a,e,o,t,void 0,void 0,r,n);if(i)return{...i,operationId:i.operationId||w.compile(["paths",i.path,i.method])}}}function y(t,r){const n=new Set,a=t.map(e=>(n.add(e.in+":"+e.name),{name:e.name,in:e.in,required:e.required,description:e.description,example:r?.[String(e.in)]?.[e.name]||e.example,schema:e.schema,...e.allowReserved&&{allowReserved:e.allowReserved}}));for(const[e,o]of Object.entries(r||{}))for(const[i,m]of Object.entries(o||{}))n.has(e+":"+i)||a.push({name:i,in:e,required:!1,description:"",example:String(m),schema:void 0});return a}function g({type:t,format:r,enum:n}){return t==="string"&&(r==="binary"||r==="base64")?"file":t==="object"?"multiline":n.length>0?"select":"text"}function N(t,r){const n=t[0]?.example||t[0]?.examples;if(n)return n;if(t.schema?.example)return t.schema.example;const a=r?.default?.value||r?.default?.rawValue;return a?.[t.name]?v(a?.[t.name])?String(a?.[t.name]):JSON.stringify(a?.[t.name]):""}function S(t){if(t?.fields)return t.fields;if(t?.oneOf){for(const r of t.oneOf)if(r?.fields)return r.fields}}function q(t,r,n){if(!t||!t.content?.mediaTypes){if(!n)return;const{activeExampleName:a,...e}=n;return{activeExampleName:a,mediaTypes:Object.fromEntries(Object.entries(e).map(([o,i])=>[o,{name:o,examples:{default:{value:i}},schema:{},parameters:[]}]))}}return{required:t.required,activeExampleName:n?.activeExampleName,mediaTypes:t.content.mediaTypes.reduce((a,e)=>{const o=e.schema,i=n?.[e.name]?{default:{value:n?.[e.name],rawValue:n?.[e.name],mime:e.name}}:e.examples||e.formExamples,m=S(o);return a[e.name]={name:e.name,examples:i,schema:x(e.schema?.rawSchema,r),parameters:m?.map(u=>({inputType:g(u.schema),name:u.name,example:N(u,i)}))},a},{})}}function x(t,r){if(!(!t||!r))return{...t,components:r?.components||{}}}function I(t){if(t)return t.map(({schemes:r})=>r.map(n=>{const a={id:n.id,type:n.type,in:n.in,openIdConnectUrl:n.openIdConnectUrl,scopes:n.scopes,scheme:n.scheme,name:n.name,flows:n.flows,serverValues:n.serverValues,"x-defaultAccessToken":n["x-defaultAccessToken"],"x-defaultTokenType":n["x-defaultTokenType"],"x-defaultClientId":n["x-defaultClientId"],"x-defaultClientSecret":n["x-defaultClientSecret"],"x-defaultUsername":n["x-defaultUsername"],"x-defaultPassword":n["x-defaultPassword"]};return Object.keys(a).forEach(e=>a[e]===void 0&&delete a[e]),a}))}export{V as convertOperationToReplayValue,k as convertOperationToReplayValueForRedoc,I as convertRequestSecurity};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as e,Fragment as u,jsxs as x}from"react/jsx-runtime";import{useAtomValue as c}from"jotai";import{Panel as r}from"@redocly/theme/components/Panel/Panel";import{Markdown as S}from"@redocly/theme/components/Markdown/Markdown";import{DownloadSpecification as b}from"../Download/index.js";import{Overview as O}from"../Overview/index.js";import{ServerList as j}from"../ServerList/index.js";import{globalStoreAtom as I}from"../../jotai/store.js";import{normalizeServers as d}from"../../utils/index.js";import{LanguageList as L}from"../Language/index.js";import{mergeInMockServer as M}from"../../models/operation.js";import{languageAtom as P}from"../../jotai/app.js";import{useTranslate as k}from"../../hooks/index.js";import{useDownloadInfo as D}from"../Download/useDownloadInfo.js";import{McpOverview as E}from"../McpOverview/McpOverview.js";const J=({item:{infoDefinition:o}})=>{const a=k(),{options:{hideDownloadButtons:f,downloadUrls:g,mockServer:v},parser:{definition:s,definitionUrl:t}}=c(I),{languages:i,activeLanguage:h}=c(P),l=D({downloadUrls:g}),m=d(t,M(s.servers||[],v)),n=s?.["x-mcp"],w=d(t,n?.servers||s.servers||[]),p=!(Object.keys(s.paths||{}).length>0)&&n;return x(u,{children:[!f&&l&&e(r,{className:"panel-download",header:a("openapi.download.description.title","Download OpenAPI description"),isExpandable:!1,children:e(b,{downloadObjects:l})}),!!n&&e(r,{className:"panel-download",header:a("openapi.mcp.title","MCP server"),isExpandable:!1,children:e(E,{mcpInfo:n,mcpServers:w})}),(o?.license||o?.contact||o?.termsOfService)&&e(r,{className:"panel-mcp-overview",header:a("openapi.info.title","Overview"),isExpandable:!1,children:e(S,{children:e(O,{info:o,translate:a})})}),!!i?.length&&!p&&e(r,{className:"panel-language-list",header:a("openapi.languages.title","Languages"),isExpandable:!1,children:e(L,{languages:i,activeLanguage:h})}),!!m.length&&!p&&e(r,{className:"panel-servers-list",header:a("openapi.servers.title","Servers"),isExpandable:!1,children:e(j,{servers:m,translate:a})})]})};export{J as RightPanel};
|
|
1
|
+
import{jsx as e,Fragment as u,jsxs as x}from"react/jsx-runtime";import{useAtomValue as c}from"jotai";import{Panel as r}from"@redocly/theme/components/Panel/Panel";import{Markdown as S}from"@redocly/theme/components/Markdown/Markdown";import{DownloadSpecification as b}from"../Download/index.js";import{Overview as O}from"../Overview/index.js";import{ServerList as j}from"../ServerList/index.js";import{globalStoreAtom as I}from"../../jotai/store.js";import{normalizeServers as d}from"../../utils/index.js";import{LanguageList as L}from"../Language/index.js";import{mergeInMockServer as M}from"../../models/operation.js";import{languageAtom as P}from"../../jotai/app.js";import{useTranslate as k}from"../../hooks/index.js";import{useDownloadInfo as D}from"../Download/useDownloadInfo.js";import{McpOverview as E}from"../McpOverview/McpOverview.js";const J=({item:{infoDefinition:o}})=>{const a=k(),{options:{hideDownloadButtons:f,downloadUrls:g,mockServer:v},parser:{definition:s,definitionUrl:t}}=c(I),{languages:i,activeLanguage:h}=c(P),l=D({downloadUrls:g}),m=d(t,M(s.servers||[],v)),n=s?.["x-mcp"],w=d(t,n?.servers||s.servers||[]),p=!(Object.keys(s.paths||{}).length>0)&&n;return x(u,{children:[!f&&l&&e(r,{className:"panel-download",header:a("openapi.download.description.title","Download OpenAPI description"),isExpandable:!1,children:e(b,{downloadObjects:l})}),!!n&&e(r,{className:"panel-download",header:a("openapi.mcp.title","MCP server"),isExpandable:!1,children:e(E,{mcpInfo:n,mcpServers:w})}),(o?.license||o?.contact||o?.termsOfService)&&e(r,{className:"panel-mcp-overview",header:a("openapi.info.title","Overview"),isExpandable:!1,children:e(S,{children:e(O,{info:o,translate:a})})}),!!i?.length&&!p&&e(r,{className:"panel-language-list",header:a("openapi.languages.title","Languages"),isExpandable:!1,children:e(L,{languages:i,activeLanguage:h,translate:a})}),!!m.length&&!p&&e(r,{className:"panel-servers-list",header:a("openapi.servers.title","Servers"),isExpandable:!1,children:e(j,{servers:m,translate:a})})]})};export{J as RightPanel};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{jsx as i,jsxs as
|
|
1
|
+
import{jsx as i,jsxs as r}from"react/jsx-runtime";import{CopyButton as x}from"@redocly/theme/components/Buttons/CopyButton";import{Tooltip as v}from"@redocly/theme/components/Tooltip/Tooltip";import{getServerDisplayName as y}from"../../utils/helpers.js";import{PanelItemDescription as u,Title as w}from"../PanelItem/index.js";import{ViewNested as T}from"../ViewNested/index.js";import{Tag as S}from"../common/index.js";import{Markdown as j}from"../Markdown/index.js";import{styled as o}from"../../styled-components.js";import{ServerDescriptionTooltip as D}from"./ServerDescriptionTooltip.js";const F=({servers:h,path:b="",translate:t})=>i($,{children:h.map(e=>{const a=e.url+b,p=Object.keys(e.variables||{}).length,d=p===1?"variable":"variables",l=`${p||""} ${t(`openapi.${d}`,d)}`,f=!!e.name&&!!e.description;return r("div",{children:[r(O,{children:[i(u,{"data-testid":"server-panel-item-name",children:y(e)}),f&&i(D,{description:e.description})]}),r(B,{children:[i(w,{suppressHydrationWarning:!0,children:a}),i(v,{tip:t("button.copy.tooltipText","Copy to clipboard"),placement:"top",arrowPosition:"right",children:i(x,{data:a},a)})]}),e.variables&&i(T,{expandText:`${t("openapi.actions.show","Show")} ${l}`,hideText:`${t("openapi.actions.hide","Hide")} ${l}`,expandByDefault:!1,expandable:!0,hideDivider:!0,children:i(z,{children:Object.entries(e.variables||{}).map(([c,n])=>r(C,{children:[i(k,{children:c}),r(s,{children:[t("openapi.default","Default")," ",i(g,{children:n.default})]}),i(W,{source:n.description}),n.enum&&r(s,{children:[t("openapi.enum","Enum")," ",i(L,{children:n.enum.map(m=>i(g,{children:m},m))})]})]},c))})})]},e.url)})}),$=o.div`
|
|
2
2
|
& > div {
|
|
3
3
|
border-bottom: 1px solid var(--border-color-secondary);
|
|
4
4
|
margin-bottom: var(--spacing-xs);
|
|
@@ -10,7 +10,7 @@ import{jsx as i,jsxs as o}from"react/jsx-runtime";import{CopyButton as x}from"@r
|
|
|
10
10
|
margin-bottom: 0;
|
|
11
11
|
padding-bottom: 0;
|
|
12
12
|
}
|
|
13
|
-
|
|
13
|
+
`,z=o.div`
|
|
14
14
|
padding-left: var(--spacing-xxs);
|
|
15
15
|
& > div {
|
|
16
16
|
border-bottom: 1px solid var(--border-color-secondary);
|
|
@@ -28,37 +28,37 @@ import{jsx as i,jsxs as o}from"react/jsx-runtime";import{CopyButton as x}from"@r
|
|
|
28
28
|
margin-bottom: 0;
|
|
29
29
|
padding-bottom: 0;
|
|
30
30
|
}
|
|
31
|
-
`,
|
|
31
|
+
`,C=o.div`
|
|
32
32
|
display: flex;
|
|
33
33
|
flex-direction: column;
|
|
34
34
|
flex-wrap: wrap;
|
|
35
|
-
`,W=
|
|
35
|
+
`,W=o(j)`
|
|
36
36
|
font-size: var(--font-size-sm);
|
|
37
37
|
line-height: var(--line-height-sm);
|
|
38
38
|
color: var(--text-color-primary);
|
|
39
|
-
`,s=
|
|
39
|
+
`,s=o.span`
|
|
40
40
|
display: flex;
|
|
41
41
|
gap: var(--spacing-xxs);
|
|
42
42
|
font-size: var(--font-size-sm);
|
|
43
43
|
line-height: var(--line-height-sm);
|
|
44
44
|
color: var(--text-color-primary);
|
|
45
|
-
`,k=
|
|
45
|
+
`,k=o(s)`
|
|
46
46
|
padding-bottom: var(--spacing-xxs);
|
|
47
47
|
font-weight: var(--font-weight-semibold);
|
|
48
|
-
`,
|
|
48
|
+
`,L=o.span`
|
|
49
49
|
display: flex;
|
|
50
50
|
gap: var(--spacing-xxs);
|
|
51
51
|
flex-wrap: wrap;
|
|
52
|
-
`,g=
|
|
52
|
+
`,g=o(S)`
|
|
53
53
|
font-size: var(--font-size-sm);
|
|
54
54
|
line-height: var(--line-height-sm);
|
|
55
|
-
`,
|
|
55
|
+
`,O=o.div`
|
|
56
56
|
display: flex;
|
|
57
57
|
justify-content: start;
|
|
58
58
|
align-items: center;
|
|
59
59
|
gap: var(--spacing-xxs);
|
|
60
|
-
`,
|
|
60
|
+
`,B=o.div`
|
|
61
61
|
display: flex;
|
|
62
62
|
justify-content: space-between;
|
|
63
63
|
align-items: center;
|
|
64
|
-
`;export{
|
|
64
|
+
`;export{F as ServerList};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import*as
|
|
2
|
-
`,variablesPrefix:
|
|
3
|
-
`,this.capitalize=n,this.lang=s,this.langOptions={...
|
|
1
|
+
import*as u from"util";import{Lang as r,NamingVariableConventions as l,VariableType as c}from"./constants.js";import o from"./string-utility.js";const S={[r.NODEJS]:l.CAMEL_CASE,[r.JAVASCRIPT]:l.CAMEL_CASE,[r.PYTHON]:l.UNDER_SCORES,[r.JAVA8]:l.CAMEL_CASE,[r.JAVA]:l.CAMEL_CASE,[r.CSHARP]:l.PASCAL_CASE,[r.CSHARPNEWTONSOFT]:l.PASCAL_CASE,[r.CURL]:l.CAMEL_CASE,[r.GO]:l.CAMEL_CASE,[r.PHP]:l.CAMEL_CASE,[r.RUBY]:l.UNDER_SCORES,[r.R]:l.UNDER_SCORES},p={default:{joinSymbol:"",variableWrapperFn:a=>a,stringLiteral:a=>a,variableDeclaration:a=>a,urlFieldName:"url"},[r.CSHARP]:{joinSymbol:" + ",stringLiteral:a=>`"${a}"`,variableDeclaration:a=>`var ${a} = %s;`,urlFieldName:"fullUrl"},[r.CSHARPNEWTONSOFT]:{joinSymbol:" + ",stringLiteral:a=>`"${a}"`,variableDeclaration:a=>`var ${a} = %s;`,urlFieldName:"fullUrl"},[r.GO]:{joinSymbol:" + ",stringLiteral:a=>`"${a}"`,variableDeclaration:a=>`${a} := %s;`},[r.JAVA]:{joinSymbol:" + ",stringLiteral:a=>`"${a}"`,variableDeclaration:a=>`var ${a} = %s;`,urlFieldName:"pathname"},[r.JAVA8]:{joinSymbol:" + ",stringLiteral:a=>`"${a}"`,variableDeclaration:a=>`String ${a} = %s;`,urlFieldName:"fullUrl"},[r.JAVASCRIPT]:{variableWrapperFn:a=>"${"+a+"}",variableDeclaration:(a,i)=>`const ${a} = ${i?.hasVariableInterpolation?"`%s`":"'%s'"};`},[r.NODEJS]:{variableWrapperFn:a=>"${"+a+"}",variableDeclaration:(a,i)=>`const ${a} = ${i?.hasVariableInterpolation?"`%s`":"'%s'"};`},[r.PHP]:{joinSymbol:" . ",stringLiteral:a=>`"${a}"`,variableDeclaration:a=>`const ${a} = %s;`},[r.PYTHON]:{stringLiteral:a=>`"${a}"`,joinSymbol:" + ",variableDeclaration:a=>`${a} = %s`},[r.RUBY]:{joinSymbol:" + ",stringLiteral:a=>`'${a}'`,variableDeclaration:a=>`${a} = %s`},[r.CURL]:{variableWrapperFn:(a,i)=>i!=null&&i!==""?i:`{${a}}`,urlFieldName:"fullUrl",rawName:!0},[r.R]:{joinSymbol:" %&% ",variableDeclaration:a=>`${a} = %s`,urlFieldName:"fullUrl",stringLiteral:a=>`"${a}"`,variableWrapperFn:a=>`${a}`}},b=["response","request","requests","data","url","payload","main","accessToken","resp","Program","client","postData","App","httpClient","params","pathname","host","body","fetch","query"];class A{code;indentation;variablesPrefix;lineJoin;capitalize;lang;langOptions;constructor({indentation:i,lineJoin:t=`
|
|
2
|
+
`,variablesPrefix:e="",capitalize:n=!1,lang:s=r.CURL}){this.code=[],this.indentation=i,this.variablesPrefix=e,this.lineJoin=t||`
|
|
3
|
+
`,this.capitalize=n,this.lang=s,this.langOptions={...p.default,...p[s]}}buildLine(i,t){let e="",n=2;if(typeof i=="string")n=1,t=i,i=0;else if(i===null)return null;for(;i;)e+=this.indentation,i--;const s=Array.prototype.slice.call(arguments,n,arguments.length);return s.unshift(e+t),u.format.apply(this,s)}unshift(...i){return this.code.unshift(this.buildLine.apply(this,i)),this}push(...i){return this.code.push(this.buildLine.apply(this,i)),this}blank(){return this.code.push(null),this}join(){return this.code.join(this.lineJoin)}clean(){this.code.splice(1)}var(i,t=c.CUSTOM){if(t===c.PATH){let e=this.variablesPrefix+i;switch(b.includes(e)&&(e=`${e}_path`),S[this.lang]){case l.UNDER_SCORES:e=o.toSnakeCase(e);break;case l.PASCAL_CASE:e=o.toPascalCase(e);break;case l.CAMEL_CASE:default:e=o.toCamelCase(e);break}return e}return this.variablesPrefix?this.variablesPrefix+(this.capitalize?o.toPascalCase(i):i):i}}export{A as CodeBuilder};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{VariableType as
|
|
2
|
-
${
|
|
1
|
+
import{VariableType as u}from"./constants.js";function x({body:r,authorizationHeader:a}){return function(i,s,t){return r&&s==="body"&&typeof i.body=="string"?i.body:a&&s==="Authorization"&&typeof i.Authorization=="string"?i.Authorization:t}}function d(r,{level:a=0,indent:i=" ",firstLine:s=!0}={}){const t=i.repeat(a),e=r.replace(/(\r\n|\n|\r)/gm,`
|
|
2
|
+
${t}`);return s?t.concat(e):e}function c(r,a){const s=Object.keys(a).map(n=>({name:n,idx:r.indexOf(`{${n}}`)})).filter(({idx:n})=>n>-1).sort((n,o)=>n.idx-o.idx),t=[];let e=0;for(const{name:n,idx:o}of s)o>e&&t.push({type:"string",value:r.substring(e,o)}),t.push({type:"variable",name:n}),e=o+n.length+2;return e<r.length&&t.push({type:"string",value:r.substring(e)}),t}function g(r,a,i){const{joinSymbol:s,variableWrapperFn:t,stringLiteral:e,urlFieldName:n,rawName:o}=a.langOptions,{pathParameters:f={},serverVariables:b={}}=r,p={...f,...b};return c(i??r[n]??"",p).map(l=>{if(l.type==="variable"){const m=p[l.name],v=o?l.name:a.var(l.name,u.PATH);return t(v,m)}else return e(l.value)}).join(s)}function y(r,a,i){const s={...r.pathParameters,...r.serverVariables};Object.entries(s).forEach(([t,e])=>{if(t==="server")return;const n=e!=null&&e!==""?String(e):`YOUR_${t}_PARAMETER`,o=a.var(t,u.PATH),b=c(n,s).some(l=>l.type==="variable"),p=g(r,a,n);i!==void 0?a.push(i,a.langOptions.variableDeclaration(o,{hasVariableInterpolation:b}),p):a.push(a.langOptions.variableDeclaration(o,{hasVariableInterpolation:b}),p)})}export{d as addIndentation,g as buildUrlExpression,x as getPreserveTransformer,c as parseUrlIntoOperands,y as printUrlVariablesDeclarations};
|
|
@@ -1,37 +1,61 @@
|
|
|
1
|
-
const a={pathParameters:{pathParam1:"pathParam1Value",pathParam2:"pathParam2Value"},serverVariables:{serverVariable1:"serverVariable1Value",serverVariable2:"serverVariable2Value"}},r={"Node.js":`const variablesPrefixpathParam1 = 'pathParam1Value';
|
|
1
|
+
const a={pathParameters:{pathParam1:"pathParam1Value",pathParam2:"pathParam2Value",pathParam3:42,pathParam4:0},serverVariables:{serverVariable1:"serverVariable1Value",serverVariable2:"serverVariable2Value"}},r={"Node.js":`const variablesPrefixpathParam1 = 'pathParam1Value';
|
|
2
2
|
const variablesPrefixpathParam2 = 'pathParam2Value';
|
|
3
|
+
const variablesPrefixpathParam3 = '42';
|
|
4
|
+
const variablesPrefixpathParam4 = '0';
|
|
3
5
|
const variablesPrefixserverVariable1 = 'serverVariable1Value';
|
|
4
6
|
const variablesPrefixserverVariable2 = 'serverVariable2Value';`,javascript:`const variablesPrefixpathParam1 = 'pathParam1Value';
|
|
5
7
|
const variablesPrefixpathParam2 = 'pathParam2Value';
|
|
8
|
+
const variablesPrefixpathParam3 = '42';
|
|
9
|
+
const variablesPrefixpathParam4 = '0';
|
|
6
10
|
const variablesPrefixserverVariable1 = 'serverVariable1Value';
|
|
7
11
|
const variablesPrefixserverVariable2 = 'serverVariable2Value';`,Python:`variables_prefixpath_param_1 = "pathParam1Value"
|
|
8
12
|
variables_prefixpath_param_2 = "pathParam2Value"
|
|
13
|
+
variables_prefixpath_param_3 = "42"
|
|
14
|
+
variables_prefixpath_param_4 = "0"
|
|
9
15
|
variables_prefixserver_variable_1 = "serverVariable1Value"
|
|
10
16
|
variables_prefixserver_variable_2 = "serverVariable2Value"`,"Java8+Apache":`String variablesPrefixpathParam1 = "pathParam1Value";
|
|
11
17
|
String variablesPrefixpathParam2 = "pathParam2Value";
|
|
18
|
+
String variablesPrefixpathParam3 = "42";
|
|
19
|
+
String variablesPrefixpathParam4 = "0";
|
|
12
20
|
String variablesPrefixserverVariable1 = "serverVariable1Value";
|
|
13
21
|
String variablesPrefixserverVariable2 = "serverVariable2Value";`,Java:`var variablesPrefixpathParam1 = "pathParam1Value";
|
|
14
22
|
var variablesPrefixpathParam2 = "pathParam2Value";
|
|
23
|
+
var variablesPrefixpathParam3 = "42";
|
|
24
|
+
var variablesPrefixpathParam4 = "0";
|
|
15
25
|
var variablesPrefixserverVariable1 = "serverVariable1Value";
|
|
16
26
|
var variablesPrefixserverVariable2 = "serverVariable2Value";`,"C#":`var VariablesPrefixpathParam1 = "pathParam1Value";
|
|
17
27
|
var VariablesPrefixpathParam2 = "pathParam2Value";
|
|
28
|
+
var VariablesPrefixpathParam3 = "42";
|
|
29
|
+
var VariablesPrefixpathParam4 = "0";
|
|
18
30
|
var VariablesPrefixserverVariable1 = "serverVariable1Value";
|
|
19
31
|
var VariablesPrefixserverVariable2 = "serverVariable2Value";`,"C#+Newtonsoft":`var VariablesPrefixpathParam1 = "pathParam1Value";
|
|
20
32
|
var VariablesPrefixpathParam2 = "pathParam2Value";
|
|
33
|
+
var VariablesPrefixpathParam3 = "42";
|
|
34
|
+
var VariablesPrefixpathParam4 = "0";
|
|
21
35
|
var VariablesPrefixserverVariable1 = "serverVariable1Value";
|
|
22
36
|
var VariablesPrefixserverVariable2 = "serverVariable2Value";`,curl:`variablesPrefixpathParam1 pathParam1Value
|
|
23
37
|
variablesPrefixpathParam2 pathParam2Value
|
|
38
|
+
variablesPrefixpathParam3 42
|
|
39
|
+
variablesPrefixpathParam4 0
|
|
24
40
|
variablesPrefixserverVariable1 serverVariable1Value
|
|
25
41
|
variablesPrefixserverVariable2 serverVariable2Value`,Go:`variablesPrefixpathParam1 := "pathParam1Value";
|
|
26
42
|
variablesPrefixpathParam2 := "pathParam2Value";
|
|
43
|
+
variablesPrefixpathParam3 := "42";
|
|
44
|
+
variablesPrefixpathParam4 := "0";
|
|
27
45
|
variablesPrefixserverVariable1 := "serverVariable1Value";
|
|
28
46
|
variablesPrefixserverVariable2 := "serverVariable2Value";`,PHP:`const variablesPrefixpathParam1 = "pathParam1Value";
|
|
29
47
|
const variablesPrefixpathParam2 = "pathParam2Value";
|
|
48
|
+
const variablesPrefixpathParam3 = "42";
|
|
49
|
+
const variablesPrefixpathParam4 = "0";
|
|
30
50
|
const variablesPrefixserverVariable1 = "serverVariable1Value";
|
|
31
51
|
const variablesPrefixserverVariable2 = "serverVariable2Value";`,Ruby:`variables_prefixpath_param_1 = 'pathParam1Value'
|
|
32
52
|
variables_prefixpath_param_2 = 'pathParam2Value'
|
|
53
|
+
variables_prefixpath_param_3 = '42'
|
|
54
|
+
variables_prefixpath_param_4 = '0'
|
|
33
55
|
variables_prefixserver_variable_1 = 'serverVariable1Value'
|
|
34
56
|
variables_prefixserver_variable_2 = 'serverVariable2Value'`,R:`variables_prefixpath_param_1 = "pathParam1Value"
|
|
35
57
|
variables_prefixpath_param_2 = "pathParam2Value"
|
|
58
|
+
variables_prefixpath_param_3 = "42"
|
|
59
|
+
variables_prefixpath_param_4 = "0"
|
|
36
60
|
variables_prefixserver_variable_1 = "serverVariable1Value"
|
|
37
|
-
variables_prefixserver_variable_2 = "serverVariable2Value"`},e={},i={"Node.js":"http://acme.com/${variablesPrefixpathParam1}/${variablesPrefixpathParam2}/${variablesPrefixserverVariable1}/${variablesPrefixserverVariable2}",javascript:"http://acme.com/${variablesPrefixpathParam1}/${variablesPrefixpathParam2}/${variablesPrefixserverVariable1}/${variablesPrefixserverVariable2}",Python:'"http://acme.com/" + variables_prefixpath_param_1 + "/" + variables_prefixpath_param_2 + "/" + variables_prefixserver_variable_1 + "/" + variables_prefixserver_variable_2',"Java8+Apache":'"http://acme.com/" + variablesPrefixpathParam1 + "/" + variablesPrefixpathParam2 + "/" + variablesPrefixserverVariable1 + "/" + variablesPrefixserverVariable2',Java:'"http://acme.com/" + variablesPrefixpathParam1 + "/" + variablesPrefixpathParam2 + "/" + variablesPrefixserverVariable1 + "/" + variablesPrefixserverVariable2',"C#":'"http://acme.com/" + VariablesPrefixpathParam1 + "/" + VariablesPrefixpathParam2 + "/" + VariablesPrefixserverVariable1 + "/" + VariablesPrefixserverVariable2',"C#+Newtonsoft":'"http://acme.com/" + VariablesPrefixpathParam1 + "/" + VariablesPrefixpathParam2 + "/" + VariablesPrefixserverVariable1 + "/" + VariablesPrefixserverVariable2',curl:"http://acme.com/pathParam1Value/pathParam2Value/serverVariable1Value/serverVariable2Value",Go:'"http://acme.com/" + variablesPrefixpathParam1 + "/" + variablesPrefixpathParam2 + "/" + variablesPrefixserverVariable1 + "/" + variablesPrefixserverVariable2',PHP:'"http://acme.com/" . variablesPrefixpathParam1 . "/" . variablesPrefixpathParam2 . "/" . variablesPrefixserverVariable1 . "/" . variablesPrefixserverVariable2',Ruby:"'http://acme.com/' + variables_prefixpath_param_1 + '/' + variables_prefixpath_param_2 + '/' + variables_prefixserver_variable_1 + '/' + variables_prefixserver_variable_2",R:'"http://acme.com/" %&% variables_prefixpath_param_1 %&% "/" %&% variables_prefixpath_param_2 %&% "/" %&% variables_prefixserver_variable_1 %&% "/" %&% variables_prefixserver_variable_2'};export{e as buildUrlExpressionCases,i as buildUrlExpressionData,a as commonVariablesInput,r as printUrlVariablesDeclarationsOutput};
|
|
61
|
+
variables_prefixserver_variable_2 = "serverVariable2Value"`},e={},i={"Node.js":"http://acme.com/${variablesPrefixpathParam1}/${variablesPrefixpathParam2}/${variablesPrefixpathParam3}/${variablesPrefixpathParam4}/${variablesPrefixserverVariable1}/${variablesPrefixserverVariable2}",javascript:"http://acme.com/${variablesPrefixpathParam1}/${variablesPrefixpathParam2}/${variablesPrefixpathParam3}/${variablesPrefixpathParam4}/${variablesPrefixserverVariable1}/${variablesPrefixserverVariable2}",Python:'"http://acme.com/" + variables_prefixpath_param_1 + "/" + variables_prefixpath_param_2 + "/" + variables_prefixpath_param_3 + "/" + variables_prefixpath_param_4 + "/" + variables_prefixserver_variable_1 + "/" + variables_prefixserver_variable_2',"Java8+Apache":'"http://acme.com/" + variablesPrefixpathParam1 + "/" + variablesPrefixpathParam2 + "/" + variablesPrefixpathParam3 + "/" + variablesPrefixpathParam4 + "/" + variablesPrefixserverVariable1 + "/" + variablesPrefixserverVariable2',Java:'"http://acme.com/" + variablesPrefixpathParam1 + "/" + variablesPrefixpathParam2 + "/" + variablesPrefixpathParam3 + "/" + variablesPrefixpathParam4 + "/" + variablesPrefixserverVariable1 + "/" + variablesPrefixserverVariable2',"C#":'"http://acme.com/" + VariablesPrefixpathParam1 + "/" + VariablesPrefixpathParam2 + "/" + VariablesPrefixpathParam3 + "/" + VariablesPrefixpathParam4 + "/" + VariablesPrefixserverVariable1 + "/" + VariablesPrefixserverVariable2',"C#+Newtonsoft":'"http://acme.com/" + VariablesPrefixpathParam1 + "/" + VariablesPrefixpathParam2 + "/" + VariablesPrefixpathParam3 + "/" + VariablesPrefixpathParam4 + "/" + VariablesPrefixserverVariable1 + "/" + VariablesPrefixserverVariable2',curl:"http://acme.com/pathParam1Value/pathParam2Value/42/0/serverVariable1Value/serverVariable2Value",Go:'"http://acme.com/" + variablesPrefixpathParam1 + "/" + variablesPrefixpathParam2 + "/" + variablesPrefixpathParam3 + "/" + variablesPrefixpathParam4 + "/" + variablesPrefixserverVariable1 + "/" + variablesPrefixserverVariable2',PHP:'"http://acme.com/" . variablesPrefixpathParam1 . "/" . variablesPrefixpathParam2 . "/" . variablesPrefixpathParam3 . "/" . variablesPrefixpathParam4 . "/" . variablesPrefixserverVariable1 . "/" . variablesPrefixserverVariable2',Ruby:"'http://acme.com/' + variables_prefixpath_param_1 + '/' + variables_prefixpath_param_2 + '/' + variables_prefixpath_param_3 + '/' + variables_prefixpath_param_4 + '/' + variables_prefixserver_variable_1 + '/' + variables_prefixserver_variable_2",R:'"http://acme.com/" %&% variables_prefixpath_param_1 %&% "/" %&% variables_prefixpath_param_2 %&% "/" %&% variables_prefixpath_param_3 %&% "/" %&% variables_prefixpath_param_4 %&% "/" %&% variables_prefixserver_variable_1 %&% "/" %&% variables_prefixserver_variable_2'};export{e as buildUrlExpressionCases,i as buildUrlExpressionData,a as commonVariablesInput,r as printUrlVariablesDeclarationsOutput};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@redocly/openapi-docs",
|
|
3
|
-
"version": "3.19.0-next.
|
|
3
|
+
"version": "3.19.0-next.8",
|
|
4
4
|
"description": "Redocly OpenAPI Docs",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "lib/index.js",
|
|
@@ -21,17 +21,17 @@
|
|
|
21
21
|
},
|
|
22
22
|
"dependencies": {
|
|
23
23
|
"@markdoc/markdoc": "0.5.2",
|
|
24
|
-
"@redocly/openapi-core": "2.20.
|
|
24
|
+
"@redocly/openapi-core": "2.20.4",
|
|
25
25
|
"deepmerge": "^4.2.2",
|
|
26
26
|
"dompurify": "3.2.7",
|
|
27
27
|
"fast-deep-equal": "^3.1.3",
|
|
28
28
|
"fast-xml-parser": "5.4.1",
|
|
29
29
|
"jotai": "^2.12.5",
|
|
30
|
-
"jotai-family": "
|
|
30
|
+
"jotai-family": "1.0.1",
|
|
31
31
|
"json-pointer": "^0.6.2",
|
|
32
32
|
"openapi-sampler": "1.7.0",
|
|
33
33
|
"react-router-dom": "^6.30.3",
|
|
34
|
-
"slugify": "^1.4.
|
|
34
|
+
"slugify": "^1.4.7",
|
|
35
35
|
"stringify-object": "^3.3.0",
|
|
36
36
|
"styled-components": "^4.1.1 || ^5.3.11 || ^6.0.0",
|
|
37
37
|
"swagger2openapi": "^7.0.8",
|
|
@@ -39,7 +39,7 @@
|
|
|
39
39
|
"util": "~0.12.5",
|
|
40
40
|
"web-vitals": "3.3.1",
|
|
41
41
|
"@redocly/config": "0.44.0",
|
|
42
|
-
"@redocly/replay": "0.22.0-next.
|
|
42
|
+
"@redocly/replay": "0.22.0-next.7"
|
|
43
43
|
},
|
|
44
44
|
"devDependencies": {
|
|
45
45
|
"@shikijs/transformers": "3.21.0",
|
|
@@ -72,7 +72,7 @@
|
|
|
72
72
|
"url": "~0.11.0",
|
|
73
73
|
"vite": "7.2.6",
|
|
74
74
|
"vitest": "4.0.10",
|
|
75
|
-
"@redocly/theme": "0.63.0-next.
|
|
75
|
+
"@redocly/theme": "0.63.0-next.5"
|
|
76
76
|
},
|
|
77
77
|
"scripts": {
|
|
78
78
|
"start": "pnpm run copy-highlight-hook && vite",
|