Skip to content

Add json-ld export#809

Open
brinxmat wants to merge 1 commit into
mainfrom
export-as-json-ld
Open

Add json-ld export#809
brinxmat wants to merge 1 commit into
mainfrom
export-as-json-ld

Conversation

@brinxmat

Copy link
Copy Markdown
Contributor

No description provided.

@github-actions

Copy link
Copy Markdown

Test Results

   57 files  +  1     57 suites  +1   2m 34s ⏱️ +8s
1 438 tests +119  1 435 ✅ +119  3 💤 ±0  0 ❌ ±0 
1 521 runs  +119  1 518 ✅ +119  3 💤 ±0  0 ❌ ±0 

Results for commit 8e5045e. ± Comparison against base commit 954a2e3.

This pull request removes 3 and adds 122 tests. Note that renamed tests count towards both.
no.unit.nva.indexingclient.models.IndexDocumentTest ‑ should throw exception when validating and missing mandatory fields:IndexDocument[consumptionAttributes=EventConsumptionAttributes[index=ay79JtCWEQ, documentIdentifier=null], resource={"cG8VkPvj5vdgww":{"O2mMMbSCaeR76":"vUkopJx0xu","mvdGuShWOgghCHiaR":"dRSTRzojgXhMV5i","Y3oDmJcAO1zP8MD4Fi2":"eKv2GH32dk","bZDvgsfe64K":"B3L62hpPk9z","JTRZj5o2S0lBCXzTZG":"gVQvuijlWn"},"ZVhk92e9yR9TSUx":{"EjCH0wOy1EIFN":"yn80udnSmFAoxe","vwdMsHZJd1EJM081BMB":"2AneZb9fSAEP69","HYq84XuQTF9m0JZ":"OGjSJpNecDXGI5uITa","XC5xJgupVgDRqWu":"O57OT1uSyKoHLK0","ckyaa5unfosnUH":"hjmrELTTUwcyql"},"ptXBDhXIW…
no.unit.nva.indexingclient.models.IndexDocumentTest ‑ should throw exception when validating and missing mandatory fields:IndexDocument[consumptionAttributes=EventConsumptionAttributes[index=null, documentIdentifier=019ed4de79b7-12412655-7e8c-4826-8d93-bfb2e2d5528d], resource={"SONoLrbJZ12a":{"VaGl22Qe49w":"ufiUTunOE0dnVx4e1","Vmq5MsTcuTkhvd72F":"T1Iw3pWOiHDKI","KWlcrX3IJX":"RB2Yrc0uGhLcy6","piuRxX7KSw0ibTMV":"JgcQ5lkfnMwDAXHH7d","eE5rkMXpKG4":"Dw5GyywQdQ2OvOF"},"wsndeL3Ya0yPEdlzZJ":{"Fuw0KqqRJ5WsV3":"EczbRgfUepvM4gs","FvpAajAvNjfU":"nompOdoKhV","zMn2cPPA2VX":"yy3BD20mZXoo6tCVM2","UHtjYjWSjjbA":"QDC9AP0htRYns","HmaJWhq1iNj":"…
no.unit.nva.search.common.records.HttpResponseFormatterPaginationHeadersTest ‑ shouldReturnEmptyHeadersWhenMediaTypeIsJsonLd()
no.unit.nva.indexingclient.models.IndexDocumentTest ‑ should throw exception when validating and missing mandatory fields:IndexDocument[consumptionAttributes=EventConsumptionAttributes[index=RuaAfUe8Tdtk, documentIdentifier=null], resource={"pVG4AXzhqBUhqlbW":{"ne45ozNIZefSR":"cCHcNa0KuSXgqRx","yke2AM6N7fnwQFM9RA":"0bnWIq242i0Dd","XJc3HiEpR5GGk41G":"q3qW51r2iHAl","l1f5g1TsDfrs":"KO800JMY0iH","2VlZWT69fK0x":"vc6HWvYQkS0xJX"},"9aRkU9bJWg":{"9XI40ynEhsmVGepL":"nHGz3p6UzWGKPBc","jZn5ox6IE5OXsJO9":"nWwjNaSFLK0I","dQNeJxTF7nY1GE8kEDt":"FMAZUafv6e","YNvPpmyEjva272Del":"gV1rcRW8m4ZtQpRX","ieur31SnLKe":"sfoHsDEblVCYWW"},"N8f232VQ8n1yd…
no.unit.nva.indexingclient.models.IndexDocumentTest ‑ should throw exception when validating and missing mandatory fields:IndexDocument[consumptionAttributes=EventConsumptionAttributes[index=null, documentIdentifier=019ed59745db-fe76c8a8-af79-4b05-973a-be23ccf875ce], resource={"aBCRV7Y6QlKdsF":{"aYFEUYYriheBXs":"Gn2B49vfjkDvdG","JviJFXqN4qU":"SBGKcVyKln18D","IaE3grR8ZClwXJ":"twgpR1t4hXNYbN1uGC4","HZ2MGIB0Td":"QUUebFKMTG","IEoHD6J3P2fStxg2aBJ":"zv6DIq7DWt"},"vXzo30XetYCFj":{"g7rqZsY1li2sv":"kVcnanh5Mm","N3Qy3p6tnKe5kUq":"MeVXg50Pm0P4","aIdfXcIIpo":"reF7CvHqdmfHiLVFRb","7y6WLPVBiU7x":"FPpnjga88Je2a","bZkOOWu5p1U":"HQyWRQjEqnIm4…
no.unit.nva.search.common.bibliography.SchemaOrgBibliographyTransformerTest ‑ "AcademicArticle" → "ScholarlyArticle"
no.unit.nva.search.common.bibliography.SchemaOrgBibliographyTransformerTest ‑ "AcademicChapter" → "Chapter"
no.unit.nva.search.common.bibliography.SchemaOrgBibliographyTransformerTest ‑ "AcademicCommentary" → "Book"
no.unit.nva.search.common.bibliography.SchemaOrgBibliographyTransformerTest ‑ "AcademicLiteratureReview" → "ScholarlyArticle"
no.unit.nva.search.common.bibliography.SchemaOrgBibliographyTransformerTest ‑ "AcademicMonograph" → "Book"
no.unit.nva.search.common.bibliography.SchemaOrgBibliographyTransformerTest ‑ "Architecture" → "CreativeWork"
no.unit.nva.search.common.bibliography.SchemaOrgBibliographyTransformerTest ‑ "ArtisticDegreePhd" → "Thesis"
no.unit.nva.search.common.bibliography.SchemaOrgBibliographyTransformerTest ‑ "ArtisticDesign" → "CreativeWork"
…

}

@Test
void shouldEmitProfileLinkForJsonLd() {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if you omit profile in request, it will default to our verbose json?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This concern existed before this change, but I have now added a test that explicitly pins the default representation to JSON-UTF-8

public static final String STATUS = "status";
public static final String SUFFIX = ")";
public static final String TAGS = "tags";
public static final String APPLICATION_LD_JSON = "application/ld+json";

@torbjokv torbjokv Jun 18, 2026

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

have a look at static String[] forMediaType(MediaType mediaType, Collection<String> defaultIncludedFields)

Could you add the needed json fields here to limit "Entity Too Large" issues?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(this comment is more or less randomly placed btw)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

maybe we should restructure the pattern here so that included fields are enforced next time we add a new profile/format

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants