@scalar/openapi-to-markdown 1.5.1 → 1.5.3

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/CHANGELOG.md CHANGED
@@ -1,5 +1,13 @@
1
1
  # @scalar/openapi-to-markdown
2
2
 
3
+ ## 1.5.3
4
+
5
+ ### Patch Changes
6
+
7
+ - [#10484](https://github.com/scalar/scalar/pull/10484): Use OpenAPI 3.2 tag summaries as Markdown headings, falling back to tag names.
8
+
9
+ ## 1.5.2
10
+
3
11
  ## 1.5.1
4
12
 
5
13
  ### Patch Changes
package/README.md CHANGED
@@ -143,6 +143,9 @@ Schema normalization and description parsing are cached within each renderer. Re
143
143
  schema expansion still tracks ancestors and stops at a depth of ten. Output may use tighter
144
144
  list spacing and normalized Markdown escaping compared with earlier versions.
145
145
 
146
+ For OpenAPI 3.2 descriptions, tag headings use `summary` when present and otherwise
147
+ use `name`. Tag selectors and operation tag metadata continue to use `name`.
148
+
146
149
  The package only generates Markdown. To produce HTML, pass the Markdown output to a
147
150
  Markdown renderer in your application.
148
151
 
@@ -1 +1 @@
1
- {"version":3,"file":"render-document.d.ts","sourceRoot":"","sources":["../src/render-document.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,EACV,eAAe,EAGhB,MAAM,8DAA8D,CAAA;AAcrE,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,mBAAmB,CAAA;AA+C7D,2FAA2F;AAC3F,eAAO,MAAM,sBAAsB,QAAO,CAAC,CACzC,QAAQ,EAAE,eAAe,EACzB,OAAO,CAAC,EAAE,oBAAoB,KAC3B,OAAO,CAAC,MAAM,CAAC,CAsPnB,CAAA"}
1
+ {"version":3,"file":"render-document.d.ts","sourceRoot":"","sources":["../src/render-document.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,EACV,eAAe,EAGhB,MAAM,8DAA8D,CAAA;AAcrE,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,mBAAmB,CAAA;AA+C7D,2FAA2F;AAC3F,eAAO,MAAM,sBAAsB,QAAO,CAAC,CACzC,QAAQ,EAAE,eAAe,EACzB,OAAO,CAAC,EAAE,oBAAoB,KAC3B,OAAO,CAAC,MAAM,CAAC,CAuPnB,CAAA"}
@@ -169,7 +169,8 @@ export const createDocumentRenderer = () => {
169
169
  if (document.tags?.length) {
170
170
  nodes.push(heading(2, text('Tags')));
171
171
  for (const tag of document.tags) {
172
- nodes.push(heading(3, text(tag.name)), ...(await description(tag.description)));
172
+ const title = /^3\.2\./.test(openapiVersion) ? (tag.summary ?? tag.name) : tag.name;
173
+ nodes.push(heading(3, text(title)), ...(await description(tag.description)));
173
174
  if (tag.externalDocs)
174
175
  nodes.push(paragraph(link(tag.externalDocs.url, tag.externalDocs.description ?? tag.externalDocs.url)));
175
176
  }
package/package.json CHANGED
@@ -16,7 +16,7 @@
16
16
  "llm",
17
17
  "swagger"
18
18
  ],
19
- "version": "1.5.1",
19
+ "version": "1.5.3",
20
20
  "engines": {
21
21
  "node": ">=22"
22
22
  },
@@ -41,10 +41,10 @@
41
41
  ],
42
42
  "dependencies": {
43
43
  "@scalar/code-highlight": "0.4.8",
44
- "@scalar/helpers": "0.16.0",
45
- "@scalar/json-magic": "0.15.4",
46
- "@scalar/openapi-upgrader": "0.4.1",
47
- "@scalar/workspace-store": "0.68.0",
44
+ "@scalar/helpers": "0.16.2",
45
+ "@scalar/json-magic": "0.15.6",
46
+ "@scalar/openapi-upgrader": "0.4.3",
47
+ "@scalar/workspace-store": "0.68.2",
48
48
  "rehype-parse": "^9.0.1",
49
49
  "rehype-remark": "^10.0.1",
50
50
  "rehype-sanitize": "^6.0.0",
@@ -54,9 +54,9 @@
54
54
  "unified": "^11.0.5"
55
55
  },
56
56
  "devDependencies": {
57
- "@scalar/components": "0.30.6",
57
+ "@scalar/components": "0.31.0",
58
58
  "@scalar/galaxy": "0.7.1",
59
- "@scalar/themes": "0.18.1",
59
+ "@scalar/themes": "0.19.0",
60
60
  "@tailwindcss/vite": "^4.3.3",
61
61
  "@types/mdast": "^4.0.4",
62
62
  "@vitejs/plugin-vue": "^6.0.8",