@redocly/openapi-docs 3.16.0-next.0 → 3.16.0-next.10

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.
Files changed (38) hide show
  1. package/dist/redocly-openapi-docs.min.js +3139 -2687
  2. package/lib/components/ContentItem/ContentItem.js +1 -1
  3. package/lib/components/McpTool/McpPrompt.d.ts +6 -0
  4. package/lib/components/McpTool/McpPrompt.js +9 -0
  5. package/lib/components/McpTool/McpResource.d.ts +7 -0
  6. package/lib/components/McpTool/McpResource.js +16 -0
  7. package/lib/components/McpTool/McpTool.d.ts +1 -1
  8. package/lib/components/McpTool/McpTool.js +1 -1
  9. package/lib/components/McpTool/index.d.ts +2 -0
  10. package/lib/components/McpTool/index.js +1 -1
  11. package/lib/components/PropertyDetails/FieldDetails.js +6 -6
  12. package/lib/components/RedoclyOpenAPIDocs/Providers.js +1 -1
  13. package/lib/components/Replay/EmbeddedReplay.d.ts +2 -1
  14. package/lib/components/Replay/EmbeddedReplay.js +3 -3
  15. package/lib/components/Replay/Replay.js +1 -1
  16. package/lib/components/Replay/utils.js +1 -1
  17. package/lib/components/RequestSamples/Example.js +1 -1
  18. package/lib/components/Schema/OneOfSchema.js +3 -3
  19. package/lib/components/Schema/Schema.js +1 -1
  20. package/lib/components/ServerListDropdown/ServerListDropdown.js +1 -1
  21. package/lib/components/SideMenu/hooks/useMenuItems.js +1 -1
  22. package/lib/components/TagItem/OperationNavigationItems.js +4 -4
  23. package/lib/components/TagItem/OperationsNavigation.js +2 -2
  24. package/lib/models/group.js +1 -1
  25. package/lib/models/mediaType.js +1 -1
  26. package/lib/models/operation.js +1 -1
  27. package/lib/models/types.d.ts +4 -0
  28. package/lib/services/OpenAPIParser.js +1 -1
  29. package/lib/services/code-samples/httpsnippet/targets/node/fetch.js +1 -1
  30. package/lib/services/menu/operation.js +1 -1
  31. package/lib/services/menu/tags.d.ts +1 -0
  32. package/lib/services/menu/tags.js +4 -2
  33. package/lib/services/types.d.ts +3 -1
  34. package/lib/types/open-api.d.ts +8 -0
  35. package/lib/utils/configure-helpers.d.ts +2 -2
  36. package/lib/utils/configure-helpers.js +1 -1
  37. package/lib/utils/menu.js +1 -1
  38. package/package.json +13 -10
