qiskit-documentation/public/api/qiskit-addon-obp
Arnau Casau ceaa8614cb
Add missing attribute headers for API docs (#2341)
This PR adds missing attribute headers for some versions of Qiskit. To
decide if an attribute was on a dedicated page and therefore didn't need
a header, the code was checking if the `id` existed and if the
`priorApiType` wasn't defined. The absence of a `priorApiType` in an
attribute could be seen as indicative of the attribute not being in a
class page, but it's not enough to check if that page is dedicated to
just one attribute or if there are more.

To solve this, the PR changes the conditional to check if the page
heading matches the `id` of the attribute as we are already doing for
the functions' component. I've checked the correctness by running `npm
run regen-apis` and the only changes found are the missing attribute
headers for qiskit 0.44.0, 0.45.3, 0.45.3, and 1.0.2.

Furthermore, I tested with the MPF docs, and it solves the issue with
the missing attribute:

```diff
-<Attribute id="qiskit_addon_mpf.backends.HAS_QUIMB" isDedicatedPage={true}>
+### HAS\_QUIMB
+
+<Attribute id="qiskit_addon_mpf.backends.HAS_QUIMB">
```

Part of https://github.com/Qiskit/documentation/issues/2331
2024-11-19 15:08:42 +00:00
..
objects.inv Add missing attribute headers for API docs (#2341) 2024-11-19 15:08:42 +00:00