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:
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 thepriorApiType
wasn't defined. The absence of apriorApiType
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 runningnpm 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:
Part of https://github.com/Qiskit/documentation/issues/2331