@@ -1,2 +1,4 @@
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 k,safeSlugify as w}from"../../utils/index.js";import{getOperationsItems as T}from"./operation.js";import{addMarkdownItems as x}from"./markdown.js";import{joinWithSeparator as $}from"../history/helpers.js";const y=["tools"];function N(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=b({definition:s.definition,tag:n,parent:r,schemaDefinitionsTagName:a.schemaDefinitionsTagName}),m=v(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=N(s,e,i,f,a),t.push(i)}return t}function b({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 v(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=$(o.id,w(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:k.compile(["paths",a,i]),httpVerb:i,pathParameters:t.parameters||[],pathServers:t.servers,isWebhook:!!e,keywords:n["x-keywords"]})}}}}function O(s){return s.charAt(0).toUpperCase()+s.slice(1)}export{O as capitalize,R as getTagGroupsItems,N as getTagsItems,U as getTagsWithOperations};
1
+ import{getTagOrGroup as d}from"../../models/group.js";import{DEFAULT_WEBHOOKS_TAG_NAME as g,GROUP_DEPTH as h}from"../../constants.js";import{getValueFromMdParsedExtension as T,isOperationName as S,JsonPointer as w,safeSlugify as k}from"../../utils/index.js";import{getOperationsItems as x}from"./operation.js";import{addMarkdownItems as O}from"./markdown.js";import{joinWithSeparator as b}from"../history/helpers.js";const y=["tools","resources","prompts"];function v(r,f,n,o,s){let t;if(o===void 0?t=Object.keys(f):t=o.tags,!Array.isArray(t))return console.warn("Unexpected values of tags. Check tags or x-tagGroups in your definition."),[];const a=t.map(e=>f[e]?(f[e].used=!0,f[e]):(console.warn(`Non-existing tag "${e}" is added to the group "${o?.name}"`),null)),i=[];for(const e of a){if(!e)continue;const c=d("tag",e,n);if(c.depth=h+1,e.name===""){const m=[...O(T(e,"description")||"",c,c.depth+1),...x(void 0,e,c.depth+1)];i.push(...m);continue}const p=A({definition:r.definition,tag:e,parent:c,schemaDefinitionsTagName:s.schemaDefinitionsTagName}),l=E(r.definition,e,c);c.items=[...p,...l,...O(T(e,"description")||"",c,c.depth+1),...x(c,e,c.depth+1)],i.push(c)}return i.filter(({name:e,items:c})=>e!==g||c.length>0)}function I(r,f,n,o,s){const t=[];for(const a of n){const i=d("group",a,f);i.depth=h,i.items=v(r,o,i,a,s),t.push(i)}return t}function A({definition:r,tag:f,parent:n,schemaDefinitionsTagName:o}){const s=o?[o]:[];return Object.entries(r.components?.schemas||{}).map(([t,a])=>{if(!(a["x-tags"]||s).includes(f.name))return null;const e=d("schema",{name:t,"x-displayName":`${a.title||t}`,description:`{% schemaDefinition showWriteOnly="true" schemaRef="#/components/schemas/${t}" /%}`,isSchema:!0,level:2},n);return e.depth=n.depth+1,e}).filter(Boolean)}function E(r,f,n){const o=[];for(const s of y)if(r["x-mcp"]?.[s]){const t=P(s),a=[t];for(const i of r["x-mcp"]?.[s]||[])if((i.tags?.length?i.tags:a).includes(f.name)){const c=b(n.id,k(i.name)),p=s==="tools"?`Tool name: \`${i.name}\`
2
+
3
+ `:"",m=d(s==="tools"?"tool":s==="resources"?"rsrc":"prompt",{name:i.name,"x-displayName":i.title||i.name,description:`${p}${i.description||""}
4
+ {% mcp${t.slice(0,-1)} name="${i.name}" id="${c}" /%}`,isSchema:!0,level:2},n);m.depth=n.depth+1,o.push(m)}}return o}function M(r,f){const{definition:n}=r,o={},s=n["x-webhooks"]||n.webhooks,t=n["x-mcp"];for(const a of f||[])o[a.name]={...a,operations:[]};return n.paths&&u(r,n.paths,o),s&&u(r,s,o,!0),t&&j(t,o),o}function j(r,f){for(const n of y)if(r[n])for(const o of r[n]){const s=o.tags&&o.tags.length?o.tags:[P(n)];for(const t of s){let a=f[t];a===void 0&&(a={name:t,operations:[],used:!0},f[t]=a)}}}function $(r,f,n,o,s,t,a,i){if(s.$ref){const{resolved:c}=r.deref(s);u(r,{[o]:c},t,a);return}let e=n?.tags;(!e||!e.length)&&(e=a?[g]:[""]);for(const c of e){let p=t[c];p===void 0&&(p={name:c,operations:[]},t[c]=p),!p["x-traitTag"]&&p.operations.push({...n,pathName:o,pointer:w.compile(["paths",o,f]),httpVerb:f,pathParameters:s.parameters||[],pathServers:s.servers,isWebhook:!!a,isAdditionalOperation:!!i,keywords:n["x-keywords"]})}}function u(r,f,n,o){for(const s of Object.keys(f||{})){const t=f[s],a=Object.keys(t).filter(S);for(const i of a){const e=t[i];$(r,i,e,s,t,n,o)}if(t.additionalOperations)for(const[i,e]of Object.entries(t.additionalOperations))$(r,i,e,s,t,n,o,!0)}}function P(r){return r.charAt(0).toUpperCase()+r.slice(1)}export{P as capitalize,I as getTagGroupsItems,v as getTagsItems,M as getTagsWithOperations,$ as processOperation};
@@ -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' | 'mcp';
20
+ export type MenuItemGroupType = 'group' | 'tag' | 'section' | 'schema' | 'tool' | 'rsrc' | 'prompt';
21
21
  export type MenuItemType = MenuItemGroupType | 'operation';
22
22
  /** Generic interface for MenuItems */
