Repository: plone/plone.restapi (language: python)

Issue:
linkintegrity documentation missing a response file and does not use MyST syntax
When building the docs with `make docs-livehtml`, a warning indicates that there is a missing file.

`plone.restapi/docs/source/endpoints/linkintegrity.md:30: WARNING: Include file 'plone.restapi/src/plone/restapi/tests/http-examples/linkintegrity_get.resp' not found or reading it failed`

There are also reST syntax instances that need to be updated with MyST, and this file needs to be placed in the `endpoints` directory and added to the `endpoints/index.md` `toctree`.


Discussion / hints:

Fix patch:
diff --git a/docs/source/endpoints/index.md b/docs/source/endpoints/index.md
index 2eec48957e..f6f525ef99 100644
--- a/docs/source/endpoints/index.md
+++ b/docs/source/endpoints/index.md
@@ -31,6 +31,7 @@ email-send
 expansion
 groups
 history
+linkintegrity
 locking
 navigation
 actions
diff --git a/docs/source/endpoints/linkintegrity.md b/docs/source/endpoints/linkintegrity.md
new file mode 100644
index 0000000000..a6bff085b1
--- /dev/null
+++ b/docs/source/endpoints/linkintegrity.md
@@ -0,0 +1,37 @@
+---
+myst:
+  html_meta:
+    "description": "Returns a list of possible reference breaches for given objects."
+    "property=og:description": "Returns a list of possible reference breaches for given objects."
+    "property=og:title": "Link integrity"
+    "keywords": "Plone, plone.restapi, REST, API, Link, integrity"
+---
+
+# Link Integrity
+
+When you create relations between content objects in Plone (for example, via relation fields or links in text blocks), these relations are stored in the database.
+The Plone user interface will use those stored relations to show a warning when you try to delete a content object that is still referenced elsewhere.
+Link integrity avoids broken links ("breaches") in the site.
+
+This check includes content objects that are located within a content object ("folderish content").
+
+The `@linkintegrity` endpoint returns the list of reference breaches.
+If there are none, it will return an empty list (`[]`).
+
+You can call the `/@linkintegrity` endpoint on the site root with a `GET` request and a list of UIDs in the JSON body:
+
+```{eval-rst}
+..  http:example:: curl httpie python-requests
+    :request: ../../../src/plone/restapi/tests/http-examples/linkintegrity_get.req
+```
+
+The server will respond with the result:
+
+```{literalinclude} ../../../src/plone/restapi/tests/http-examples/linkintegrity_get.resp
+   :language: http
+```
+
+The endpoint accepts a single parameter:
+
+`uids`
+: A list of object UIDs that you want to check.
diff --git a/docs/source/linkintegrity.md b/docs/source/linkintegrity.md
deleted file mode 100644
index 2aed822019..0000000000
--- a/docs/source/linkintegrity.md
+++ /dev/null
@@ -1,31 +0,0 @@
----
-html_meta:
-  "description": "Returns a list of possible reference breaches for given objects."
-  "property=og:description": "Returns a list of possible reference breaches for given objects."
-  "property=og:title": "Link integrity"
-  "keywords": "Plone, plone.restapi, REST, API, Linkintegrity"
----
-
-# Link Integrity
-
-When you create relations between content objects in Plone (e.g. via relation fields or links in text blocks), these relations are stored in the database.
-The Plone user interface will use those stored relations to show a warning when you try to delete a content object that is still referenced somewhere.
-This avoids broken links ("breaches") in the site.
-
-This check includes content objects that are located within a content object ("folderish content").
-
-The `@linkintegrity` endpoint returns the list of reference breaches. If there are none, it will return an empty list ("[]").
-
-You can call the `/@linkintegrity` endpoint on site root with a `GET` request and a list of uids in JSON BODY:
-
-..  http:example:: curl httpie python-requests
-    :request: ../../src/plone/restapi/tests/http-examples/linkintegrity_get.req
-
-The server will respond with the results:
-
-.. literalinclude:: ../../src/plone/restapi/tests/http-examples/linkintegrity_get.resp
-   :language: http
-
-The endpoint accepts a single parameter:
-
-  - ``uids`` (a list of object uids that you want to check)
diff --git a/news/1509.doc b/news/1509.doc
new file mode 100644
index 0000000000..e7a75ea4de
--- /dev/null
+++ b/news/1509.doc
@@ -0,0 +1,1 @@
+Fix linkintegrity documentation, add missing a response file, and use MyST syntax. [stevepiercy]


Test patch:
diff --git a/src/plone/restapi/tests/http-examples/linkintegrity_get.resp b/src/plone/restapi/tests/http-examples/linkintegrity_get.resp
new file mode 100644
index 0000000000..30404ce4c5
--- /dev/null
+++ b/src/plone/restapi/tests/http-examples/linkintegrity_get.resp
@@ -0,0 +1,1 @@
+TODO
\ No newline at end of file