Skip to content

Commit 07990f8

Browse files
Fix duplicate schema definitions causing YAML validation issues
Fixes #14122
1 parent c36679a commit 07990f8

File tree

5 files changed

+39
-22
lines changed

5 files changed

+39
-22
lines changed

src/resources/schema/definitions.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2752,8 +2752,9 @@
27522752
- id: logo-light-dark-specifier-path-optional
27532753
description: >
27542754
Any of the ways a logo can be specified: string, object, or light/dark object of
2755-
string or object
2755+
string or object. Use `false` to explicitly disable the logo.
27562756
anyOf:
2757+
- enum: [false]
27572758
- ref: logo-specifier-path-optional
27582759
- object:
27592760
closed: true

src/resources/schema/document-epub.yml

Lines changed: 0 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -35,25 +35,6 @@
3535
ref: epub-contributor
3636
description: Contributors to this publication.
3737

38-
- name: subject
39-
tags:
40-
formats: [$epub-all]
41-
schema:
42-
anyOf:
43-
- string
44-
- object:
45-
closed: true
46-
properties:
47-
text:
48-
string:
49-
description: The subject text.
50-
authority:
51-
string:
52-
description: An EPUB reserved authority value.
53-
term:
54-
string:
55-
description: The subject term (defined by the schema).
56-
description: The subject of the publication.
5738

5839
- name: type
5940
tags:

src/resources/schema/document-metadata.yml

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,23 @@
66
description: "List of keywords to be included in the document metadata."
77

88
- name: subject
9-
schema: string
9+
schema:
10+
anyOf:
11+
- string
12+
- object:
13+
closed: true
14+
properties:
15+
text:
16+
string:
17+
description: The subject text.
18+
authority:
19+
string:
20+
description: An EPUB reserved authority value.
21+
term:
22+
string:
23+
description: The subject term (defined by the schema).
1024
tags:
11-
formats: [$pdf-all, $office-all, odt]
25+
formats: [$pdf-all, $office-all, odt, $epub-all]
1226
description: "The document subject"
1327

1428
- name: description
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
schema:
2+
ref: logo-light-dark-specifier-path-optional
3+
value: false
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
---
2+
title: Test
3+
subject:
4+
text: "Science"
5+
authority: "BISAC"
6+
term: "SCI000000"
7+
format: epub
8+
_quarto:
9+
tests:
10+
epub:
11+
ensureEpubFileRegexMatches:
12+
- path: EPUB/content.opf
13+
regexes:
14+
- ['dc:subject id="subject-1">Science</dc:subject>', 'property="authority">BISAC', 'property="term">SCI000000']
15+
- []
16+
---
17+
18+
Test structured subject metadata in epub output.

0 commit comments

Comments
 (0)