23
23
  export interface IMenuItem {
@@ -29,6 +29,7 @@ export interface IMenuItem {
29
29
  items: IMenuItem[];
30
30
  parent?: IMenuItem;
31
31
  deprecated?: boolean;
32
+ isAdditionalOperation?: boolean;
32
33
  type: MenuItemType;
33
34
  isSchema?: boolean;
34
35
  httpVerb?: string;
@@ -50,6 +51,7 @@ export type ExtendedOpenAPIOperation = {
50
51
  pathParameters: Array<Referenced<OpenAPIParameter>>;
51
52
  pathServers: Array<OpenAPIServer> | undefined;
52
53
  isWebhook: boolean;
54
+ isAdditionalOperation: boolean;
53
55
  defaultSampleName?: string | false;
54
56
  keywords?: unknown;
55
57
  } & OpenAPIOperation;
@@ -16,6 +16,7 @@ export interface OpenAPIDefinition {
16
16
  name: string;
17
17
  tags: Array<string>;
18
18
  }>;
19
+ 'x-redocly-catalog-key'?: string;
19
20
  'x-feedback'?: any;
20
21
  'x-schema-catalog-link'?: string;
21
22
  'x-keywords'?: unknown;
@@ -81,6 +82,7 @@ export interface OpenAPIPath extends Partial<OpenAPIRef>, ParsedDescriptionWithS
81
82
  head?: OpenAPIOperation;
82
83
  patch?: OpenAPIOperation;
83
84
  trace?: OpenAPIOperation;
85
+ additionalOperations?: Record<string, OpenAPIOperation>;
84
86
  servers?: OpenAPIServer[];
85
87
  parameters?: Array<Referenced<OpenAPIParameter>>;
86
88
  }
@@ -418,6 +420,8 @@ export interface McpResource {
418
420
  description?: string;
419
421
  uri: string;
420
422
  mimeType: string;
423
+ blob?: string;
424
+ text?: string;
421
425
  security?: OpenAPISecurityRequirement[];
422
426
  tags?: string[];
423
427
  'x-badges'?: OpenAPIXBadges[];
@@ -427,9 +431,13 @@ export interface McpPrompt {
427
431
  title?: string;
428
432
  description: string;
429
433
  arguments: McpPromptArgument[];
434
+ security?: OpenAPISecurityRequirement[];
435
+ tags?: string[];
436
+ 'x-badges'?: OpenAPIXBadges[];
430
437
  }
431
438
  export interface McpPromptArgument {
432
439
  name: string;
433
440
  description: string;
434
441
  required: boolean;
442
+ example?: string;
435
443
  }
@@ -3,10 +3,10 @@ import type { ConfigureRequestValues, ConfigureServerRequestValues, SecurityDeta
3
3
  export declare function updateOperationWithRequestValues(operation: OperationModel, userDefinedRequestValues: ConfigureRequestValues | ConfigureServerRequestValues): void;
4
4
  export declare function updateParametersWithUserValues(param: FieldModel, userDefinedRequestValues?: ConfigureRequestValues | ConfigureServerRequestValues): void;
5
5
  export declare function updateRequestBodyWithUserValues(operation: OperationModel, userDefinedRequestValues: ConfigureRequestValues, serverUrl?: string): OperationModel | undefined;
6
- export declare function updateSecurityWithUserValues(operation: OperationModel, securityValues?: SecurityDetails, serverUrl?: string): void;
6
+ export declare function updateSecurityWithUserValues(operation: OperationModel, securityValues?: Record<string, SecurityDetails>, serverUrl?: string): void;
7
7
  export declare function updateOperationWithServerUserValues(operation: OperationModel, serverRequestValues: ConfigureServerRequestValues): void;
8
8
  export declare function updateEnvVariablesWithUserValues(operation: OperationModel, environmentValues?: Record<string, string>, serverUrl?: string): void;
9
9
  export declare function updateServerVariablesWithUserValues(operation: OperationModel, serverVariables?: Record<string, string>, serverUrl?: string): void;
10
10
  export declare function isDirectRequestValues(value: any): value is ConfigureRequestValues;
11
11
  export declare function updateObjectProperties(original: any, updates: any): any;
12
- export declare function createSecurityUpdates(scheme: any, securityValues: SecurityDetails): SecurityCredentials;
12
+ export declare function createSecurityUpdates(scheme: any, securityValues: Record<string, SecurityDetails>): SecurityCredentials;
@@ -1 +1 @@
1
- import{isObject as V}from"@redocly/theme/core/openapi";function p(e,t){Object.keys(t).length!==0&&(y(t)?(b(e,t),h(e,t.security),d(e,t.envVariables),v(e,t.serverVariables)):j(e,t))}function O(e,t){if(!t)return;const{in:r,name:s}=e;if(y(t)){const a=t,c={header:a.headers,query:a.query,path:a.path,cookie:a.cookie};r&&c[r]?.[s]&&(e.example=c[r][s])}else Object.entries(t).forEach(([a,c])=>{const f=c;if(!f)return;const n={header:f.headers,query:f.query,path:f.path,cookie:f.cookie};r&&n[r]?.[s]&&(e.serverValues||(e.serverValues={}),e.serverValues[a]={example:n[r][s]})})}function b(e,t,r){if(!e.requestBody||!t?.body)return;const s=e.requestBody.content;if(!s?.mediaTypes)return;const a=(c,f)=>{c[f]&&Object.keys(c[f]).forEach(n=>{const u=c[f]?.[n]?.value;let l;if(V(u)?l=o(u,t.body):l=t.body,!!l)if(r){const i=c[f][n];i.serverValues||(i.serverValues={}),i.serverValues[r]={value:l,rawValue:l},c[f][n]={...i,mime:c.name}}else c[f][n]={value:l,rawValue:l,mime:c.name}})};for(const c of s.mediaTypes)a(c,"examples"),a(c,"formExamples");return e}function h(e,t,r){!t||!e.security.length||e.security.forEach(s=>{r?s.schemes.forEach(a=>{a.serverValues||(a.serverValues={});const c=k(a,t);a.serverValues[r]=c}):s.schemes.forEach(a=>{const c=k(a,t);Object.assign(a,c)})})}function j(e,t){e.servers.forEach(r=>{if(t[r.url]){const s=t[r.url];s&&(b(e,s,r.url),h(e,s.security,r.url),d(e,s.envVariables,r.url),v(e,s.serverVariables,r.url))}})}function d(e,t,r){!t||Object.keys(t).length===0||(e.envVariables||(e.envVariables={}),r?(e.envVariables.serverValues||(e.envVariables.serverValues={}),e.envVariables.serverValues[r]={...e.envVariables.serverValues[r],...t}):e.envVariables.values={...e.envVariables.values,...t})}function v(e,t,r){if(!(!t||Object.keys(t).length===0))if(r){const s=e.servers.find(a=>a.url===r);if(s){s.variables||(s.variables={});for(const[a,c]of Object.entries(t))s.variables[a]&&(s.variables[a].default=c)}}else e.servers.forEach(s=>{s.variables||(s.variables={});for(const[a,c]of Object.entries(t))s.variables[a]&&(s.variables[a].default=c)})}function y(e){return!e||typeof e!="object"?!1:"headers"in e||"body"in e||"query"in e||"path"in e||"cookie"in e||"security"in e||"envVariables"in e||"serverVariables"in e}function o(e,t){if(!e||typeof e!="object")return t;if(Array.isArray(e)&&Array.isArray(t)){if(e.length>0&&typeof e[0]=="object"&&e[0]!==null){const s=Object.keys(e[0]),a=t.filter(c=>typeof c!="object"||c===null?!1:s.some(f=>f in c)&&Object.keys(c).every(f=>s.includes(f)));return a.length>0?a:e}return t}const r=Array.isArray(e)?[...e]:{...e};for(const[s,a]of Object.entries(t))s in e&&(Array.isArray(e[s])||typeof a=="object"&&a!==null&&typeof e[s]=="object"?r[s]=o(e[s],a):r[s]=a);return r}function k(e,t){const r={"x-defaultAccessToken":t.token?.access_token,"x-defaultTokenType":t.token?.token_type||"Bearer","x-defaultClientId":t.client_id,"x-defaultClientSecret":t.client_secret,scopes:t.scopes||e.scopes};return e.type==="http"&&e.scheme==="basic"?(r["x-defaultUsername"]=t.username,r["x-defaultPassword"]=t.password,delete r["x-defaultAccessToken"],delete r["x-defaultTokenType"]):e.type==="oauth2"&&!t.token?.access_token&&(delete r["x-defaultAccessToken"],delete r["x-defaultTokenType"]),r}export{k as createSecurityUpdates,y as isDirectRequestValues,d as updateEnvVariablesWithUserValues,o as updateObjectProperties,p as updateOperationWithRequestValues,j as updateOperationWithServerUserValues,O as updateParametersWithUserValues,b as updateRequestBodyWithUserValues,h as updateSecurityWithUserValues,v as updateServerVariablesWithUserValues};
1
+ import{isObject as k}from"@redocly/theme/core/openapi";function p(e,r){Object.keys(r).length!==0&&(h(r)?(b(e,r),y(e,r.security),d(e,r.envVariables),v(e,r.serverVariables)):j(e,r))}function O(e,r){if(!r)return;const{in:s,name:t}=e;if(h(r)){const a=r,c={header:a.headers,query:a.query,path:a.path,cookie:a.cookie};s&&c[s]?.[t]&&(e.example=c[s][t])}else Object.entries(r).forEach(([a,c])=>{const f=c;if(!f)return;const n={header:f.headers,query:f.query,path:f.path,cookie:f.cookie};s&&n[s]?.[t]&&(e.serverValues||(e.serverValues={}),e.serverValues[a]={example:n[s][t]})})}function b(e,r,s){if(!e.requestBody||!r?.body)return;const t=e.requestBody.content;if(!t?.mediaTypes)return;const a=(c,f)=>{c[f]&&Object.keys(c[f]).forEach(n=>{const o=c[f]?.[n]?.value;let l;if(k(o)?l=u(o,r.body):l=r.body,!!l)if(s){const i=c[f][n];i.serverValues||(i.serverValues={}),i.serverValues[s]={value:l,rawValue:l},c[f][n]={...i,mime:c.name}}else c[f][n]={value:l,rawValue:l,mime:c.name}})};for(const c of t.mediaTypes)a(c,"examples"),a(c,"formExamples");return e}function y(e,r,s){!r||!e.security.length||e.security.forEach(t=>{s?t.schemes.forEach(a=>{a.serverValues||(a.serverValues={});const c=V(a,r);a.serverValues[s]=c}):t.schemes.forEach(a=>{const c=V(a,r);Object.assign(a,c)})})}function j(e,r){e.servers.forEach(s=>{if(r[s.url]){const t=r[s.url];t&&(b(e,t,s.url),y(e,t.security,s.url),d(e,t.envVariables,s.url),v(e,t.serverVariables,s.url))}})}function d(e,r,s){!r||Object.keys(r).length===0||(e.envVariables||(e.envVariables={}),s?(e.envVariables.serverValues||(e.envVariables.serverValues={}),e.envVariables.serverValues[s]={...e.envVariables.serverValues[s],...r}):e.envVariables.values={...e.envVariables.values,...r})}function v(e,r,s){if(!(!r||Object.keys(r).length===0))if(s){const t=e.servers.find(a=>a.url===s);if(t){t.variables||(t.variables={});for(const[a,c]of Object.entries(r))t.variables[a]&&(t.variables[a].default=c)}}else e.servers.forEach(t=>{t.variables||(t.variables={});for(const[a,c]of Object.entries(r))t.variables[a]&&(t.variables[a].default=c)})}function h(e){return!e||typeof e!="object"?!1:"headers"in e||"body"in e||"query"in e||"path"in e||"cookie"in e||"security"in e||"envVariables"in e||"serverVariables"in e}function u(e,r){if(!e||typeof e!="object")return r;if(Array.isArray(e)&&Array.isArray(r)){if(e.length>0&&typeof e[0]=="object"&&e[0]!==null){const t=Object.keys(e[0]),a=r.filter(c=>typeof c!="object"||c===null?!1:t.some(f=>f in c)&&Object.keys(c).every(f=>t.includes(f)));return a.length>0?a:e}return r}const s=Array.isArray(e)?[...e]:{...e};for(const[t,a]of Object.entries(r))t in e&&(Array.isArray(e[t])||typeof a=="object"&&a!==null&&typeof e[t]=="object"?s[t]=u(e[t],a):s[t]=a);return s}function V(e,r){const s=r?.[e.id]||r?.default||{},t={"x-defaultAccessToken":s.token?.access_token,"x-defaultTokenType":s.token?.token_type||"Bearer","x-defaultClientId":s.client_id,"x-defaultClientSecret":s.client_secret,scopes:s.scopes||e.scopes};return e.type==="http"&&e.scheme==="basic"?(t["x-defaultUsername"]=s.username,t["x-defaultPassword"]=s.password,delete t["x-defaultAccessToken"],delete t["x-defaultTokenType"]):e.type==="oauth2"&&!s.token?.access_token&&(delete t["x-defaultAccessToken"],delete t["x-defaultTokenType"]),t}export{V as createSecurityUpdates,h as isDirectRequestValues,d as updateEnvVariablesWithUserValues,u as updateObjectProperties,p as updateOperationWithRequestValues,j as updateOperationWithServerUserValues,O as updateParametersWithUserValues,b as updateRequestBodyWithUserValues,y as updateSecurityWithUserValues,v as updateServerVariablesWithUserValues};
package/lib/utils/menu.js CHANGED
@@ -1 +1 @@
1
- function n(e){return e.type==="operation"||e.type==="schema"||e.type==="mcp"}export{n as isRenderableMenuItem};
1
+ function p(e){return e.type==="operation"||e.type==="schema"||e.type==="tool"||e.type==="rsrc"||e.type==="prompt"}export{p as isRenderableMenuItem};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@redocly/openapi-docs",
3
- "version": "3.16.0-next.0",
3
+ "version": "3.16.0-next.10",
4
4
  "description": "Redocly OpenAPI Docs",
5
5
  "type": "module",
6
6
  "main": "lib/index.js",
@@ -21,7 +21,7 @@
21
21
  },
22
22
  "dependencies": {
23
23
  "@markdoc/markdoc": "0.5.2",
24
- "@redocly/openapi-core": "2.10.0",
24
+ "@redocly/openapi-core": "2.12.1",
25
25
  "deepmerge": "^4.2.2",
26
26
  "dompurify": "3.2.7",
27
27
  "fast-deep-equal": "^3.1.3",
@@ -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/config": "0.38.0",
40
- "@redocly/replay": "0.19.0-next.0"
39
+ "@redocly/config": "0.40.0",
40
+ "@redocly/replay": "0.19.0-next.9"
41
41
  },
42
42
  "devDependencies": {
43
43
  "@jest/globals": "29.5.0",
@@ -53,8 +53,8 @@
53
53
  "@types/react": "^19.1.4",
54
54
  "@types/react-dom": "^19.1.4",
55
55
  "@types/styled-components": "5.1.34",
56
- "@vitejs/plugin-react": "5.0.4",
57
- "esbuild": "0.25.10",
56
+ "@vitejs/plugin-react": "5.1.1",
57
+ "esbuild": "0.27.0",
58
58
  "jest": "29.5.0",
59
59
  "jest-environment-jsdom": "29.5.0",
60
60
  "jest-styled-components": "7.2.0",
@@ -74,8 +74,8 @@
74
74
  "tsx": "4.20.3",
75
75
  "typescript": "5.9.3",
76
76
  "url": "~0.11.0",
77
- "vite": "7.1.9",
78
- "@redocly/theme": "0.60.0-next.0"
77
+ "vite": "7.2.6",
78
+ "@redocly/theme": "0.60.0-next.7"
79
79
  },
80
80
  "scripts": {
81
81
  "start": "npm run copy-highlight-hook && vite",
@@ -86,7 +86,8 @@
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
88
  "apply:community-source": "npx tsx scripts/apply-changes-from-community-source.ts",
89
- "test": "jest -w 2",
89
+ "test": "npm run prepare:community-source && npm run test:redoc && jest -w 2",
90
+ "test:redoc": "cd redoc && pnpm install && npm run lint && npm run unit",
90
91
  "unit": "jest -w 2",
91
92
  "test:update": "jest -u",
92
93
  "test:watch": "jest --watch",
@@ -100,6 +101,8 @@
100
101
  "license:check": "npx license-checker --production --onlyAllow 'MIT;ISC;Apache-2.0;Apache;CC0-1.0;BSD;BSD-2-Clause;BSD-3-Clause;UNKNOWN' --summary",
101
102
  "precdn:serve": "mkdir -p playground/cdn-test/server-dist && cp -Rf dist/* playground/cdn-test/server-dist && cp -Rf playground/cdn-test/template-source/* playground/cdn-test/server-dist",
102
103
  "cdn-serve": "http-server playground/cdn-test/server-dist",
103
- "copy-highlight-hook": "cp -r ../portal/src/client/app/hooks/codeHighlight ./playground/hooks"
104
+ "copy-highlight-hook": "cp -r ../portal/src/client/app/hooks/codeHighlight ./playground/hooks",
105
+ "redoc:use-workspace": "node scripts/use-workspace-deps.js",
106
+ "redoc:revert-workspace": "node scripts/use-workspace-deps.js revert"
104
107
  }
105
108
  }