@redocly/openapi-docs 3.14.0-next.8 → 3.14.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/redocly-openapi-docs.min.js +2172 -2089
- package/lib/components/ContentItem/ContentItem.js +1 -1
- package/lib/components/ContentItems/Items.js +1 -1
- package/lib/components/ContentItems/helpers.js +1 -1
- package/lib/components/McpOverview/McpOverview.d.ts +5 -0
- package/lib/components/McpOverview/McpOverview.js +16 -0
- package/lib/components/McpOverview/index.d.ts +1 -0
- package/lib/components/McpOverview/index.js +1 -0
- package/lib/components/McpTool/McpTool.d.ts +6 -0
- package/lib/components/McpTool/McpTool.js +9 -0
- package/lib/components/McpTool/index.d.ts +1 -0
- package/lib/components/McpTool/index.js +1 -0
- package/lib/components/PanelItem/styled.js +1 -0
- package/lib/components/RedoclyOpenAPIDocs/Error.d.ts +3 -0
- package/lib/components/RedoclyOpenAPIDocs/Error.js +25 -0
- package/lib/components/RedoclyOpenAPIDocs/Providers.js +1 -1
- package/lib/components/RedoclyOpenAPIDocs/RedoclyOpenAPIDocsStandalone.js +1 -1
- package/lib/components/Replay/Replay.js +1 -1
- package/lib/components/RightPanel/RightPanel.js +1 -1
- package/lib/components/SectionItem/SectionItem.d.ts +1 -1
- package/lib/components/Security/OAuthFlow.js +1 -1
- package/lib/components/Security/SecurityButton.js +14 -7
- package/lib/components/Security/SecurityFlow.d.ts +1 -1
- package/lib/components/Security/SecurityFlow.js +10 -5
- package/lib/components/ServerList/ServerDescriptionTooltip.d.ts +4 -0
- package/lib/components/ServerList/ServerDescriptionTooltip.js +1 -0
- package/lib/components/ServerList/ServerList.js +14 -9
- package/lib/components/ServerListDropdown/ServerListDropdown.js +1 -1
- package/lib/components/SideMenu/hooks/useMenuItems.js +1 -1
- package/lib/components/TagItem/OperationNavigationItems.js +3 -3
- package/lib/components/TagItem/OperationsNavigation.js +2 -2
- package/lib/components/TagItem/TagItem.js +17 -7
- package/lib/components/TagItem/types.d.ts +2 -2
- package/lib/models/group.js +1 -1
- package/lib/models/types.d.ts +2 -0
- package/lib/services/code-samples/generator.d.ts +9 -2
- package/lib/services/code-samples/generator.js +1 -1
- package/lib/services/code-samples/httpsnippet/helpers/device-auth-snippets.d.ts +25 -0
- package/lib/services/code-samples/httpsnippet/helpers/device-auth-snippets.js +1 -0
- package/lib/services/code-samples/httpsnippet/targets/csharp/httpclient.js +2 -2
- package/lib/services/code-samples/httpsnippet/targets/csharpNewtonsoft/httpclient.js +2 -2
- package/lib/services/code-samples/httpsnippet/targets/go/native.js +3 -3
- package/lib/services/code-samples/httpsnippet/targets/java/httpclient.js +3 -3
- package/lib/services/code-samples/httpsnippet/targets/java8/apachehttp.js +2 -2
- 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/services/code-samples/httpsnippet/targets/php/curl.js +5 -5
- package/lib/services/code-samples/httpsnippet/targets/python/requests.js +5 -5
- package/lib/services/code-samples/httpsnippet/targets/r/httr.js +1 -1
- package/lib/services/code-samples/httpsnippet/targets/ruby/native.js +1 -1
- package/lib/services/code-samples/httpsnippet/targets/shell/curl.js +7 -6
- package/lib/services/menu/builder.js +1 -1
- package/lib/services/menu/tags.d.ts +1 -0
- package/lib/services/menu/tags.js +2 -1
- package/lib/services/types.d.ts +1 -1
- package/lib/standalone.js +1 -1
- package/lib/types/open-api.d.ts +56 -0
- package/lib/utils/hasNestedFields.d.ts +1 -1
- package/lib/utils/helpers.d.ts +2 -0
- package/lib/utils/helpers.js +4 -4
- package/lib/utils/loadAndBundleSpec.js +1 -1
- package/lib/utils/mcp.d.ts +3 -0
- package/lib/utils/mcp.js +1 -0
- package/lib/utils/menu.d.ts +2 -0
- package/lib/utils/menu.js +1 -0
- package/package.json +8 -7
|
@@ -1 +1 @@
|
|
|
1
|
-
import{getTagGroupsItems as
|
|
1
|
+
import{getTagGroupsItems as d,getTagsItems as c,getTagsWithOperations as p}from"./tags.js";import{addMarkdownItems as g}from"./markdown.js";import{flattenByProp as h,getValueFromMdParsedExtension as l}from"../../utils/index.js";import{DEFAULT_WEBHOOKS_TAG_NAME as r}from"../../constants.js";function x(o,s){const{definition:e}=o,{schemaDefinitionsTagName:i}=s,a=[{id:"",name:e?.info?.["x-seo"]?.title||e?.info?.title||"Overview",href:"/",depth:1,level:1,type:"section",infoDefinition:e.info,items:[]}],t=[...e.tags||[]];if(t.some(n=>n.name===r)||t.push({name:r}),!t.find(n=>n?.name===i)&&i&&t.push({name:i}),e["x-mcp"])for(const n of["Tools","Resources","Prompts"])e["x-mcp"][n]&&(t.find(u=>u?.name===n)||t.push({name:n}));const m=p(o,t),f=e["x-tagGroups"];return a.push(...g(l(e.info,"description")||"",void 0,1)),f&&f.length>0?a.push(...d(o,void 0,f,m,s)):a.push(...c(o,m,void 0,void 0,s)),a}function O(o,s){const e=x(o,s),i=h(e||[],"items");return{contentItems:e,flatItems:i}}export{O as buildContentItems,x as buildMenuStructure};
|
|
@@ -25,3 +25,4 @@ export declare function getTagGroupsItems(parser: OpenAPIParser, parent: GroupMo
|
|
|
25
25
|
* collects tags and maps each tag to list of operations belonging to this tag
|
|
26
26
|
*/
|
|
27
27
|
export declare function getTagsWithOperations(parser: OpenAPIParser, explicitTags: OpenAPITag[]): TagsInfoMap;
|
|
28
|
+
export declare function capitalize(input: string): string;
|
|
@@ -1 +1,2 @@
|
|
|
1
|
-
import{getTagOrGroup as
|
|
1
|
+
import{getTagOrGroup as d}from"../../models/group.js";import{DEFAULT_WEBHOOKS_TAG_NAME as l,GROUP_DEPTH as g}from"../../constants.js";import{getValueFromMdParsedExtension as h,isOperationName as S,JsonPointer as $,safeSlugify as N}from"../../utils/index.js";import{getOperationsItems as T}from"./operation.js";import{addMarkdownItems as x}from"./markdown.js";import{joinWithSeparator as b}from"../history/helpers.js";const y=["tools"];function k(s,c,o,e,a){let t;if(e===void 0?t=Object.keys(c):t=e.tags,!Array.isArray(t))return console.warn("Unexpected values of tags. Check tags or x-tagGroups in your definition."),[];const f=t.map(n=>c[n]?(c[n].used=!0,c[n]):(console.warn(`Non-existing tag "${n}" is added to the group "${e?.name}"`),null)),i=[];for(const n of f){if(!n)continue;const r=d("tag",n,o);if(r.depth=g+1,n.name===""){const P=[...x(h(n,"description")||"",r,r.depth+1),...T(void 0,n,r.depth+1)];i.push(...P);continue}const p=v({definition:s.definition,tag:n,parent:r,schemaDefinitionsTagName:a.schemaDefinitionsTagName}),m=w(s.definition,n,r);r.items=[...p,...m,...x(h(n,"description")||"",r,r.depth+1),...T(r,n,r.depth+1)],i.push(r)}return i.filter(({name:n,items:r})=>n!==l||r.length>0)}function R(s,c,o,e,a){const t=[];for(const f of o){const i=d("group",f,c);i.depth=g,i.items=k(s,e,i,f,a),t.push(i)}return t}function v({definition:s,tag:c,parent:o,schemaDefinitionsTagName:e}){const a=e?[e]:[];return Object.entries(s.components?.schemas||{}).map(([t,f])=>{if(!(f["x-tags"]||a).includes(c.name))return null;const n=d("schema",{name:t,"x-displayName":`${f.title||t}`,description:`{% schemaDefinition showWriteOnly="true" schemaRef="#/components/schemas/${t}" /%}`,isSchema:!0,level:2},o);return n.depth=o.depth+1,n}).filter(Boolean)}function w(s,c,o){const e=[];for(const a of y)if(s["x-mcp"]?.[a]){const t=O(a),f=[t];for(const i of s["x-mcp"]?.[a]||[])if((i.tags?.length?i.tags:f).includes(c.name)){const r=b(o.id,N(i.name)),p=d("mcp",{name:i.name,"x-displayName":i.title||i.name,description:`${i.description||""}
|
|
2
|
+
{% mcp${t.slice(0,-1)} toolName="${i.name}" id="${r}" /%}`,isSchema:!0,level:2},o);p.depth=o.depth+1,e.push(p)}}return e}function U(s,c){const{definition:o}=s,e={},a=o["x-webhooks"]||o.webhooks,t=o["x-mcp"];for(const f of c||[])e[f.name]={...f,operations:[]};return o.paths&&u(s,o.paths,e),a&&u(s,a,e,!0),t&&E(t,e),e}function E(s,c){for(const o of y)if(s[o])for(const e of s[o]){const a=e.tags&&e.tags.length?e.tags:[O(o)];for(const t of a){let f=c[t];f===void 0&&(f={name:t,operations:[],used:!0},c[t]=f)}}}function u(s,c,o,e){for(const a of Object.keys(c||{})){const t=c[a],f=Object.keys(t).filter(S);for(const i of f){const n=t[i];if(t.$ref){const{resolved:p}=s.deref(t);u(s,{[a]:p},o,e);continue}let r=n?.tags;(!r||!r.length)&&(r=e?[l]:[""]);for(const p of r){let m=o[p];m===void 0&&(m={name:p,operations:[]},o[p]=m),!m["x-traitTag"]&&m.operations.push({...n,pathName:a,pointer:$.compile(["paths",a,i]),httpVerb:i,pathParameters:t.parameters||[],pathServers:t.servers,isWebhook:!!e})}}}}function O(s){return s.charAt(0).toUpperCase()+s.slice(1)}export{O as capitalize,R as getTagGroupsItems,k as getTagsItems,U as getTagsWithOperations};
|
package/lib/services/types.d.ts
CHANGED
|
@@ -17,7 +17,7 @@ export type ExternalLinkSeparator = {
|
|
|
17
17
|
separator?: string;
|
|
18
18
|
separatorLine?: boolean;
|
|
19
19
|
};
|
|
20
|
-
export type MenuItemGroupType = 'group' | 'tag' | 'section' | 'schema';
|
|
20
|
+
export type MenuItemGroupType = 'group' | 'tag' | 'section' | 'schema' | 'mcp';
|
|
21
21
|
export type MenuItemType = MenuItemGroupType | 'operation';
|
|
22
22
|
/** Generic interface for MenuItems */
|
|
23
23
|
export interface IMenuItem {
|
package/lib/standalone.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as i}from"react/jsx-runtime";import{createElement as p}from"react";import{createRoot as u,hydrateRoot as m}from"react-dom/client";import{querySelector as a}from"./utils/dom.js";import{RedoclyOpenAPIDocs as l}from"./components/RedoclyOpenAPIDocs/RedoclyOpenAPIDocs.js";import{RedoclyOpenAPIDocsStandalone as f}from"./components/RedoclyOpenAPIDocs/RedoclyOpenAPIDocsStandalone.js";import{setSecurityDetails as v,setSecurityDetailsVariants as V}from"./utils/security-details.js";import{setParameterValue as D}from"./utils/parameters.js";function _(t){const
|
|
1
|
+
import{jsx as i}from"react/jsx-runtime";import{createElement as p}from"react";import{createRoot as u,hydrateRoot as m}from"react-dom/client";import{querySelector as a}from"./utils/dom.js";import{RedoclyOpenAPIDocs as l}from"./components/RedoclyOpenAPIDocs/RedoclyOpenAPIDocs.js";import{RedoclyOpenAPIDocsStandalone as f}from"./components/RedoclyOpenAPIDocs/RedoclyOpenAPIDocsStandalone.js";import{setSecurityDetails as v,setSecurityDetailsVariants as V}from"./utils/security-details.js";import{setParameterValue as D}from"./utils/parameters.js";function _(t){const e={},o=t.attributes;for(let r=0;r<o.length;r++){const n=o[r];e[n.name]=n.value}return e}function d(t){const e=_(t),o={};for(const r in e){const n=r.replace(/-(.)/g,(c,s)=>s.toUpperCase());o[n]=e[r]}return o}function N(t,e=document.querySelector("redoc")){m(e,i(l,{store:t}))}function E(t,e={},o=a("redoc")){if(o===null)throw new Error('"element" argument is not provided and <redoc> tag is not found on the page');const{router:r,...n}=e;let c,s;typeof t=="string"?c=t:typeof t=="object"&&(s=t),u(o).render(p(f,{definition:s,definitionUrl:c,options:{...n,...d(o)},router:r??"hash"},["Loading..."]))}const b=__REDOCLY_API_REFERENCE_VERSION__,C=__REDOCLY_API_REFERENCE_REVISION__;function R(){const t=a("redoc");if(!t)return;const e=t.getAttribute("spec-url");e&&E(e,{},t)}R();export{N as hydrate,E as init,C as revision,D as setParameterValue,v as setSecurityDetails,V as setSecurityDetailsVariants,b as version};
|
package/lib/types/open-api.d.ts
CHANGED
|
@@ -10,6 +10,7 @@ export interface OpenAPIDefinition {
|
|
|
10
10
|
tags?: OpenAPITag[];
|
|
11
11
|
externalDocs?: OpenAPIExternalDocumentation;
|
|
12
12
|
webhooks?: OpenAPIPaths;
|
|
13
|
+
'x-mcp'?: OpenAPIMcp;
|
|
13
14
|
'x-webhooks'?: OpenAPIPaths;
|
|
14
15
|
'x-tagGroups'?: Array<{
|
|
15
16
|
name: string;
|
|
@@ -47,6 +48,7 @@ export interface XSEO {
|
|
|
47
48
|
export interface OpenAPIServer extends ParsedDescription {
|
|
48
49
|
url: string;
|
|
49
50
|
description?: string;
|
|
51
|
+
name?: string;
|
|
50
52
|
variables?: OpenAPIServerVariables;
|
|
51
53
|
}
|
|
52
54
|
export interface OpenAPIServerVariables {
|
|
@@ -314,6 +316,8 @@ export interface OpenAPISecurityScheme extends ParsedDescription {
|
|
|
314
316
|
scheme?: string;
|
|
315
317
|
bearerFormat: string;
|
|
316
318
|
'x-defaultClientId'?: string;
|
|
319
|
+
deprecated?: boolean;
|
|
320
|
+
oauth2MetadataUrl?: string;
|
|
317
321
|
flows: {
|
|
318
322
|
implicit?: {
|
|
319
323
|
refreshUrl?: string;
|
|
@@ -321,6 +325,13 @@ export interface OpenAPISecurityScheme extends ParsedDescription {
|
|
|
321
325
|
authorizationUrl: string;
|
|
322
326
|
'x-defaultClientId'?: string;
|
|
323
327
|
};
|
|
328
|
+
deviceAuthorization?: {
|
|
329
|
+
deviceAuthorizationUrl: string;
|
|
330
|
+
scopes: Record<string, string>;
|
|
331
|
+
tokenUrl: string;
|
|
332
|
+
refreshUrl?: string;
|
|
333
|
+
'x-defaultClientId'?: string;
|
|
334
|
+
};
|
|
324
335
|
password?: {
|
|
325
336
|
refreshUrl?: string;
|
|
326
337
|
scopes: Record<string, string>;
|
|
@@ -374,3 +385,48 @@ export interface ParsedDescription {
|
|
|
374
385
|
export interface ParsedDescriptionWithSummary extends ParsedDescription {
|
|
375
386
|
'x-parsed-md-summary'?: GenericObject;
|
|
376
387
|
}
|
|
388
|
+
export interface OpenAPIMcp {
|
|
389
|
+
protocolVersion: string;
|
|
390
|
+
capabilities: {
|
|
391
|
+
[key: string]: boolean | {
|
|
392
|
+
listChanged?: boolean;
|
|
393
|
+
subscribe?: boolean;
|
|
394
|
+
[key: string]: unknown;
|
|
395
|
+
};
|
|
396
|
+
};
|
|
397
|
+
servers: OpenAPIServer[];
|
|
398
|
+
tools: McpTool[];
|
|
399
|
+
resources: McpResource[];
|
|
400
|
+
prompts: McpPrompt[];
|
|
401
|
+
}
|
|
402
|
+
export interface McpTool {
|
|
403
|
+
name: string;
|
|
404
|
+
title?: string;
|
|
405
|
+
description?: string;
|
|
406
|
+
inputSchema: OpenAPISchema;
|
|
407
|
+
outputSchema?: OpenAPISchema;
|
|
408
|
+
security?: OpenAPISecurityRequirement[];
|
|
409
|
+
tags?: string[];
|
|
410
|
+
'x-badges'?: OpenAPIXBadges[];
|
|
411
|
+
}
|
|
412
|
+
export interface McpResource {
|
|
413
|
+
name: string;
|
|
414
|
+
title?: string;
|
|
415
|
+
description?: string;
|
|
416
|
+
uri: string;
|
|
417
|
+
mimeType: string;
|
|
418
|
+
security?: OpenAPISecurityRequirement[];
|
|
419
|
+
tags?: string[];
|
|
420
|
+
'x-badges'?: OpenAPIXBadges[];
|
|
421
|
+
}
|
|
422
|
+
export interface McpPrompt {
|
|
423
|
+
name: string;
|
|
424
|
+
title?: string;
|
|
425
|
+
description: string;
|
|
426
|
+
arguments: McpPromptArgument[];
|
|
427
|
+
}
|
|
428
|
+
export interface McpPromptArgument {
|
|
429
|
+
name: string;
|
|
430
|
+
description: string;
|
|
431
|
+
required: boolean;
|
|
432
|
+
}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import type { SchemaModel } from '
|
|
1
|
+
import type { SchemaModel } from '../models/types.js';
|
|
2
2
|
export declare function hasNestedFields(schema?: SchemaModel): boolean;
|
package/lib/utils/helpers.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { OpenAPIServer } from '../types/open-api';
|
|
1
2
|
/**
|
|
2
3
|
* Maps over array passing `isLast` bool to iterator as the second argument
|
|
3
4
|
*/
|
|
@@ -42,5 +43,6 @@ export declare function getWindowReferenceOptions<T>(option: string): T | null;
|
|
|
42
43
|
export declare function getJsUrl(): string;
|
|
43
44
|
export declare const normalizeText: (text?: string | GenericObject) => string;
|
|
44
45
|
export declare const getValueFromMdParsedExtension: (item: GenericObject, key: "description" | "summary" | "x-summary" | "x-enumDescriptions") => any;
|
|
46
|
+
export declare function getServerDisplayName(server: OpenAPIServer): string | undefined;
|
|
45
47
|
export declare function isLastInArray(arr: Array<unknown>, index: number): boolean;
|
|
46
48
|
export declare function isLastProperty(obj: object, key: string): boolean;
|
package/lib/utils/helpers.js
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import{isObject as i,isString as a}from"@redocly/theme/core/openapi";import{isNamedDefinition as f}from"./openapi.js";import{JsonPointer as l}from"./JsonPointer.js";import{urlParse as u}from"./url.js";import{IS_BROWSER as c}from"./dom.js";function O(r,
|
|
1
|
+
import{isObject as i,isString as a}from"@redocly/theme/core/openapi";import{isNamedDefinition as f}from"./openapi.js";import{JsonPointer as l}from"./JsonPointer.js";import{urlParse as u}from"./url.js";import{IS_BROWSER as c}from"./dom.js";function O(r,e){const t=[];for(let n=0;n<r.length-1;n++)t.push(e(r[n],!1));return r.length!==0&&t.push(e(r[r.length-1],!0)),t}function y(r,e){const t={};for(const n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=e(r[n],n,r));return t}function A(r,e){const t=[],n=o=>{for(const s of o)t.push(s),s[e]&&n(s[e])};return n(r),t}function p(r){return r.endsWith("/")?r.substring(0,r.length-1):r}function b(r){return!isNaN(parseFloat(r))&&isFinite(r)}function E(r,e,t){const n=new RegExp(`(^|\\n)#\\s?${e}\\s*\\n`,"i"),o=new RegExp(`((\\n|^)#\\s*${e}\\s*(\\n|$)(?:.|\\n)*?)(\\n#|$)`,"i");if(n.test(r))return r.replace(o,`$1
|
|
2
2
|
|
|
3
|
-
${
|
|
3
|
+
${t}
|
|
4
4
|
$4`);{const s=r===""||r.endsWith(`
|
|
5
5
|
|
|
6
6
|
`)?"":r.endsWith(`
|
|
7
7
|
`)?`
|
|
8
8
|
`:`
|
|
9
9
|
|
|
10
|
-
`;return`${r}${s}# ${
|
|
10
|
+
`;return`${r}${s}# ${e}
|
|
11
11
|
|
|
12
|
-
${
|
|
12
|
+
${t}`}}const R=r=>Array.isArray(r)&&r.some(e=>i(e)),W=r=>r.filter(e=>!!e),C=r=>i(r)&&!Array.isArray(r);function d(r){return/(?:^[a-z][a-z0-9+.-]*:|\/\/)/i.test(r)}function I(r,e){let t;if(e.startsWith("//"))t=`${u(r,!0)?.protocol||"https:"}${e}`;else if(d(e))t=e;else if(!e.startsWith("/"))t=p(r)+"/"+e;else{const n=u(r);n?(n.pathname=e,t=n.toString()):t=e}return p(t)}function N(r){return r.charAt(0).toUpperCase()+r.slice(1)}function L(r){try{if(!r)return"";const e=new URL(r);return e.search="",e.hash="",e.toString()}catch{return r}}function M(r){return r.replace(/["\\]/g,"\\$&")}function P(r){return r.replace(/&#(\d+);/g,(e,t)=>String.fromCharCode(parseInt(t,10))).replace(/&/g,"&").replace(/"/g,'"')}function T(r){return r&&r.replace(/#/g,"_").toLowerCase()}function j(r,e){return e||f(r)&&l.baseName(r)||""}function z(r={},e,t){return typeof e=="string"&&(e=e.split(".")),e.reduce((n,o)=>n&&n[o]?n[o]:t,r)}function x(r){return(...e)=>e.filter(Boolean).join(r)}const D=x(".");function F(r){return c?window?.REFERENCE_DOCS_OPTIONS?.[r]:null}function _(){if(!c)return"";const r=+new Date+Math.random();try{return(!document.currentScript||!(document.currentScript.async||document.currentScript.defer))&&document.write(`<script id="dummy${r}"></script>`),(document.getElementById("dummy"+r)?.previousSibling).src}catch{return""}}const B=r=>a(r)?r:r?.raw,H=(r,e)=>{const t=r?.[`x-parsed-md-${e}`]||r?.[e];if(!t)return;if(!r?.[`x-parsed-md-${e}`]&&e!=="x-enumDescriptions")return r?.[e];if(e!=="x-enumDescriptions")return m(r,e);let n={};for(const o in t)o.startsWith("x-parsed-md")||(n[o]=t?.[`x-parsed-md-${o}`]||t?.[o]);return Object.keys(n).length?n:t};function U(r){return r.name||r.description}function m(r,e){const t=r?.[`x-parsed-md-${e}`]||r?.[e];return t?.raw?t:{result:t?.result||r?.[e]?.result||r?.[e],raw:r?.[e]}}function V(r,e){return e===r.length-1}function v(r,e){const t=Object.keys(r);return t.indexOf(e)===t.length-1}export{E as appendToMdHeading,W as deleteEmptyArrayItem,D as dottedString,M as escapeHTMLAttrChars,A as flattenByProp,z as get,_ as getJsUrl,U as getServerDisplayName,H as getValueFromMdParsedExtension,F as getWindowReferenceOptions,d as isAbsoluteUrl,R as isArrayOfObjects,V as isLastInArray,v as isLastProperty,C as isMergeableObject,b as isNumeric,x as joinStringFactory,y as mapValues,O as mapWithLast,B as normalizeText,L as removeQueryStringAndHash,I as resolveUrl,T as sanitizeItemId,p as stripTrailingSlash,N as titleize,P as unescapeHTMLChars,j as useSchemaTitle};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{bundle as a,loadConfig as r}from"@redocly/openapi-core";import{combineUrls as s}from"@redocly/theme/core/openapi";import{convertSwagger2OpenAPI as c}from"./convertSwagger2OpenAPI.js";import{IS_BROWSER as t}from"./dom.js";import{REDOCLY_CONFIG_FILE as f}from"../constants.js";async function w(){const o=t?window.location.origin:typeof globalThis.process<"u"?globalThis.process.cwd():"";try{return(await r({configPath:s(o,f)}))?.resolvedConfig.openapi||{}}catch
|
|
1
|
+
import{bundle as a,loadConfig as r}from"@redocly/openapi-core";import{combineUrls as s}from"@redocly/theme/core/openapi";import{convertSwagger2OpenAPI as c}from"./convertSwagger2OpenAPI.js";import{IS_BROWSER as t}from"./dom.js";import{REDOCLY_CONFIG_FILE as f}from"../constants.js";async function w(){const o=t?window.location.origin:typeof globalThis.process<"u"?globalThis.process.cwd():"";try{return(await r({configPath:s(o,f)}))?.resolvedConfig.openapi||{}}catch{return{}}}async function b(o){const n=await r(),e={config:n,base:t?window.location.origin:typeof globalThis.process<"u"?globalThis.process.cwd():""};t&&(n.resolve.http.customFetch=globalThis.fetch),typeof o=="object"&&o!==null?e.doc=d(o):e.ref=o;const{bundle:{parsed:i}}=await a(e);return i.swagger!==void 0?c(i):i}function d(o){return{source:{absoluteRef:""},parsed:o}}export{b as loadAndBundleDefinition,w as loadOpenapiConfig};
|
package/lib/utils/mcp.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const o=["tools","resources","prompts","logging","subscribe","completions"],s="experimental",e=["mcp-cursor"];export{o as MCP_SERVER_CAPABILITIES,s as MCP_SERVER_EXPERIMENTAL_CAPABILITIES,e as PAGE_ACTIONS_MCP};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
function n(e){return e.type==="operation"||e.type==="schema"||e.type==="mcp"}export{n as isRenderableMenuItem};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@redocly/openapi-docs",
|
|
3
|
-
"version": "3.14.0
|
|
3
|
+
"version": "3.14.0",
|
|
4
4
|
"description": "Redocly OpenAPI Docs",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "lib/index.js",
|
|
@@ -21,9 +21,9 @@
|
|
|
21
21
|
},
|
|
22
22
|
"dependencies": {
|
|
23
23
|
"@markdoc/markdoc": "0.5.2",
|
|
24
|
-
"@redocly/openapi-core": "2.
|
|
24
|
+
"@redocly/openapi-core": "2.3.1",
|
|
25
25
|
"deepmerge": "^4.2.2",
|
|
26
|
-
"dompurify": "3.2.
|
|
26
|
+
"dompurify": "3.2.7",
|
|
27
27
|
"fast-deep-equal": "^3.1.3",
|
|
28
28
|
"jotai": "^2.12.5",
|
|
29
29
|
"json-pointer": "^0.6.2",
|
|
@@ -36,8 +36,8 @@
|
|
|
36
36
|
"url-template": "^2.0.8",
|
|
37
37
|
"util": "~0.12.5",
|
|
38
38
|
"web-vitals": "3.3.1",
|
|
39
|
-
"@redocly/
|
|
40
|
-
"@redocly/
|
|
39
|
+
"@redocly/config": "0.35.1",
|
|
40
|
+
"@redocly/replay": "0.17.0"
|
|
41
41
|
},
|
|
42
42
|
"devDependencies": {
|
|
43
43
|
"@jest/globals": "29.5.0",
|
|
@@ -75,7 +75,7 @@
|
|
|
75
75
|
"typescript": "5.6.2",
|
|
76
76
|
"url": "~0.11.0",
|
|
77
77
|
"vite": "6.3.6",
|
|
78
|
-
"@redocly/theme": "0.58.0
|
|
78
|
+
"@redocly/theme": "0.58.0"
|
|
79
79
|
},
|
|
80
80
|
"scripts": {
|
|
81
81
|
"start": "npm run copy-highlight-hook && vite",
|
|
@@ -84,7 +84,8 @@
|
|
|
84
84
|
"build:standalone": "vite build && node scripts/minify.js dist",
|
|
85
85
|
"prepare:community-source": "npx tsx scripts/prepare-community-source.ts --",
|
|
86
86
|
"prepare:community-source-only": "npm run prepare:community-source --ignore /src/* private-readme.md",
|
|
87
|
-
"
|
|
87
|
+
"prepare:community-dependencies": "npx tsx scripts/prepare-community-dependencies.ts",
|
|
88
|
+
"test": "npm run prepare:community-source && cd redoc && npm install && npm run lint && npm run unit && cd ../ && jest -w 2",
|
|
88
89
|
"test:update": "jest -u",
|
|
89
90
|
"test:watch": "jest --watch",
|
|
90
91
|
"test:coverage": "jest --coverage",
|