docusaurus-theme-openapi-docs 0.0.0-1076 → 0.0.0-1078

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.
@@ -133,9 +133,12 @@ const AnyOneOf = ({ schema, schemaType }) => {
133
133
  SchemaTabs_1.default,
134
134
  { groupId: `schema-${uniqueId}`, lazy: true },
135
135
  schema[key]?.map((anyOneSchema, index) => {
136
+ // Use getSchemaName to include format info (e.g., "string<date-time>")
137
+ const computedSchemaName = (0, schema_1.getSchemaName)(anyOneSchema);
136
138
  // Determine label for the tab
137
- // If schema is just oneOf/anyOf without title/type, use a generic label
138
- let label = anyOneSchema.title || anyOneSchema.type;
139
+ // Prefer explicit title, then computed schema name, then raw type
140
+ let label =
141
+ anyOneSchema.title || computedSchemaName || anyOneSchema.type;
139
142
  if (!label) {
140
143
  if (anyOneSchema.oneOf) {
141
144
  label = (0, Translate_1.translate)({
@@ -160,7 +163,7 @@ const AnyOneOf = ({ schema, schemaType }) => {
160
163
  react_1.default.createElement(SchemaItem_1.default, {
161
164
  collapsible: false,
162
165
  name: undefined,
163
- schemaName: anyOneSchema.type,
166
+ schemaName: computedSchemaName,
164
167
  qualifierMessage: (0, schema_1.getQualifierMessage)(
165
168
  anyOneSchema
166
169
  ),
@@ -176,7 +179,7 @@ const AnyOneOf = ({ schema, schemaType }) => {
176
179
  react_1.default.createElement(SchemaItem_1.default, {
177
180
  collapsible: false,
178
181
  name: undefined,
179
- schemaName: anyOneSchema.type,
182
+ schemaName: computedSchemaName,
180
183
  qualifierMessage: (0, schema_1.getQualifierMessage)(
181
184
  anyOneSchema
182
185
  ),
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "docusaurus-theme-openapi-docs",
3
3
  "description": "OpenAPI theme for Docusaurus.",
4
- "version": "0.0.0-1076",
4
+ "version": "0.0.0-1078",
5
5
  "license": "MIT",
6
6
  "keywords": [
7
7
  "openapi",
@@ -38,7 +38,7 @@
38
38
  "@types/postman-collection": "^3.5.11",
39
39
  "@types/react-modal": "^3.16.3",
40
40
  "concurrently": "^9.2.0",
41
- "docusaurus-plugin-openapi-docs": "0.0.0-1076",
41
+ "docusaurus-plugin-openapi-docs": "0.0.0-1078",
42
42
  "docusaurus-plugin-sass": "^0.2.6",
43
43
  "eslint-plugin-prettier": "^5.5.1"
44
44
  },
@@ -81,5 +81,5 @@
81
81
  "engines": {
82
82
  "node": ">=14"
83
83
  },
84
- "gitHead": "c5c4370633dd11b143393c1bcda342b49816e15a"
84
+ "gitHead": "39f7ab524f1f703df01e188fa168923e3657a49b"
85
85
  }
@@ -145,9 +145,13 @@ const AnyOneOf: React.FC<SchemaProps> = ({ schema, schemaType }) => {
145
145
  </span>
146
146
  <SchemaTabs groupId={`schema-${uniqueId}`} lazy>
147
147
  {schema[key]?.map((anyOneSchema: any, index: number) => {
148
+ // Use getSchemaName to include format info (e.g., "string<date-time>")
149
+ const computedSchemaName = getSchemaName(anyOneSchema);
150
+
148
151
  // Determine label for the tab
149
- // If schema is just oneOf/anyOf without title/type, use a generic label
150
- let label = anyOneSchema.title || anyOneSchema.type;
152
+ // Prefer explicit title, then computed schema name, then raw type
153
+ let label =
154
+ anyOneSchema.title || computedSchemaName || anyOneSchema.type;
151
155
  if (!label) {
152
156
  if (anyOneSchema.oneOf) {
153
157
  label = translate({
@@ -175,7 +179,7 @@ const AnyOneOf: React.FC<SchemaProps> = ({ schema, schemaType }) => {
175
179
  <SchemaItem
176
180
  collapsible={false}
177
181
  name={undefined}
178
- schemaName={anyOneSchema.type}
182
+ schemaName={computedSchemaName}
179
183
  qualifierMessage={getQualifierMessage(anyOneSchema)}
180
184
  schema={anyOneSchema}
181
185
  discriminator={false}
@@ -192,7 +196,7 @@ const AnyOneOf: React.FC<SchemaProps> = ({ schema, schemaType }) => {
192
196
  <SchemaItem
193
197
  collapsible={false}
194
198
  name={undefined}
195
- schemaName={anyOneSchema.type}
199
+ schemaName={computedSchemaName}
196
200
  qualifierMessage={getQualifierMessage(anyOneSchema)}
197
201
  schema={anyOneSchema}
198
202
  discriminator={false}