@stainless-api/docs-ui 0.1.0-beta.94 → 0.1.0-beta.95

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.
@@ -84,7 +84,9 @@ function normalizeDeclaration(raw, http) {
84
84
  function SDKDeclaration({ path, expand, depth = 0 }) {
85
85
  const Lang = useLanguageComponents();
86
86
  const Docs = useComponents();
87
- let pendingDecl = normalizeDeclaration(useDeclaration(path, true), useDeclaration(path.replace(/ > \(schema\)$/, "") + " > (schema)", false, "http"));
87
+ const rawDecl = useDeclaration(path, true);
88
+ const spec = useSpec();
89
+ let pendingDecl = normalizeDeclaration(rawDecl, useDeclaration(path.replace(/ > \(schema\)$/, "") + " > (schema)", false, "http"));
88
90
  const settings = useSettings();
89
91
  const model = usePropertyModel();
90
92
  const nesting = useReferenceNesting();
@@ -147,7 +149,7 @@ function SDKDeclaration({ path, expand, depth = 0 }) {
147
149
  const decl = pendingDecl;
148
150
  if (decl.kind.endsWith("Reference")) {
149
151
  const refId = "type" in decl && decl.type !== void 0 && typeof decl.type !== "string" && "$ref" in decl.type ? decl.type["$ref"] : void 0;
150
- if (refId && refId !== path && !nesting.includes(refId)) return /* @__PURE__ */ jsx(AddToDeclarationParents, {
152
+ if (refId && refId !== path && !nesting.includes(refId) && spec?.decls?.[language]?.[refId]) return /* @__PURE__ */ jsx(AddToDeclarationParents, {
151
153
  id: path,
152
154
  children: /* @__PURE__ */ jsx(ReferenceNestingContext, {
153
155
  value: [...nesting, refId],
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@stainless-api/docs-ui",
3
3
  "private": false,
4
- "version": "0.1.0-beta.94",
4
+ "version": "0.1.0-beta.95",
5
5
  "publishConfig": {
6
6
  "access": "public"
7
7
  },