Page Menu
Home
Software Heritage
Search
Configure Global Search
Log In
Files
F7124565
D7251.id26319.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
1 KB
Subscribers
None
D7251.id26319.diff
View Options
diff --git a/swh/deposit/tests/api/test_checks.py b/swh/deposit/tests/api/test_checks.py
--- a/swh/deposit/tests/api/test_checks.py
+++ b/swh/deposit/tests/api/test_checks.py
@@ -286,6 +286,24 @@
_parameters3 = [
(textwrap.dedent(metadata_ko), expected_summary)
for (metadata_ko, expected_summary) in [
+ (
+ f"""\
+ <entry {XMLNS}>
+ <url>some url</url>
+ <codemeta:name>
+ <codemeta:name>bar</codemeta:name>
+ </codemeta:name>
+ <author>no one</author>
+ {PROVENANCE_XML}
+ </entry>
+ """,
+ [
+ {
+ "summary": ".*Reason: a simple content element can't have child elements.*",
+ "fields": ["codemeta:name"],
+ },
+ ],
+ ),
(
f"""\
<entry {XMLNS}>
diff --git a/swh/deposit/xsd/codemeta.xsd b/swh/deposit/xsd/codemeta.xsd
--- a/swh/deposit/xsd/codemeta.xsd
+++ b/swh/deposit/xsd/codemeta.xsd
@@ -16,4 +16,6 @@
<xsd:simpleType name="DateOrDateTime">
<xsd:union memberTypes="xsd:date xsd:dateTime"/>
</xsd:simpleType>
+
+ <xsd:element name="name" type="xsd:string" />
</xsd:schema>
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Dec 21 2024, 1:31 PM (11 w, 4 d ago)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
3224319
Attached To
D7251: Validate codemeta:name
Event Timeline
Log In to Comment